活动介绍
file-type

Emoji-helper-php:PHP项目中处理emoji表情的必备工具

ZIP文件

下载需积分: 43 | 2KB | 更新于2024-12-31 | 146 浏览量 | 0 下载量 举报 收藏
download 立即下载
由于emoji表情符号通常由四个字节组成,而非传统的三个字节,这就导致在使用不支持utf8mb4编码的数据库中存储emoji表情符号时会出现问题。utf8mb4是一种扩展的utf8编码,能够支持存储4字节字符,如emoji表情符号。若数据库未采用utf8mb4编码,就会对存入的emoji表情符号产生错误。 emoji-helper-php库提供了几个关键功能来帮助开发者处理emoji相关问题: 1. 移除字符串中的emoji表情符号:emoji_helper.php文件中定义的函数emoji_reject可用于去除字符串中的emoji表情符号。开发者只需将需要处理的文本变量传递给此函数,便可返回处理后的文本,其中已经移除了所有emoji表情符号。 2. 判断字符串是否包含emoji表情符号:emoji_test函数可以用来检测指定的字符串中是否含有emoji表情符号。如果字符串包含emoji表情符号,该函数将返回true,否则返回false。这对于开发者进行数据清洗或者在数据存入数据库前进行合法性校验非常有用。 3. 输出emoji表情符号的16位二进制代码:emoji的表情符号实际上是由Unicode编码表示的字符序列,每个emoji都可以转换为对应的16位二进制代码。库中的相关功能能够将emoji表情符号转换为其二进制表示形式输出,这对于需要对数据进行特定处理的场景特别有用。 库的使用说明详细指出了emoji表情符号的常见问题以及如何利用emoji-helper-php来解决。特别提醒了对于3字节的emoji表情符号,库是无法剔除的,例如某些输入法中的特殊emoji。对于此类特殊emoji表情符号的处理,开发者需要特别注意,避免因为数据的不一致性导致的问题。 值得注意的是,库的设计目标是帮助那些没有升级到utf8mb4编码的老旧数据库项目。在现代数据库应用中,支持utf8mb4编码已经是一种常规的做法。如果可能,建议优先升级数据库至utf8mb4编码,这样可以无缝地支持emoji表情符号的存储和处理,避免复杂的过滤和转换操作。然而,在无法改变数据库编码的情况下,emoji-helper-php库提供了一个有效的解决方案来确保应用的正常运行。 标签中提到了“emoji EmojiPHP”,表明这是一个专注于处理emoji的PHP工具。由于emoji的广泛使用和数据库编码的多样性,这个库在处理与emoji相关的字符串数据时显得尤为重要。 最后,根据压缩包文件名称列表显示的“emoji-helper-php-master”,可以推测这是emoji-helper-php库的源代码文件结构,意味着开发者可以获取完整的源代码进行自定义修改或深入研究。"

相关推荐

filetype

releaseRuntimeClasspath - Resolved configuration for runtime for variant: release +--- androidx.appcompat:appcompat:1.6.1 | +--- androidx.activity:activity:1.6.0 -> 1.8.0 | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0 | | +--- androidx.collection:collection:1.0.0 -> 1.1.0 | | | \--- androidx.annotation:annotation:1.1.0 -> 1.3.0 | | +--- androidx.core:core:1.8.0 -> 1.9.0 | | | +--- androidx.annotation:annotation:1.2.0 -> 1.3.0 | | | +--- androidx.annotation:annotation-experimental:1.3.0 | | | | \--- org.jetbrains.kotlin:kotlin-stdlib:1.7.10 -> 1.8.22 | | | | +--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.22 | | | | \--- org.jetbrains:annotations:13.0 | | | +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*) | | | +--- androidx.concurrent:concurrent-futures:1.0.0 -> 1.1.0 | | | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0 | | | | \--- com.google.guava:listenablefuture:1.0 | | | +--- androidx.lifecycle:lifecycle-runtime:2.3.1 -> 2.6.1 | | | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0 | | | | +--- androidx.arch.core:core-common:2.2.0 | | | | | \--- androidx.annotation:annotation:1.1.0 -> 1.3.0 | | | | +--- androidx.arch.core:core-runtime:2.2.0 | | | | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0 | | | | | \--- androidx.arch.core:core-common:2.2.0 (*) | | | | +--- androidx.lifecycle:lifecycle-common:2.6.1 | | | | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0 | | | | | +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.8.22 (*) | | | | | +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4 | | | | | | +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4 | | | | | | | \--- org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4 | | | | | | | +--- org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.6.4 | | | | | | | | +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4 (c) | | | | | | | | +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4 (c) | | | | | | | | \--- org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4 (c) | | | | | | | +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21 -> 1.8.22 | | | | | | | | +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 (*) | | | | | | | | \--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.22 | | | | | | | | \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 (*) | | | | | | | \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.6.21 -> 1.8.22 | | | | | | +--- org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.6.4 (*) | | | | | | \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21 -> 1.8.22 (*) | | | | | +--- androidx.lifecycle:lifecycle-livedata:2.6.1 (c) | | | | | +--- androidx.lifecycle:lifecycle-livedata-core:2.6.1 (c) | | | | | +--- androidx.lifecycle:lifecycle-process:2.6.1 (c) | | | | | +--- androidx.lifecycle:lifecycle-runtime:2.6.1 (c) | | | | | +--- androidx.lifecycle:lifecycle-viewmodel:2.6.1 (c) | | | | | \--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.6.1 (c) | | | | +--- androidx.profileinstaller:profileinstaller:1.3.0 | | | | | +--- androidx.annotation:annotation:1.2.0 -> 1.3.0 | | | | | +--- androidx.concurrent:concurrent-futures:1.1.0 (*) | | | | | +--- androidx.startup:startup-runtime:1.1.1 | | | | | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0 | | | | | | \--- androidx.tracing:tracing:1.0.0 | | | | | | \--- androidx.annotation:annotation:1.1.0 -> 1.3.0 | | | | | \--- com.google.guava:listenablefuture:1.0 | | | | +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.8.22 (*) | | | | +--- androidx.lifecycle:lifecycle-common:2.6.1 (c) | | | | +--- androidx.lifecycle:lifecycle-livedata-core:2.6.1 (c) | | | | +--- androidx.lifecycle:lifecycle-process:2.6.1 (c) | | | | +--- androidx.lifecycle:lifecycle-viewmodel:2.6.1 (c) | | | | +--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.6.1 (c) | | | | \--- androidx.lifecycle:lifecycle-livedata:2.6.1 (c) | | | +--- androidx.versionedparcelable:versionedparcelable:1.1.1 | | | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0 | | | | \--- androidx.collection:collection:1.0.0 -> 1.1.0 (*) | | | \--- androidx.core:core-ktx:1.9.0 (c) | | +--- androidx.lifecycle:lifecycle-runtime:2.6.1 (*) | | +--- androidx.lifecycle:lifecycle-viewmodel:2.6.1 | | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0 | | | +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.8.22 (*) | | | +--- androidx.lifecycle:lifecycle-common:2.6.1 (c) | | | +--- androidx.lifecycle:lifecycle-livedata-core:2.6.1 (c) | | | +--- androidx.lifecycle:lifecycle-process:2.6.1 (c) | | | +--- androidx.lifecycle:lifecycle-runtime:2.6.1 (c) | | | +--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.6.1 (c) | | | \--- androidx.lifecycle:lifecycle-livedata:2.6.1 (c) | | +--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.6.1 | | | +--- androidx.annotation:annotation:1.0.0 -> 1.3.0 | | | +--- androidx.core:core-ktx:1.2.0 -> 1.9.0 | | | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0 | | | | +--- androidx.core:core:1.9.0 (*) | | | | +--- org.jetbrains.kotlin:kotlin-stdlib:1.7.10 -> 1.8.22 (*) | | | | \--- androidx.core:core:1.9.0 (c) | | | +--- androidx.lifecycle:lifecycle-livedata-core:2.6.1 | | | | +--- androidx.arch.core:core-common:2.1.0 -> 2.2.0 (*) | | | | +--- androidx.arch.core:core-runtime:2.1.0 -> 2.2.0 (*) | | | | +--- androidx.lifecycle:lifecycle-common:2.6.1 (*) | | | | +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.8.22 (*) | | | | +--- androidx.lifecycle:lifecycle-common:2.6.1 (c) | | | | +--- androidx.lifecycle:lifecycle-livedata:2.6.1 (c) | | | | +--- androidx.lifecycle:lifecycle-process:2.6.1 (c) | | | | +--- androidx.lifecycle:lifecycle-runtime:2.6.1 (c) | | | | +--- androidx.lifecycle:lifecycle-viewmodel:2.6.1 (c) | | | | \--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.6.1 (c) | | | +--- androidx.lifecycle:lifecycle-viewmodel:2.6.1 (*) | | | +--- androidx.savedstate:savedstate:1.2.1 | | | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0 | | | | +--- androidx.arch.core:core-common:2.1.0 -> 2.2.0 (*) | | | | +--- androidx.lifecycle:lifecycle-common:2.6.1 (*) | | | | \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.8.22 (*) | | | +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.8.22 (*) | | | +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4 (*) | | | +--- androidx.lifecycle:lifecycle-common:2.6.1 (c) | | | +--- androidx.lifecycle:lifecycle-livedata-core:2.6.1 (c) | | | +--- androidx.lifecycle:lifecycle-process:2.6.1 (c) | | | +--- androidx.lifecycle:lifecycle-runtime:2.6.1 (c) | | | +--- androidx.lifecycle:lifecycle-viewmodel:2.6.1 (c) | | | \--- androidx.lifecycle:lifecycle-livedata:2.6.1 (c) | | +--- androidx.profileinstaller:profileinstaller:1.3.0 (*) | | +--- androidx.savedstate:savedstate:1.2.1 (*) | | +--- androidx.tracing:tracing:1.0.0 (*) | | \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 (*) | +--- androidx.annotation:annotation:1.3.0 | +--- androidx.appcompat:appcompat-resources:1.6.1 | | +--- androidx.annotation:annotation:1.2.0 -> 1.3.0 | | +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*) | | +--- androidx.core:core:1.6.0 -> 1.9.0 (*) | | +--- androidx.vectordrawable:vectordrawable:1.1.0 | | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0 | | | +--- androidx.core:core:1.1.0 -> 1.9.0 (*) | | | \--- androidx.collection:collection:1.1.0 (*) | | +--- androidx.vectordrawable:vectordrawable-animated:1.1.0 | | | +--- androidx.vectordrawable:vectordrawable:1.1.0 (*) | | | +--- androidx.interpolator:interpolator:1.0.0 | | | | \--- androidx.annotation:annotation:1.0.0 -> 1.3.0 | | | \--- androidx.collection:collection:1.1.0 (*) | | \--- androidx.appcompat:appcompat:1.6.1 (c) | +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*) | +--- androidx.core:core:1.9.0 (*) | +--- androidx.core:core-ktx:1.8.0 -> 1.9.0 (*) | +--- androidx.cursoradapter:cursoradapter:1.0.0 | | \--- androidx.annotation:annotation:1.0.0 -> 1.3.0 | +--- androidx.drawerlayout:drawerlayout:1.0.0 -> 1.1.1 | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0 | | +--- androidx.core:core:1.2.0 -> 1.9.0 (*) | | \--- androidx.customview:customview:1.1.0 | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0 | | +--- androidx.core:core:1.3.0 -> 1.9.0 (*) | | \--- androidx.collection:collection:1.1.0 (*) | +--- androidx.emoji2:emoji2:1.2.0 | | +--- androidx.annotation:annotation:1.2.0 -> 1.3.0 | | +--- androidx.collection:collection:1.1.0 (*) | | +--- androidx.core:core:1.3.0 -> 1.9.0 (*) | | +--- androidx.lifecycle:lifecycle-process:2.4.1 -> 2.6.1 | | | +--- androidx.annotation:annotation:1.2.0 -> 1.3.0 | | | +--- androidx.lifecycle:lifecycle-runtime:2.6.1 (*) | | | +--- androidx.startup:startup-runtime:1.1.1 (*) | | | +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.8.22 (*) | | | +--- androidx.lifecycle:lifecycle-common:2.6.1 (c) | | | +--- androidx.lifecycle:lifecycle-livedata:2.6.1 (c) | | | +--- androidx.lifecycle:lifecycle-livedata-core:2.6.1 (c) | | | +--- androidx.lifecycle:lifecycle-runtime:2.6.1 (c) | | | +--- androidx.lifecycle:lifecycle-viewmodel:2.6.1 (c) | | | \--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.6.1 (c) | | \--- androidx.startup:startup-runtime:1.0.0 -> 1.1.1 (*) | +--- androidx.emoji2:emoji2-views-helper:1.2.0 | | +--- androidx.collection:collection:1.1.0 (*) | | +--- androidx.core:core:1.3.0 -> 1.9.0 (*) | | \--- androidx.emoji2:emoji2:1.2.0 (*) | +--- androidx.fragment:fragment:1.3.6 | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0 | | +--- androidx.core:core:1.2.0 -> 1.9.0 (*) | | +--- androidx.collection:collection:1.1.0 (*) | | +--- androidx.viewpager:viewpager:1.0.0 | | | +--- androidx.annotation:annotation:1.0.0 -> 1.3.0 | | | +--- androidx.core:core:1.0.0 -> 1.9.0 (*) | | | \--- androidx.customview:customview:1.0.0 -> 1.1.0 (*) | | +--- androidx.loader:loader:1.0.0 | | | +--- androidx.annotation:annotation:1.0.0 -> 1.3.0 | | | +--- androidx.core:core:1.0.0 -> 1.9.0 (*) | | | +--- androidx.lifecycle:lifecycle-livedata:2.0.0 -> 2.6.1 | | | | +--- androidx.arch.core:core-common:2.1.0 -> 2.2.0 (*) | | | | +--- androidx.arch.core:core-runtime:2.1.0 -> 2.2.0 (*) | | | | +--- androidx.lifecycle:lifecycle-livedata-core:2.6.1 (*) | | | | +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.8.22 (*) | | | | +--- androidx.lifecycle:lifecycle-common:2.6.1 (c) | | | | +--- androidx.lifecycle:lifecycle-livedata-core:2.6.1 (c) | | | | +--- androidx.lifecycle:lifecycle-process:2.6.1 (c) | | | | +--- androidx.lifecycle:lifecycle-runtime:2.6.1 (c) | | | | +--- androidx.lifecycle:lifecycle-viewmodel:2.6.1 (c) | | | | \--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.6.1 (c) | | | \--- androidx.lifecycle:lifecycle-viewmodel:2.0.0 -> 2.6.1 (*) | | +--- androidx.activity:activity:1.2.4 -> 1.8.0 (*) | | +--- androidx.lifecycle:lifecycle-livedata-core:2.3.1 -> 2.6.1 (*) | | +--- androidx.lifecycle:lifecycle-viewmodel:2.3.1 -> 2.6.1 (*) | | +--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.3.1 -> 2.6.1 (*) | | +--- androidx.savedstate:savedstate:1.1.0 -> 1.2.1 (*) | | \--- androidx.annotation:annotation-experimental:1.0.0 -> 1.3.0 (*) | +--- androidx.lifecycle:lifecycle-runtime:2.5.1 -> 2.6.1 (*) | +--- androidx.lifecycle:lifecycle-viewmodel:2.5.1 -> 2.6.1 (*) | +--- androidx.resourceinspection:resourceinspection-annotation:1.0.1 | | \--- androidx.annotation:annotation:1.1.0 -> 1.3.0 | +--- androidx.savedstate:savedstate:1.2.0 -> 1.2.1 (*) | +--- org.jetbrains.kotlin:kotlin-stdlib:1.7.10 -> 1.8.22 (*) | \--- androidx.appcompat:appcompat-resources:1.6.1 (c) +--- com.google.android.material:material:1.10.0 -> 1.11.0 | +--- org.jetbrains.kotlin:kotlin-bom:1.8.22 | | +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 (c) | | +--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.22 (c) | | +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.22 (c) | | \--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.22 (c) | +--- com.google.errorprone:error_prone_annotations:2.15.0 | +--- androidx.activity:activity:1.8.0 (*) | +--- androidx.annotation:annotation:1.2.0 -> 1.3.0 | +--- androidx.appcompat:appcompat:1.6.1 (*) | +--- androidx.cardview:cardview:1.0.0 | | \--- androidx.annotation:annotation:1.0.0 -> 1.3.0 | +--- androidx.coordinatorlayout:coordinatorlayout:1.1.0 | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0 | | +--- androidx.core:core:1.1.0 -> 1.9.0 (*) | | +--- androidx.customview:customview:1.0.0 -> 1.1.0 (*) | | \--- androidx.collection:collection:1.0.0 -> 1.1.0 (*) | +--- androidx.constraintlayout:constraintlayout:2.0.1 -> 2.1.4 | | +--- androidx.appcompat:appcompat:1.2.0 -> 1.6.1 (*) | | +--- androidx.core:core:1.3.2 -> 1.9.0 (*) | | \--- androidx.constraintlayout:constraintlayout-core:1.0.4 | +--- androidx.core:core:1.6.0 -> 1.9.0 (*) | +--- androidx.drawerlayout:drawerlayout:1.1.1 (*) | +--- androidx.dynamicanimation:dynamicanimation:1.0.0 | | +--- androidx.core:core:1.0.0 -> 1.9.0 (*) | | +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*) | | \--- androidx.legacy:legacy-support-core-utils:1.0.0 | | +--- androidx.annotation:annotation:1.0.0 -> 1.3.0 | | +--- androidx.core:core:1.0.0 -> 1.9.0 (*) | | +--- androidx.documentfile:documentfile:1.0.0 | | | \--- androidx.annotation:annotation:1.0.0 -> 1.3.0 | | +--- androidx.loader:loader:1.0.0 (*) | | +--- androidx.localbroadcastmanager:localbroadcastmanager:1.0.0 | | | \--- androidx.annotation:annotation:1.0.0 -> 1.3.0 | | \--- androidx.print:print:1.0.0 | | \--- androidx.annotation:annotation:1.0.0 -> 1.3.0 | +--- androidx.annotation:annotation-experimental:1.0.0 -> 1.3.0 (*) | +--- androidx.fragment:fragment:1.2.5 -> 1.3.6 (*) | +--- androidx.lifecycle:lifecycle-runtime:2.0.0 -> 2.6.1 (*) | +--- androidx.recyclerview:recyclerview:1.0.0 -> 1.1.0 | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0 | | +--- androidx.core:core:1.1.0 -> 1.9.0 (*) | | +--- androidx.customview:customview:1.0.0 -> 1.1.0 (*) | | \--- androidx.collection:collection:1.0.0 -> 1.1.0 (*) | +--- androidx.resourceinspection:resourceinspection-annotation:1.0.1 (*) | +--- androidx.transition:transition:1.2.0 | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0 | | +--- androidx.core:core:1.0.1 -> 1.9.0 (*) | | \--- androidx.collection:collection:1.0.0 -> 1.1.0 (*) | +--- androidx.vectordrawable:vectordrawable:1.1.0 (*) | \--- androidx.viewpager2:viewpager2:1.0.0 | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0 | +--- androidx.fragment:fragment:1.1.0 -> 1.3.6 (*) | +--- androidx.recyclerview:recyclerview:1.1.0 (*) | +--- androidx.core:core:1.1.0 -> 1.9.0 (*) | \--- androidx.collection:collection:1.1.0 (*) +--- com.google.android.material:material:1.11.0 (*) +--- androidx.activity:activity:1.8.0 (*) \--- androidx.constraintlayout:constraintlayout:2.1.4 (*) (c) - A dependency constraint, not a dependency. The dependency affected by the constraint occurs elsewhere in the tree. (*) - Indicates repeated occurrences of a transitive dependency subtree. Gradle expands transitive dependency subtrees only once per project; repeat occurrences only display the root of the subtree, followed by this annotation. A web-based, searchable dependency report is available by adding the --scan option. BUILD SUCCESSFUL in 20s 1 actionable task: 1 executed

filetype

Android编译报错: One or more issues found when checking AAR metadata values: The minCompileSdk (32) specified in a dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties) is greater than this module's compileSdkVersion (android-31). Dependency: androidx.appcompat:appcompat-resources:1.5.0. AAR metadata file: C:\Users\bowen.xiao\.gradle\caches\transforms-3\08fd874985050e253ec847729166863d\transformed\appcompat-resources-1.5.0\META-INF\com\android\build\gradle\aar-metadata.properties. The minCompileSdk (32) specified in a dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties) is greater than this module's compileSdkVersion (android-31). Dependency: androidx.appcompat:appcompat:1.5.0. AAR metadata file: C:\Users\bowen.xiao\.gradle\caches\transforms-3\2ff9f6fdb11b21f654e4ca164ec34be3\transformed\appcompat-1.5.0\META-INF\com\android\build\gradle\aar-metadata.properties. The minCompileSdk (32) specified in a dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties) is greater than this module's compileSdkVersion (android-31). Dependency: androidx.emoji2:emoji2-views-helper:1.2.0. AAR metadata file: C:\Users\bowen.xiao\.gradle\caches\transforms-3\f7c935d3a1c3e63ba4311e42ac1ea41c\transformed\emoji2-views-helper-1.2.0\META-INF\com\android\build\gradle\aar-metadata.properties. The minCompileSdk (32) specified in a dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties) is greater than this module's compileSdkVersion (android-31). Dependency: androidx.emoji2:emoji2:1.2.0. AAR metadata file: C:\Users\bowen.xiao\.gradle\caches\transforms-3\bde07969cc5b996ae89e8f51024ca4c7\transformed\emoji2-1.2.0\META-INF\com\android\build\gradle\aar-metadata.properties.

filetype

One or more issues found when checking AAR metadata values: The minCompileSdk (31) specified in a dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties) is greater than this module's compileSdkVersion (android-28). Dependency: androidx.appcompat:appcompat:1.4.1. AAR metadata file: C:\Users\WTH\.gradle\caches\transforms-3\19075c4677e37e538c54d7f745fc8af4\transformed\appcompat-1.4.1\META-INF\com\android\build\gradle\aar-metadata.properties. The minCompileSdk (34) specified in a dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties) is greater than this module's compileSdkVersion (android-28). Dependency: androidx.media3:media3-exoplayer-hls:1.3.1. AAR metadata file: C:\Users\WTH\.gradle\caches\transforms-3\f62196c9af225d41f9966c25c4603141\transformed\jetified-media3-exoplayer-hls-1.3.1\META-INF\com\android\build\gradle\aar-metadata.properties. The minCompileSdk (34) specified in a dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties) is greater than this module's compileSdkVersion (android-28). Dependency: androidx.media3:media3-exoplayer:1.3.1. AAR metadata file: C:\Users\WTH\.gradle\caches\transforms-3\19dc5edf9a1240bf32f666eebe535336\transformed\jetified-media3-exoplayer-1.3.1\META-INF\com\android\build\gradle\aar-metadata.properties. The minCompileSdk (34) specified in a dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties) is greater than this module's compileSdkVersion (android-28). Dependency: androidx.media3:media3-ui:1.3.1. AAR metadata file: C:\Users\WTH\.gradle\caches\transforms-3\d002b58815b6ef1b417c5e236d313841\transformed\jetified-media3-ui-1.3.1\META-INF\com\android\build\gradle\aar-metadata.properties. The minCompileSdk (34) specified in a dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties) is greater than this module's compileSdkVersion (android-28). Dependency: androidx.media3:media3-extractor:1.3.1. AAR metadata file: C:\Users\WTH\.gradle\caches\transforms-3\57eb17e4bfb69f11ef78b52d43920df2\transformed\jetified-media3-extractor-1.3.1\META-INF\com\android\build\gradle\aar-metadata.properties. The minCompileSdk (34) specified in a dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties) is greater than this module's compileSdkVersion (android-28). Dependency: androidx.media3:media3-container:1.3.1. AAR metadata file: C:\Users\WTH\.gradle\caches\transforms-3\e48c1ce66e8ffa8ac4be1b2b7d5d0d52\transformed\jetified-media3-container-1.3.1\META-INF\com\android\build\gradle\aar-metadata.properties. The minCompileSdk (34) specified in a dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties) is greater than this module's compileSdkVersion (android-28). Dependency: androidx.media3:media3-datasource:1.3.1. AAR metadata file: C:\Users\WTH\.gradle\caches\transforms-3\bbb6db7f4433c3091619d11916cc3a2d\transformed\jetified-media3-datasource-1.3.1\META-INF\com\android\build\gradle\aar-metadata.properties. The minCompileSdk (34) specified in a dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties) is greater than this module's compileSdkVersion (android-28). Dependency: androidx.media3:media3-decoder:1.3.1. AAR metadata file: C:\Users\WTH\.gradle\caches\transforms-3\d154352d1f07f2aa393fef344ea2aa36\transformed\jetified-media3-decoder-1.3.1\META-INF\com\android\build\gradle\aar-metadata.properties. The minCompileSdk (34) specified in a dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties) is greater than this module's compileSdkVersion (android-28). Dependency: androidx.media3:media3-database:1.3.1. AAR metadata file: C:\Users\WTH\.gradle\caches\transforms-3\a7ba5f04965d35e77e08559d17f6e8b5\transformed\jetified-media3-database-1.3.1\META-INF\com\android\build\gradle\aar-metadata.properties. The minCompileSdk (34) specified in a dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties) is greater than this module's compileSdkVersion (android-28). Dependency: androidx.media3:media3-common:1.3.1. AAR metadata file: C:\Users\WTH\.gradle\caches\transforms-3\a8e744013e585276c999f5bbc5efd0f9\transformed\jetified-media3-common-1.3.1\META-INF\com\android\build\gradle\aar-metadata.properties. The minCompileSdk (34) specified in a dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties) is greater than this module's compileSdkVersion (android-28). Dependency: androidx.media3:media3-datasource-okhttp:1.3.1. AAR metadata file: C:\Users\WTH\.gradle\caches\transforms-3\ced201f888a692e78ea762fe33a81ee3\transformed\jetified-media3-datasource-okhttp-1.3.1\META-INF\com\android\build\gradle\aar-metadata.properties. The minCompileSdk (31) specified in a dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties) is greater than this module's compileSdkVersion (android-28). Dependency: androidx.appcompat:appcompat-resources:1.4.1. AAR metadata file: C:\Users\WTH\.gradle\caches\transforms-3\7f55b507be3e8b5a35b1621b2feee964\transformed\jetified-appcompat-resources-1.4.1\META-INF\com\android\build\gradle\aar-metadata.properties. The minCompileSdk (31) specified in a dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties) is greater than this module's compileSdkVersion (android-28). Dependency: androidx.emoji2:emoji2-views-helper:1.0.0. AAR metadata file: C:\Users\WTH\.gradle\caches\transforms-3\6cbed90352b213553df3539e2e7f22af\transformed\jetified-emoji2-views-helper-1.0.0\META-INF\com\android\build\gradle\aar-metadata.properties. The minCompileSdk (31) specified in a dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties) is greater than this module's compileSdkVersion (android-28). Dependency: androidx.emoji2:emoji2:1.0.0. AAR metadata file: C:\Users\WTH\.gradle\caches\transforms-3\09b79be83fba3907471fe1de63f439d3\transformed\jetified-emoji2-1.0.0\META-INF\com\android\build\gradle\aar-metadata.properties. The minCompileSdk (34) specified in a dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties) is greater than this module's compileSdkVersion (android-28). Dependency: androidx.media:media:1.7.0. AAR metadata file: C:\Users\WTH\.gradle\caches\transforms-3\f650bf8da01c19e925388c01fbb21a70\transformed\media-1.7.0\META-INF\com\android\build\gradle\aar-metadata.properties. The minCompileSdk (33) specified in a dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties) is greater than this module's compileSdkVersion (android-28). Dependency: androidx.recyclerview:recyclerview:1.3.0. AAR metadata file: C:\Users\WTH\.gradle\caches\transforms-3\85e794902d56734e4eebec75dc021b48\transformed\recyclerview-1.3.0\META-INF\com\android\build\gradle\aar-metadata.properties. The minCompileSdk (32) specified in a dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties) is greater than this module's compileSdkVersion (android-28). Dependency: androidx.customview:customview-poolingcontainer:1.0.0. AAR metadata file: C:\Users\WTH\.gradle\caches\transforms-3\11b2276a4e468f09e8370f31e1d7d3ae\transformed\jetified-customview-poolingcontainer-1.0.0\META-INF\com\android\build\gradle\aar-metadata.properties. The minCompileSdk (33) specified in a dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties) is greater than this module's compileSdkVersion (android-28). Dependency: androidx.core:core-ktx:1.9.0. AAR metadata file: C:\Users\WTH\.gradle\caches\transforms-3\24dbdd1120e9c289188c7e6e855e6468\transformed\jetified-core-ktx-1.9.0\META-INF\com\android\build\gradle\aar-metadata.properties. The minCompileSdk (33) specified in a dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties) is greater than this module's compileSdkVersion (android-28). Dependency: androidx.core:core:1.9.0. AAR metadata file: C:\Users\WTH\.gradle\caches\transforms-3\acd99a442914ab71e729da423f1b38d1\transformed\core-1.9.0\META-INF\com\android\build\gradle\aar-metadata.properties. The minCompileSdk (31) specified in a dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties) is greater than this module's compileSdkVersion (android-28). Dependency: androidx.lifecycle:lifecycle-process:2.4.0. AAR metadata file: C:\Users\WTH\.gradle\caches\transforms-3\0e4a425e61d135d109d64d5f17d999df\transformed\jetified-lifecycle-process-2.4.0\META-INF\com\android\build\gradle\aar-metadata.properties. The minCompileSdk (31) specified in a dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties) is greater than this module's compileSdkVersion (android-28). Dependency: androidx.lifecycle:lifecycle-runtime:2.4.0. AAR metadata file: C:\Users\WTH\.gradle\caches\transforms-3\bca1bb61c15ab5807e64593ca04debef\transformed\lifecycle-runtime-2.4.0\META-INF\com\android\build\gradle\aar-metadata.properties. The minCompileSdk (33) specified in a dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties) is greater than this module's compileSdkVersion (android-28). Dependency: androidx.annotation:annotation-experimental:1.3.1. AAR metadata file: C:\Users\WTH\.gradle\caches\transforms-3\5841b81257887d24955e27236f2e725f\transformed\jetified-annotation-experimental-1.3.1\META-INF\com\android\build\gradle\aar-metadata.properties. 解决上述rebuild project后的报错

filetype

Failed to compile with 1 error 08:58:37 error in ./node_modules/md-editor-v3/node_modules/lru-cache/dist/esm/index.js Syntax Error: D:\CCJ\SouceCode\Exercise Code\Exercise\2025\07\vue3-v6-OK\cqaos-web-v1\node_modules\md-editor-v3\node_modules\lru-cache\dist\esm\index.js: Class private methods are not enabled. Please add `@babel/plugin-transform-private-methods` to your configuration. 430 | return this.#keyMap.has(key) ? Infinity : 0; 431 | } > 432 | #initializeTTLTracking() { | ^ 433 | const ttls = new ZeroArray(this.#max); 434 | const starts = new ZeroArray(this.#max); 435 | this.#ttls = ttls; at transformFile.next (<anonymous>) at run.next (<anonymous>) at transform.next (<anonymous>) ERROR in ./src/views/document/docEdit.vue Module Error (from ./node_modules/vue-loader/dist/index.js): At least one <template> or <script> is required in a single file component. D:\CCJ\SouceCode\Exercise Code\Exercise\2025\07\vue3-v6-OK\cqaos-web-v1\src\views\document\docEdit.vue @ ./src/ lazy ^\.\/.*\/.*\.vue$ namespace object ./views/document/docEdit.vue @ ./src/store/user.ts 66:52-100 @ ./src/permission.ts 5:0-44 22:20-32 @ ./src/main.ts 6:0-34 29:10-16 ERROR in ./node_modules/md-editor-v3/node_modules/lru-cache/dist/esm/index.js Module build failed (from ./node_modules/babel-loader/lib/index.js): SyntaxError: D:\CCJ\SouceCode\Exercise Code\Exercise\2025\07\vue3-v6-OK\cqaos-web-v1\node_modules\md-editor-v3\node_modules\lru-cache\dist\esm\index.js: Class private methods are not enabled. Please add `@babel/plugin-transform-private-methods` to your configuration. 430 | return this.#keyMap.has(key) ? Infinity : 0; 431 | } > 432 | #initializeTTLTracking() { | ^ 433 | const ttls = new ZeroArray(this.#max); 434 | const starts = new ZeroArray(this.#max); 435 | this.#ttls = ttls; at File.buildCodeFrameError (D:\CCJ\SouceCode\Exercise Code\Exercise\2025\07\vue3-v6-OK\cqaos-web-v1\node_modules\@babel\core\lib\transformation\file\file.js:200:12) at NodePath.buildCodeFrameError (D:\CCJ\SouceCode\Exercise Code\Exercise\2025\07\vue3-v6-OK\cqaos-web-v1\node_modules\@babel\traverse\lib\path\index.js:118:21) at shouldTransform (D:\CCJ\SouceCode\Exercise Code\Exercise\2025\07\vue3-v6-OK\cqaos-web-v1\node_modules\@babel\helper-create-class-features-plugin\lib\features.js:130:29) at PluginPass.Class (D:\CCJ\SouceCode\Exercise Code\Exercise\2025\07\vue3-v6-OK\cqaos-web-v1\node_modules\@babel\helper-create-class-features-plugin\lib\index.js:110:44) at newFn (D:\CCJ\SouceCode\Exercise Code\Exercise\2025\07\vue3-v6-OK\cqaos-web-v1\node_modules\@babel\traverse\lib\visitors.js:172:14) at NodePath._call (D:\CCJ\SouceCode\Exercise Code\Exercise\2025\07\vue3-v6-OK\cqaos-web-v1\node_modules\@babel\traverse\lib\path\context.js:49:20) at NodePath.call (D:\CCJ\SouceCode\Exercise Code\Exercise\2025\07\vue3-v6-OK\cqaos-web-v1\node_modules\@babel\traverse\lib\path\context.js:39:18) at NodePath.visit (D:\CCJ\SouceCode\Exercise Code\Exercise\2025\07\vue3-v6-OK\cqaos-web-v1\node_modules\@babel\traverse\lib\path\context.js:88:31) at TraversalContext.visitQueue (D:\CCJ\SouceCode\Exercise Code\Exercise\2025\07\vue3-v6-OK\cqaos-web-v1\node_modules\@babel\traverse\lib\context.js:90:16) at TraversalContext.visitSingle (D:\CCJ\SouceCode\Exercise Code\Exercise\2025\07\vue3-v6-OK\cqaos-web-v1\node_modules\@babel\traverse\lib\context.js:66:19) at TraversalContext.visit (D:\CCJ\SouceCode\Exercise Code\Exercise\2025\07\vue3-v6-OK\cqaos-web-v1\node_modules\@babel\traverse\lib\context.js:113:19) at traverseNode (D:\CCJ\SouceCode\Exercise Code\Exercise\2025\07\vue3-v6-OK\cqaos-web-v1\node_modules\@babel\traverse\lib\traverse-node.js:131:17) at NodePath.visit (D:\CCJ\SouceCode\Exercise Code\Exercise\2025\07\vue3-v6-OK\cqaos-web-v1\node_modules\@babel\traverse\lib\path\context.js:94:52) at TraversalContext.visitQueue (D:\CCJ\SouceCode\Exercise Code\Exercise\2025\07\vue3-v6-OK\cqaos-web-v1\node_modules\@babel\traverse\lib\context.js:90:16) at TraversalContext.visitMultiple (D:\CCJ\SouceCode\Exercise Code\Exercise\2025\07\vue3-v6-OK\cqaos-web-v1\node_modules\@babel\traverse\lib\context.js:62:17) at TraversalContext.visit (D:\CCJ\SouceCode\Exercise Code\Exercise\2025\07\vue3-v6-OK\cqaos-web-v1\node_modules\@babel\traverse\lib\context.js:111:19) at traverseNode (D:\CCJ\SouceCode\Exercise Code\Exercise\2025\07\vue3-v6-OK\cqaos-web-v1\node_modules\@babel\traverse\lib\traverse-node.js:131:17) at NodePath.visit (D:\CCJ\SouceCode\Exercise Code\Exercise\2025\07\vue3-v6-OK\cqaos-web-v1\node_modules\@babel\traverse\lib\path\context.js:94:52) at TraversalContext.visitQueue (D:\CCJ\SouceCode\Exercise Code\Exercise\2025\07\vue3-v6-OK\cqaos-web-v1\node_modules\@babel\traverse\lib\context.js:90:16) at TraversalContext.visitSingle (D:\CCJ\SouceCode\Exercise Code\Exercise\2025\07\vue3-v6-OK\cqaos-web-v1\node_modules\@babel\traverse\lib\context.js:66:19) at TraversalContext.visit (D:\CCJ\SouceCode\Exercise Code\Exercise\2025\07\vue3-v6-OK\cqaos-web-v1\node_modules\@babel\traverse\lib\context.js:113:19) at traverseNode (D:\CCJ\SouceCode\Exercise Code\Exercise\2025\07\vue3-v6-OK\cqaos-web-v1\node_modules\@babel\traverse\lib\traverse-node.js:131:17) at traverse (D:\CCJ\SouceCode\Exercise Code\Exercise\2025\07\vue3-v6-OK\cqaos-web-v1\node_modules\@babel\traverse\lib\index.js:53:34) at transformFile (D:\CCJ\SouceCode\Exercise Code\Exercise\2025\07\vue3-v6-OK\cqaos-web-v1\node_modules\@babel\core\lib\transformation\index.js:80:31) at transformFile.next (<anonymous>) at run (D:\CCJ\SouceCode\Exercise Code\Exercise\2025\07\vue3-v6-OK\cqaos-web-v1\node_modules\@babel\core\lib\transformation\index.js:25:12) at run.next (<anonymous>) at transform (D:\CCJ\SouceCode\Exercise Code\Exercise\2025\07\vue3-v6-OK\cqaos-web-v1\node_modules\@babel\core\lib\transform.js:22:33) at transform.next (<anonymous>) at step (D:\CCJ\SouceCode\Exercise Code\Exercise\2025\07\vue3-v6-OK\cqaos-web-v1\node_modules\gensync\index.js:261:32) at D:\CCJ\SouceCode\Exercise Code\Exercise\2025\07\vue3-v6-OK\cqaos-web-v1\node_modules\gensync\index.js:273:13 at async.call.result.err.err (D:\CCJ\SouceCode\Exercise Code\Exercise\2025\07\vue3-v6-OK\cqaos-web-v1\node_modules\gensync\index.js:223:11) @ ./node_modules/md-editor-v3/lib/es/chunks/index3.mjs 18:0-37 140:25-33 @ ./node_modules/md-editor-v3/lib/es/index.mjs 23:0-51 1336:14-21 1337:40-47 24:0-46 1343:0-315 @ ./src/main.ts 12:0-40 19:10-18 webpack compiled with 2 errors有爆粗

filetype

var cw, ch, ratio = 0.546875; var game = document.getElementById('game'), btnArea = document.getElementById('btnArea'), hintBtn = document.getElementById('hintBtn'), replayBtn = document.getElementById('replayBtn'), timeLimit = 60*1000, // in millisec timeLeft, timeInt, lastBtn, hint, msTilHint, art = ['😄','🤣','🙂','🙃','😉','😇','😍','🤥','😘','😚','😛','😜','😋','🤗','🤔','🤐','😶','🤑','😏','🙄','😳','😬','😴','🤕','🤠','🤧','😢','😵','😎','🤓','😡','🤢','😭','😫','😠'], found = 0; // Make 16 btn <divs> for (var i=1; i<=16; i++){ var b; if (i==1) b = document.getElementById('b1'); else { b = document.getElementById('b1').cloneNode(true); b.id = 'b'+(i); btnArea.appendChild(b); } b.onclick = b.ontouchend = btnClick; } // Initial states... new TimelineMax({onStart:populate}) .set(game, {userSelect:'none'}) .set('.btn', {width:90, height:90, borderRadius:'50%', border:'3px solid transparent', textAlign:'center', fontSize:72, lineHeight:'86px', cursor:'pointer'}) .set(hintBtn, {right:15, bottom:15, width:75, fontSize:25, textAlign:'center', cursor:'pointer', autoAlpha:0}) .set('.foundTxt', {left:0, top:30, width:'100%', fontSize:35, textAlign:'center', textContent:'Find the matching pair...', fontWeight:300, letterSpacing:0.25}) .set('.timeTxt', {left:30, top:20, fontSize:50}) .set('.timePlus', {left:58, top:75, fontSize:25, alpha:0}) .set('.end', {width:'100%', height:'100%', background:'rgba(255,255,255,0.1)', autoAlpha:0, cursor:'pointer'}) .set('.rewardTxt', {textAlign:'center', top:257, width:'100%', fontSize:25, fontWeight:300}) .set('.endTxt', {textAlign:'center', top:257, width:'100%', fontSize:25, fontWeight:300}) .set(replayBtn, {left:400, top:275, scale:0.6, transformOrigin:'120px 130px'}) .to('#container', 0.2, {alpha:1, ease:Power2.easeIn}, 0) hintBtn.onclick = hintBtn.ontouchend = function(e){ if (e.type=='touchend') hintBtn.onclick = undefined; TweenMax.set(hintBtn, {textContent:hint, fontSize:35}) } function populate() { lastBtn = undefined; msTilHint = 5000; TweenMax.set(hintBtn, {autoAlpha:0, textContent:"Hint?", fontSize:25}); TweenMax.staggerFromTo('.btn', 0.3, {scale:0.2, alpha:0, rotation:1}, {rotation:0, alpha:1, scale:1, ease:Back.easeOut.config(4), stagger:{ grid:[4,4], from:"center", amount:0.2} }); var btns = []; for (var i=0; i<15; i++) makeNewNum(); function makeNewNum(){ var n = art[Math.ceil(rand(0, art.length-1))], valExists = false; for (var i=0; i<btns.length; i++) if (n==btns[i]) valExists = true; (valExists) ? makeNewNum() : btns.push(n); } hint = btns[14]; btns.push(btns[14]); shuffleArray(btns); for (var b=1; b<=16; b++) window['b'+b].textContent = btns[b-1]; } function btnClick(e){ if (e.type=='touchend') e.currentTarget.onclick = undefined; if (timeInt==undefined) { timeLeft = timeLimit; timeInt = setInterval(updateTime, 10); } var b = e.currentTarget; TweenMax.to(b, 0.05, {scale:0.95, yoyo:true, repeat:1}); if (lastBtn!=undefined && lastBtn!=b) { if (b.textContent==lastBtn.textContent) { //matched found++; timeLeft+=5000; //+time new TimelineMax({onComplete:populate}) .set('.foundTxt', {textContent:'Found: ' + found, fontWeight:500}, 0) .to('.timePlus', 0.1, {alpha:1, yoyo:true, repeat:1, repeatDelay:0.4}, 0) .fromTo('.timePlus', 0.3, {scale:0, rotation:0.1}, {scale:1, rotation:0}, 0) .to([b,lastBtn], 0.1, {border:'3px solid #08c04d'}, 0) .to(b, 0.3, {rotation:1, scale:0.8, ease:Back.easeIn.config(7), yoyo:true, repeat:1}, 0) .to(lastBtn, 0.3, {rotation:1, scale:0.8, ease:Back.easeIn.config(7), yoyo:true, repeat:1}, 0) .to('.btn', 0.1, {border:'3px solid transparent'}, 0.5) return; } else { //not matched TweenMax.to(lastBtn, 0.1, {border:'3px solid transparent'}) } } TweenMax.to(b, 0.1, {border:'3px solid #006da6'}); lastBtn=e.currentTarget; } function updateTime(){ if (timeLeft>0){ timeLeft-=10; var mil = Math.floor(timeLeft%1000/10); var sec = Math.floor(timeLeft/1000); if (mil<10) mil = "0"+mil; if (sec<10) sec = "0"+sec; var t = sec + ":" + mil; TweenMax.set('.timeTxt', {textContent:t}); (msTilHint<1) ? TweenMax.to(hintBtn, 0.5, {autoAlpha:1}) : msTilHint-=10; } else { // Game over clearInterval(timeInt); timeInt = undefined; if (!found) { TweenMax.set('.foundTxt', {textContent:'Found: 0', fontWeight:500}); TweenMax.set('.rewardTxt', {textContent:''}); } else { $.ajax({ url: '/api/games/emojiPair/score', type: 'POST', data: JSON.stringify({"founds": found}), cache: false, headers: {'csrfToken': Label.csrfToken}, success: function (result, textStatus) { if (0 === result.code) { if (found > 30) { TweenMax.set('.rewardTxt', {textContent: hint + " 30积分奖励已到账 " + hint, fontSize: 35}); } else { TweenMax.set('.rewardTxt', {textContent: hint + " " + found + "积分奖励已到账 " + hint, fontSize: 35}); } } else { TweenMax.set('.rewardTxt', {textContent: ''}); } } }); } TweenMax.set('.endTxt', {textContent: hint + " Try again? " + hint, fontSize: 25}); new TimelineMax() .to('.timeTxt', 0.3, {autoAlpha:0}, 0) .to(hintBtn, 0.3, {autoAlpha:0}, 0) .to(btnArea, 0.3, {autoAlpha:0}, 0) .to('.btn', 0.1, {border:'3px solid transparent'}, 0.3) .fromTo('.foundTxt', 0.4, {rotation:0.1}, {rotation:0, scale:2.5, y:130, ease:Power2.easeInOut}, 0.2) .to('.end', 0.6, {autoAlpha:1, ease:Power2.easeInOut}, 0) .fromTo(replayBtn, 1.0, {rotation:360, scale:0}, {scale:0.6, rotation:0, ease:Power1.easeInOut}, 0.5) } } replayBtn.onclick = replayBtn.ontouchend = function(){ new TimelineMax() .to(replayBtn, 0.5, {rotation:-180, scale:0, ease:Back.easeIn.config(3)}, 0) .fromTo('.foundTxt', 0.4, {rotation:0.1}, {rotation:0, scale:1, y:0, ease:Power1.easeInOut}, 0.4) .to('.end', 0.3, {autoAlpha:0}, 0.5) .to(['.timeTxt',btnArea], 0.3, {autoAlpha:1}, 0.8) .call(function(){ // Reset game... TweenMax.set('.foundTxt', {textContent:'Found: 0'}); TweenMax.set('.timeTxt', {textContent:'60:00'}); //gameover tip found = 0; lastBtn = hint = undefined; populate(); }, null, null, 0.8) } /* Browser resize */ function doResize() { cw = container.clientWidth; ch = container.clientHeight; if (cw>1024){ cw=1024; ch=560; } //max stage dimensions TweenMax.set('.fs', {transformOrigin:'0 0', scale:(cw*ratio)/560}); new TimelineMax() .set('#b1', {left:320, top:100}) .set('#b2', {left:420, top:100}) .set('#b3', {left:520, top:100}) .set('#b4', {left:620, top:100}) .set('#b5', {left:320, top:200}) .set('#b6', {left:420, top:200}) .set('#b7', {left:520, top:200}) .set('#b8', {left:620, top:200}) .set('#b9', {left:320, top:300}) .set('#b10', {left:420, top:300}) .set('#b11', {left:520, top:300}) .set('#b12', {left:620, top:300}) .set('#b13', {left:320, top:400}) .set('#b14', {left:420, top:400}) .set('#b15', {left:520, top:400}) .set('#b16', {left:620, top:400}) } doResize(); window.addEventListener("resize", doResize); /* Helper Functions */ function shuffleArray(array) { for (var i = array.length - 1; i > 0; i--) { var j = Math.floor(Math.random() * (i + 1)); var temp = array[i]; array[i] = array[j]; array[j] = temp; } } function rand(min, max) { min = min || 0; max = max || 1; return min + (max-min)*Math.random(); } 解读

LeonardoLin
  • 粉丝: 27
上传资源 快速赚钱