浏览代码

完善登录页的UI替换

mojunshou 8 月之前
父节点
当前提交
360df33e0d
共有 25 个文件被更改,包括 1032 次插入1098 次删除
  1. 187 212
      assets/bundle/common/prefab/setting.prefab
  2. 2 2
      assets/bundle/gui/eliminate/prefab/redPackeItem.prefab
  3. 6 6
      assets/bundle/gui/eliminate/prefab/redPacketWithdrawal.prefab
  4. 160 332
      assets/bundle/gui/eliminate/prefab/wechatWithdrawal.prefab
  5. 125 363
      assets/bundle/gui/loading/loading.prefab
  6. 二进制
      assets/bundle/gui/loading/texture/background.png
  7. 二进制
      assets/bundle/gui/loading/texture/bg.png
  8. 44 45
      assets/bundle/gui/loading/texture/bg.png.meta
  9. 二进制
      assets/bundle/gui/loading/texture/btn_wxlogin.png
  10. 34 34
      assets/bundle/gui/loading/texture/background.png.meta
  11. 二进制
      assets/bundle/gui/loading/texture/icon_agree.png
  12. 134 0
      assets/bundle/gui/loading/texture/icon_agree.png.meta
  13. 二进制
      assets/bundle/gui/loading/texture/icon_disagree.png
  14. 134 0
      assets/bundle/gui/loading/texture/icon_disagree.png.meta
  15. 二进制
      assets/bundle/gui/loading/texture/icon_loading_bar.png
  16. 22 22
      assets/bundle/gui/loading/texture/icon_loading_bar.png.meta
  17. 二进制
      assets/bundle/gui/loading/texture/panel_loading_bottom_frame.png
  18. 20 20
      assets/bundle/gui/loading/texture/panel_loading_bottom_frame.png.meta
  19. 5 3
      assets/resources/config.json
  20. 4 2
      assets/script/game/account/model/AccountModelComp.ts
  21. 78 26
      assets/script/game/common/manager/CocosHandler.ts
  22. 27 0
      assets/script/game/common/manager/MessgageEvent.ts
  23. 9 0
      assets/script/game/common/manager/MessgageEvent.ts.meta
  24. 32 28
      assets/script/game/common/setting/SettingViewComp.ts
  25. 9 3
      assets/script/game/common/tips/ClickEventHandler.ts

文件差异内容过多而无法显示
+ 187 - 212
assets/bundle/common/prefab/setting.prefab


+ 2 - 2
assets/bundle/gui/eliminate/prefab/redPackeItem.prefab

@@ -241,7 +241,7 @@
     },
     "_type": 0,
     "_fillType": 0,
-    "_sizeMode": 1,
+    "_sizeMode": 0,
     "_fillCenter": {
       "__type__": "cc.Vec2",
       "x": 0,
@@ -1847,7 +1847,7 @@
       "a": 255
     },
     "_spriteFrame": {
-      "__uuid__": "b9bfe0ba-07d0-44f2-830e-9c3bca5c517a@f9941",
+      "__uuid__": "87a964e5-292c-4697-b12c-1060ac7f3be0@f9941",
       "__expectedType__": "cc.SpriteFrame"
     },
     "_type": 1,

+ 6 - 6
assets/bundle/gui/eliminate/prefab/redPacketWithdrawal.prefab

@@ -137,7 +137,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 720,
-      "height": 1280
+      "height": 1600
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -173,12 +173,12 @@
       "a": 255
     },
     "_spriteFrame": {
-      "__uuid__": "2eee0fd4-17e0-49cb-8dab-641e4c7394b2@f9941",
+      "__uuid__": "ca18e677-aff4-4e11-ba09-5a70bcf9ef69@f9941",
       "__expectedType__": "cc.SpriteFrame"
     },
     "_type": 0,
     "_fillType": 0,
-    "_sizeMode": 1,
+    "_sizeMode": 0,
     "_fillCenter": {
       "__type__": "cc.Vec2",
       "x": 0,
@@ -1425,7 +1425,7 @@
     },
     "_type": 0,
     "_fillType": 0,
-    "_sizeMode": 1,
+    "_sizeMode": 0,
     "_fillCenter": {
       "__type__": "cc.Vec2",
       "x": 0,
@@ -3464,7 +3464,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 720,
-      "height": 1280
+      "height": 1600
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -3541,7 +3541,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 720,
-      "height": 1280
+      "height": 1600
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",

文件差异内容过多而无法显示
+ 160 - 332
assets/bundle/gui/eliminate/prefab/wechatWithdrawal.prefab


文件差异内容过多而无法显示
+ 125 - 363
assets/bundle/gui/loading/loading.prefab


二进制
assets/bundle/gui/loading/texture/background.png


二进制
assets/bundle/gui/loading/texture/bg.png


+ 44 - 45
assets/bundle/gui/loading/texture/bg.png.meta

@@ -2,7 +2,7 @@
   "ver": "1.0.27",
   "importer": "image",
   "imported": true,
-  "uuid": "0021cb5a-e4f0-4709-b0b6-5e21875720b7",
+  "uuid": "9b063201-1089-458a-a8c3-9ffb0ea4b1cb",
   "files": [
     ".json",
     ".png"
@@ -10,60 +10,49 @@
   "subMetas": {
     "6c48a": {
       "importer": "texture",
-      "uuid": "0021cb5a-e4f0-4709-b0b6-5e21875720b7@6c48a",
+      "uuid": "9b063201-1089-458a-a8c3-9ffb0ea4b1cb@6c48a",
       "displayName": "bg",
       "id": "6c48a",
       "name": "texture",
-      "ver": "1.0.22",
-      "imported": true,
-      "files": [
-        ".json"
-      ],
-      "subMetas": {},
       "userData": {
         "wrapModeS": "clamp-to-edge",
         "wrapModeT": "clamp-to-edge",
+        "imageUuidOrDatabaseUri": "9b063201-1089-458a-a8c3-9ffb0ea4b1cb",
+        "isUuid": true,
+        "visible": false,
         "minfilter": "linear",
         "magfilter": "linear",
         "mipfilter": "none",
-        "premultiplyAlpha": false,
-        "anisotropy": 1,
-        "isUuid": true,
-        "imageUuidOrDatabaseUri": "0021cb5a-e4f0-4709-b0b6-5e21875720b7",
-        "visible": false
-      }
+        "anisotropy": 0
+      },
+      "ver": "1.0.22",
+      "imported": true,
+      "files": [
+        ".json"
+      ],
+      "subMetas": {}
     },
     "f9941": {
       "importer": "sprite-frame",
-      "uuid": "0021cb5a-e4f0-4709-b0b6-5e21875720b7@f9941",
+      "uuid": "9b063201-1089-458a-a8c3-9ffb0ea4b1cb@f9941",
       "displayName": "bg",
       "id": "f9941",
       "name": "spriteFrame",
-      "ver": "1.0.12",
-      "imported": true,
-      "files": [
-        ".json"
-      ],
-      "subMetas": {},
       "userData": {
-        "trimType": "auto",
         "trimThreshold": 1,
         "rotated": false,
         "offsetX": 0,
         "offsetY": 0,
         "trimX": 0,
         "trimY": 0,
-        "width": 1600,
-        "height": 720,
-        "rawWidth": 1600,
-        "rawHeight": 720,
+        "width": 718,
+        "height": 1600,
+        "rawWidth": 718,
+        "rawHeight": 1600,
         "borderTop": 0,
         "borderBottom": 0,
         "borderLeft": 0,
         "borderRight": 0,
-        "isUuid": true,
-        "imageUuidOrDatabaseUri": "0021cb5a-e4f0-4709-b0b6-5e21875720b7@6c48a",
-        "atlasUuid": "",
         "packable": true,
         "pixelsToUnit": 100,
         "pivotX": 0.5,
@@ -71,17 +60,17 @@
         "meshType": 0,
         "vertices": {
           "rawPosition": [
+            -359,
             -800,
-            -360,
-            0,
-            800,
-            -360,
             0,
+            359,
             -800,
-            360,
             0,
+            -359,
+            800,
+            0,
+            359,
             800,
-            360,
             0
           ],
           "indexes": [
@@ -94,12 +83,12 @@
           ],
           "uv": [
             0,
-            720,
             1600,
-            720,
+            718,
+            1600,
             0,
             0,
-            1600,
+            718,
             0
           ],
           "nuv": [
@@ -113,23 +102,33 @@
             1
           ],
           "minPos": [
+            -359,
             -800,
-            -360,
             0
           ],
           "maxPos": [
+            359,
             800,
-            360,
             0
           ]
-        }
-      }
+        },
+        "isUuid": true,
+        "imageUuidOrDatabaseUri": "9b063201-1089-458a-a8c3-9ffb0ea4b1cb@6c48a",
+        "atlasUuid": "",
+        "trimType": "auto"
+      },
+      "ver": "1.0.12",
+      "imported": true,
+      "files": [
+        ".json"
+      ],
+      "subMetas": {}
     }
   },
   "userData": {
     "type": "sprite-frame",
-    "redirect": "0021cb5a-e4f0-4709-b0b6-5e21875720b7@6c48a",
-    "hasAlpha": false,
-    "fixAlphaTransparencyArtifacts": false
+    "hasAlpha": true,
+    "fixAlphaTransparencyArtifacts": false,
+    "redirect": "9b063201-1089-458a-a8c3-9ffb0ea4b1cb@6c48a"
   }
 }

二进制
assets/bundle/gui/loading/texture/btn_wxlogin.png


+ 34 - 34
assets/bundle/gui/loading/texture/background.png.meta

@@ -2,7 +2,7 @@
   "ver": "1.0.27",
   "importer": "image",
   "imported": true,
-  "uuid": "95e289e0-8738-4b50-95c3-ba305911dad5",
+  "uuid": "5f331d85-d1fc-4d7d-a274-6c18380305da",
   "files": [
     ".json",
     ".png"
@@ -10,20 +10,20 @@
   "subMetas": {
     "6c48a": {
       "importer": "texture",
-      "uuid": "95e289e0-8738-4b50-95c3-ba305911dad5@6c48a",
-      "displayName": "background",
+      "uuid": "5f331d85-d1fc-4d7d-a274-6c18380305da@6c48a",
+      "displayName": "btn_wxlogin",
       "id": "6c48a",
       "name": "texture",
       "userData": {
         "wrapModeS": "clamp-to-edge",
         "wrapModeT": "clamp-to-edge",
+        "imageUuidOrDatabaseUri": "5f331d85-d1fc-4d7d-a274-6c18380305da",
+        "isUuid": true,
+        "visible": false,
         "minfilter": "linear",
         "magfilter": "linear",
         "mipfilter": "none",
-        "anisotropy": 0,
-        "isUuid": true,
-        "imageUuidOrDatabaseUri": "95e289e0-8738-4b50-95c3-ba305911dad5",
-        "visible": false
+        "anisotropy": 0
       },
       "ver": "1.0.22",
       "imported": true,
@@ -34,22 +34,21 @@
     },
     "f9941": {
       "importer": "sprite-frame",
-      "uuid": "95e289e0-8738-4b50-95c3-ba305911dad5@f9941",
-      "displayName": "background",
+      "uuid": "5f331d85-d1fc-4d7d-a274-6c18380305da@f9941",
+      "displayName": "btn_wxlogin",
       "id": "f9941",
       "name": "spriteFrame",
       "userData": {
-        "trimType": "auto",
         "trimThreshold": 1,
         "rotated": false,
         "offsetX": 0,
         "offsetY": 0,
         "trimX": 0,
         "trimY": 0,
-        "width": 720,
-        "height": 1280,
-        "rawWidth": 720,
-        "rawHeight": 1280,
+        "width": 596,
+        "height": 134,
+        "rawWidth": 596,
+        "rawHeight": 134,
         "borderTop": 0,
         "borderBottom": 0,
         "borderLeft": 0,
@@ -61,17 +60,17 @@
         "meshType": 0,
         "vertices": {
           "rawPosition": [
-            -360,
-            -640,
+            -298,
+            -67,
             0,
-            360,
-            -640,
+            298,
+            -67,
             0,
-            -360,
-            640,
+            -298,
+            67,
             0,
-            360,
-            640,
+            298,
+            67,
             0
           ],
           "indexes": [
@@ -84,12 +83,12 @@
           ],
           "uv": [
             0,
-            1280,
-            720,
-            1280,
+            134,
+            596,
+            134,
             0,
             0,
-            720,
+            596,
             0
           ],
           "nuv": [
@@ -103,19 +102,20 @@
             1
           ],
           "minPos": [
-            -360,
-            -640,
+            -298,
+            -67,
             0
           ],
           "maxPos": [
-            360,
-            640,
+            298,
+            67,
             0
           ]
         },
         "isUuid": true,
-        "imageUuidOrDatabaseUri": "95e289e0-8738-4b50-95c3-ba305911dad5@6c48a",
-        "atlasUuid": ""
+        "imageUuidOrDatabaseUri": "5f331d85-d1fc-4d7d-a274-6c18380305da@6c48a",
+        "atlasUuid": "",
+        "trimType": "auto"
       },
       "ver": "1.0.12",
       "imported": true,
@@ -126,9 +126,9 @@
     }
   },
   "userData": {
-    "hasAlpha": false,
     "type": "sprite-frame",
+    "hasAlpha": true,
     "fixAlphaTransparencyArtifacts": false,
-    "redirect": "95e289e0-8738-4b50-95c3-ba305911dad5@6c48a"
+    "redirect": "5f331d85-d1fc-4d7d-a274-6c18380305da@6c48a"
   }
 }

二进制
assets/bundle/gui/loading/texture/icon_agree.png


+ 134 - 0
assets/bundle/gui/loading/texture/icon_agree.png.meta

@@ -0,0 +1,134 @@
+{
+  "ver": "1.0.27",
+  "importer": "image",
+  "imported": true,
+  "uuid": "2ff92d6e-9d32-481c-a168-ac38fb2f0783",
+  "files": [
+    ".json",
+    ".png"
+  ],
+  "subMetas": {
+    "6c48a": {
+      "importer": "texture",
+      "uuid": "2ff92d6e-9d32-481c-a168-ac38fb2f0783@6c48a",
+      "displayName": "icon_agree",
+      "id": "6c48a",
+      "name": "texture",
+      "userData": {
+        "wrapModeS": "clamp-to-edge",
+        "wrapModeT": "clamp-to-edge",
+        "imageUuidOrDatabaseUri": "2ff92d6e-9d32-481c-a168-ac38fb2f0783",
+        "isUuid": true,
+        "visible": false,
+        "minfilter": "linear",
+        "magfilter": "linear",
+        "mipfilter": "none",
+        "anisotropy": 0
+      },
+      "ver": "1.0.22",
+      "imported": true,
+      "files": [
+        ".json"
+      ],
+      "subMetas": {}
+    },
+    "f9941": {
+      "importer": "sprite-frame",
+      "uuid": "2ff92d6e-9d32-481c-a168-ac38fb2f0783@f9941",
+      "displayName": "icon_agree",
+      "id": "f9941",
+      "name": "spriteFrame",
+      "userData": {
+        "trimThreshold": 1,
+        "rotated": false,
+        "offsetX": 0,
+        "offsetY": 0,
+        "trimX": 2,
+        "trimY": 2,
+        "width": 24,
+        "height": 24,
+        "rawWidth": 28,
+        "rawHeight": 28,
+        "borderTop": 0,
+        "borderBottom": 0,
+        "borderLeft": 0,
+        "borderRight": 0,
+        "packable": true,
+        "pixelsToUnit": 100,
+        "pivotX": 0.5,
+        "pivotY": 0.5,
+        "meshType": 0,
+        "vertices": {
+          "rawPosition": [
+            -12,
+            -12,
+            0,
+            12,
+            -12,
+            0,
+            -12,
+            12,
+            0,
+            12,
+            12,
+            0
+          ],
+          "indexes": [
+            0,
+            1,
+            2,
+            2,
+            1,
+            3
+          ],
+          "uv": [
+            2,
+            26,
+            26,
+            26,
+            2,
+            2,
+            26,
+            2
+          ],
+          "nuv": [
+            0.07142857142857142,
+            0.07142857142857142,
+            0.9285714285714286,
+            0.07142857142857142,
+            0.07142857142857142,
+            0.9285714285714286,
+            0.9285714285714286,
+            0.9285714285714286
+          ],
+          "minPos": [
+            -12,
+            -12,
+            0
+          ],
+          "maxPos": [
+            12,
+            12,
+            0
+          ]
+        },
+        "isUuid": true,
+        "imageUuidOrDatabaseUri": "2ff92d6e-9d32-481c-a168-ac38fb2f0783@6c48a",
+        "atlasUuid": "",
+        "trimType": "auto"
+      },
+      "ver": "1.0.12",
+      "imported": true,
+      "files": [
+        ".json"
+      ],
+      "subMetas": {}
+    }
+  },
+  "userData": {
+    "type": "sprite-frame",
+    "hasAlpha": true,
+    "fixAlphaTransparencyArtifacts": false,
+    "redirect": "2ff92d6e-9d32-481c-a168-ac38fb2f0783@6c48a"
+  }
+}

二进制
assets/bundle/gui/loading/texture/icon_disagree.png


+ 134 - 0
assets/bundle/gui/loading/texture/icon_disagree.png.meta

@@ -0,0 +1,134 @@
+{
+  "ver": "1.0.27",
+  "importer": "image",
+  "imported": true,
+  "uuid": "8e3d5939-0cca-4c14-b42a-26706f1e46a6",
+  "files": [
+    ".json",
+    ".png"
+  ],
+  "subMetas": {
+    "6c48a": {
+      "importer": "texture",
+      "uuid": "8e3d5939-0cca-4c14-b42a-26706f1e46a6@6c48a",
+      "displayName": "icon_disagree",
+      "id": "6c48a",
+      "name": "texture",
+      "userData": {
+        "wrapModeS": "clamp-to-edge",
+        "wrapModeT": "clamp-to-edge",
+        "imageUuidOrDatabaseUri": "8e3d5939-0cca-4c14-b42a-26706f1e46a6",
+        "isUuid": true,
+        "visible": false,
+        "minfilter": "linear",
+        "magfilter": "linear",
+        "mipfilter": "none",
+        "anisotropy": 0
+      },
+      "ver": "1.0.22",
+      "imported": true,
+      "files": [
+        ".json"
+      ],
+      "subMetas": {}
+    },
+    "f9941": {
+      "importer": "sprite-frame",
+      "uuid": "8e3d5939-0cca-4c14-b42a-26706f1e46a6@f9941",
+      "displayName": "icon_disagree",
+      "id": "f9941",
+      "name": "spriteFrame",
+      "userData": {
+        "trimThreshold": 1,
+        "rotated": false,
+        "offsetX": 0,
+        "offsetY": 0,
+        "trimX": 2,
+        "trimY": 2,
+        "width": 24,
+        "height": 24,
+        "rawWidth": 28,
+        "rawHeight": 28,
+        "borderTop": 0,
+        "borderBottom": 0,
+        "borderLeft": 0,
+        "borderRight": 0,
+        "packable": true,
+        "pixelsToUnit": 100,
+        "pivotX": 0.5,
+        "pivotY": 0.5,
+        "meshType": 0,
+        "vertices": {
+          "rawPosition": [
+            -12,
+            -12,
+            0,
+            12,
+            -12,
+            0,
+            -12,
+            12,
+            0,
+            12,
+            12,
+            0
+          ],
+          "indexes": [
+            0,
+            1,
+            2,
+            2,
+            1,
+            3
+          ],
+          "uv": [
+            2,
+            26,
+            26,
+            26,
+            2,
+            2,
+            26,
+            2
+          ],
+          "nuv": [
+            0.07142857142857142,
+            0.07142857142857142,
+            0.9285714285714286,
+            0.07142857142857142,
+            0.07142857142857142,
+            0.9285714285714286,
+            0.9285714285714286,
+            0.9285714285714286
+          ],
+          "minPos": [
+            -12,
+            -12,
+            0
+          ],
+          "maxPos": [
+            12,
+            12,
+            0
+          ]
+        },
+        "isUuid": true,
+        "imageUuidOrDatabaseUri": "8e3d5939-0cca-4c14-b42a-26706f1e46a6@6c48a",
+        "atlasUuid": "",
+        "trimType": "auto"
+      },
+      "ver": "1.0.12",
+      "imported": true,
+      "files": [
+        ".json"
+      ],
+      "subMetas": {}
+    }
+  },
+  "userData": {
+    "type": "sprite-frame",
+    "hasAlpha": true,
+    "fixAlphaTransparencyArtifacts": false,
+    "redirect": "8e3d5939-0cca-4c14-b42a-26706f1e46a6@6c48a"
+  }
+}

二进制
assets/bundle/gui/loading/texture/icon_loading_bar.png


+ 22 - 22
assets/bundle/gui/loading/texture/icon_loading_bar.png.meta

@@ -53,14 +53,14 @@
         "offsetY": 0,
         "trimX": 0,
         "trimY": 0,
-        "width": 549,
-        "height": 47,
-        "rawWidth": 549,
-        "rawHeight": 47,
+        "width": 326,
+        "height": 60,
+        "rawWidth": 326,
+        "rawHeight": 60,
         "borderTop": 0,
         "borderBottom": 0,
-        "borderLeft": 0,
-        "borderRight": 0,
+        "borderLeft": 42,
+        "borderRight": 52,
         "isUuid": true,
         "imageUuidOrDatabaseUri": "1ac049d7-c899-492a-89a7-4e8d85ce4cb1@6c48a",
         "atlasUuid": "",
@@ -71,17 +71,17 @@
         "meshType": 0,
         "vertices": {
           "rawPosition": [
-            -274.5,
-            -23.5,
+            -163,
+            -30,
             0,
-            274.5,
-            -23.5,
+            163,
+            -30,
             0,
-            -274.5,
-            23.5,
+            -163,
+            30,
             0,
-            274.5,
-            23.5,
+            163,
+            30,
             0
           ],
           "indexes": [
@@ -94,12 +94,12 @@
           ],
           "uv": [
             0,
-            47,
-            549,
-            47,
+            60,
+            326,
+            60,
             0,
             0,
-            549,
+            326,
             0
           ],
           "nuv": [
@@ -113,13 +113,13 @@
             1
           ],
           "minPos": [
-            -274.5,
-            -23.5,
+            -163,
+            -30,
             0
           ],
           "maxPos": [
-            274.5,
-            23.5,
+            163,
+            30,
             0
           ]
         }

二进制
assets/bundle/gui/loading/texture/panel_loading_bottom_frame.png


+ 20 - 20
assets/bundle/gui/loading/texture/panel_loading_bottom_frame.png.meta

@@ -53,10 +53,10 @@
         "offsetY": 0,
         "trimX": 0,
         "trimY": 0,
-        "width": 567,
-        "height": 65,
-        "rawWidth": 567,
-        "rawHeight": 65,
+        "width": 568,
+        "height": 68,
+        "rawWidth": 568,
+        "rawHeight": 68,
         "borderTop": 0,
         "borderBottom": 0,
         "borderLeft": 0,
@@ -71,17 +71,17 @@
         "meshType": 0,
         "vertices": {
           "rawPosition": [
-            -283.5,
-            -32.5,
+            -284,
+            -34,
             0,
-            283.5,
-            -32.5,
+            284,
+            -34,
             0,
-            -283.5,
-            32.5,
+            -284,
+            34,
             0,
-            283.5,
-            32.5,
+            284,
+            34,
             0
           ],
           "indexes": [
@@ -94,12 +94,12 @@
           ],
           "uv": [
             0,
-            65,
-            567,
-            65,
+            68,
+            568,
+            68,
             0,
             0,
-            567,
+            568,
             0
           ],
           "nuv": [
@@ -113,13 +113,13 @@
             1
           ],
           "minPos": [
-            -283.5,
-            -32.5,
+            -284,
+            -34,
             0
           ],
           "maxPos": [
-            283.5,
-            32.5,
+            284,
+            34,
             0
           ]
         }

+ 5 - 3
assets/resources/config.json

@@ -13,9 +13,11 @@
         "webSocketHeartTime": 6000,
         "webSocketReceiveTime": 10000,
         "webSocketReconnetTimeOut": 3000,
-        "gameName": "消消乐",
-        "gameVersion": "1.0.5",
-        "gameCompanyName": "广州市游戏科技有限公司"
+        "gameName": "疯狂消消乐",
+        "gameVersion": "当前版本 1.0.5",
+        "gameCompanyName": "广州市游戏科技有限公司",
+        "gamePrivacyUrl": "https://doc.v8dashen.com/doc/fc3ae42ddf3b5734",
+        "gameProtocolUrl": "https://doc.v8dashen.com/doc/f692eedce36f7fb1"
     },
     "gui": [
         {

+ 4 - 2
assets/script/game/account/model/AccountModelComp.ts

@@ -24,7 +24,9 @@ export class AccountModelComp extends ecs.Comp {
     /**游戏币*/
     GameCoin: number = 0;
     /**红包币*/
-    CashCoin:number = 0;
+    CashCoin: number = 0;
+    /**协议类型 1隐私 2用户*/
+    ProtocolType: number = 1;
 
     reset() {
         this.AccountName = null!;
@@ -34,5 +36,5 @@ export class AccountModelComp extends ecs.Comp {
         this.GameCoin = 0;
         this.CashCoin = 0;
     }
-    
+
 }

+ 78 - 26
assets/script/game/common/manager/CocosHandler.ts

@@ -2,14 +2,13 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-31 10:45:44
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-02 18:34:55
+ * @LastEditTime: 2025-04-07 10:16:02
  * @Description: CocosHandler 处理类负责与安卓交互
  */
 import { native } from 'cc';
-import { _decorator, Component, Node } from 'cc';
+import { _decorator } from 'cc';
 import { DeviceUtil } from 'db://oops-framework/core/utils/DeviceUtil';
 import { smc } from '../SingletonModuleComp';
-import { ecs } from 'db://oops-framework/libs/ecs/ECS';
 import { Account } from '../../account/Account';
 import { oops } from 'db://oops-framework/core/Oops';
 import { GameEvent } from '../config/GameEvent';
@@ -17,11 +16,9 @@ const { ccclass, property } = _decorator;
 
 type CocosHandlerType = {
     method: string;
-    param: string;
+    param?: string;
 }
 
-
-@ccclass('CocosHandler')
 export class CocosHandler {
 
     // 单例模式
@@ -33,28 +30,11 @@ export class CocosHandler {
         return this._inst;
     }
 
-
-    // 处理 Android 发送的消息
-    private onAndroidMessage(jsonStr: string) {
-        const data = JSON.parse(jsonStr);
-        console.log('Cocos 收到 Android 消息:', data);
-
-        // 处理逻辑
-        // 例如:根据 data 的内容执行不同的操作,不是每个回调都要处理
-    }
-
     // 发送消息到 Android
-    public async sendMessageToAndroid(json: CocosHandlerType) {
+    public async sendMessageToAndroid(data: CocosHandlerType) {
         if (DeviceUtil.isAndroid && DeviceUtil.isNative) {
-            let jsonStr = JSON.stringify(json);
-            console.log("js传给安卓的数据打印>>>>", jsonStr);
-            let result = await native.reflection.callStaticMethod("com/atmob/cocos/bridge/AtmobCocosBridge", "call", "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", jsonStr);
-            //等待上边安卓返回数据,再执行下边代码
-            if (result) {
-                let android_result = JSON.parse(result);
-                console.log("安卓返回数据打印>>>>>", android_result);
-                return android_result;
-            }
+            let result = await native.reflection.callStaticMethod("com/cocos/game/AtmobCocosCaller", "call", "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", data.method, data.param);
+            return result;
         }
     }
 
@@ -79,6 +59,78 @@ export class CocosHandler {
         return result;
     }
 
+    //获取隐私授权状态
+    async getPrivacyStatus() {
+        const data: CocosHandlerType = {
+            method: "system.privacy.get",
+        }
+        let result = await this.sendMessageToAndroid(data);
+        return result;
+    }
+
+    //保存隐私授权状态
+    async savePrivacyStatus(status: boolean) {
+        const param = {
+            "granted": status,
+        }
+        const data: CocosHandlerType = {
+            method: "privacy.grant.set",
+            param: JSON.stringify(param)
+        }
+        let result = await this.sendMessageToAndroid(data);
+        return result;
+    }
+
+
+    //打开隐私协议或者用户协议
+    openAgreement() {
+        const type = smc.account.AccountModel.ProtocolType;
+        console.log(">>>>>协议类型>>>>>>>>>>>>>>>>>>", type)
+        const param = {
+            "url": type == 1 ? oops.config.game.gamePrivacyUrl : oops.config.game.gameProtocolUrl
+        }
+        const data: CocosHandlerType = {
+            method: "system.browser.open",
+            param: JSON.stringify(param)
+        }
+        this.sendMessageToAndroid(data);
+    }
+
+    //方法請求
+    async methodRequest(type: number) {
+
+        let param = {};
+
+        switch (type) {
+            case 1:
+                break;
+            case 2:
+                break;
+
+        }
+
+        param = {
+            "url": "",
+            "callback":
+            {
+                "onSuccess": "CocosHandler.inst.methodRequest_success",
+                "onFaile": "CocosHandler.inst.methodRequest_fail"
+            },
+            " param": {
+
+
+            }
+        }
+
+        const data: CocosHandlerType = {
+            method: "request.post",
+            param: JSON.stringify(param)
+        }
+
+    }
+
+
+
 
     //===================安卓回调Cocos======================
     //微信登录成功回调

+ 27 - 0
assets/script/game/common/manager/MessgageEvent.ts

@@ -0,0 +1,27 @@
+/*
+ * @Author: mojunshou 1637302775@qq.com
+ * @Date: 2025-04-07 10:17:16
+ * @LastEditors: mojunshou 1637302775@qq.com
+ * @LastEditTime: 2025-04-07 10:35:53
+ * @Description: 消息定义
+ */
+
+const server_url = "https://www.baidu.com";
+
+
+export enum MessgageEvent {
+    /**微信登录*/
+    WechatLogin = server_url + "/project/playlet/v1/user/login",
+    /**账号信息*/
+    AccountInfo = server_url + "/project/playlet/v1/user/detail",
+    /**修改设置*/
+    ModifySetting = server_url + "/project/playlet/v1/user/updateSetting",
+    /**领取每日奖励*/
+    GetDailyReward = server_url + "/project/playlet/v1/daily/eliminationTsk/gain",
+    /**获取每日任务情况*/
+    GetDailyTask = server_url + "/project/playlet/v1/daily/eliminationTsk/info",
+    /**用户道具信息*/
+    UserItemInfo = server_url + "/project/playlet/v1/props/all",
+
+}
+

+ 9 - 0
assets/script/game/common/manager/MessgageEvent.ts.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "4.0.24",
+  "importer": "typescript",
+  "imported": true,
+  "uuid": "a7d9409c-76b3-4d46-b398-14241274c533",
+  "files": [],
+  "subMetas": {},
+  "userData": {}
+}

+ 32 - 28
assets/script/game/common/setting/SettingViewComp.ts

@@ -2,7 +2,7 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-20 15:40:20
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-03 15:38:50
+ * @LastEditTime: 2025-04-03 16:31:43
  * @Description:设置界面 
  */
 import { _decorator } from "cc";
@@ -16,20 +16,20 @@ import { Account } from "../../account/Account";
 import { ImageAsset, Texture2D, SpriteFrame, Sprite } from "cc";
 import { IRemoteOptions, resLoader } from "db://oops-framework/core/common/loader/ResLoader";
 import { Button } from "cc";
-
 const { ccclass, property } = _decorator;
 
 /** 视图层对象 */
 @ccclass('SettingViewComp')
 @ecs.register('SettingView', false)
 export class SettingViewComp extends CCVMParentComp {
+
     data: any = {
-        nickName: "金砖大王",
-        uid: "1234567890",
-        music_state: true,
-        effect_state: true
+        head_url: "",
+        uid: 100000,
     }
 
+
+
     @property(Button)
     private musicBtn: Button = null!;
 
@@ -45,8 +45,9 @@ export class SettingViewComp extends CCVMParentComp {
     start() {
         // const entity = this.ent as ecs.Entity;         // ecs.Entity 可转为当前模块的具体实体对象
         this.setButton();
-        this.updateHead();
         this.updateBtnState();
+        this.updateHead();
+
     }
 
     /** 视图对象通过 ecs.Entity.remove(SettingViewComp) 删除组件是触发组件处理自定义释放逻辑 */
@@ -67,22 +68,27 @@ export class SettingViewComp extends CCVMParentComp {
 
     //更新按钮状态
     private updateBtnState() {
-        const music_state = oops.storage.get("music_state");
-        const effect_state = oops.storage.get("effect_state");
-        if (music_state == "" || music_state == null) {
+        console.log("updateBtnState");
+
+        const music_state = oops.storage.getBoolean("music_state");
+        const effect_state = oops.storage.getBoolean("effect_state");
+        oops.log.logView(music_state, "music_state");
+        console.log("effect_state", effect_state);
+
+        if (music_state == null) {
             oops.storage.set("music_state", true);
             this._musicState = true;
         } else {
             // 将字符串转换为布尔值
-            let music_state_bool = music_state == "true" ? true : false;
+            let music_state_bool = music_state == true ? true : false;
             this._musicState = music_state_bool;
         }
-        if (effect_state == "" || effect_state == null) {
+        if (effect_state == null) {
             oops.storage.set("effect_state", true);
             this._effectState = true;
         } else {
             // 将字符串转换为布尔值
-            let effect_state_bool = effect_state == "true" ? true : false;
+            let effect_state_bool = effect_state == true ? true : false;
             this._effectState = effect_state_bool;
         }
         oops.audio.switchMusic = this._musicState;
@@ -104,20 +110,20 @@ export class SettingViewComp extends CCVMParentComp {
     //更新头像
     private updateHead() {
         let account = ecs.getEntity<Account>(Account);
-        let sprite = this.node.getChildByPath("Bg/btn_head/sp_head")!.uiSprite;
-        // let url = account.AccountModel.head;
-        let url = "http://www.kuaipng.com/Uploads/pic/w/2020/07-16/89010/water_89010_698_698_.png"
         this.data.uid = account.AccountModel.Uid;
-        var opt: IRemoteOptions = { ext: ".png" };
-        var onComplete = (err: Error | null, data: ImageAsset) => {
-            const texture = new Texture2D();
-            texture.image = data;
-
-            const spriteFrame = new SpriteFrame();
-            spriteFrame.texture = texture;
-            sprite.spriteFrame = spriteFrame;
-        }
-        resLoader.loadRemote<ImageAsset>(url, opt, onComplete);
+        let url = account.AccountModel.HeadUrl;
+        // let sprite = this.node.getChildByPath("Bg/btn_head/sp_head")!.uiSprite;
+        // let url = "http://www.kuaipng.com/Uploads/pic/w/2020/07-16/89010/water_89010_698_698_.png"
+        // var opt: IRemoteOptions = { ext: ".png" };
+        // var onComplete = (err: Error | null, data: ImageAsset) => {
+        //     const texture = new Texture2D();
+        //     texture.image = data;
+
+        //     const spriteFrame = new SpriteFrame();
+        //     spriteFrame.texture = texture;
+        //     sprite.spriteFrame = spriteFrame;
+        // }
+        // resLoader.loadRemote<ImageAsset>(url, opt, onComplete);
     }
 
 
@@ -157,8 +163,6 @@ export class SettingViewComp extends CCVMParentComp {
     //用户协议
     private btn_protocol() {
 
-
-
     }
 
 }

+ 9 - 3
assets/script/game/common/tips/ClickEventHandler.ts

@@ -2,13 +2,15 @@
  * @Author: mojunshou 1637302775@qq.com
  * @Date: 2025-03-19 17:46:09
  * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-03-20 10:31:42
+ * @LastEditTime: 2025-04-03 16:39:39
  * @Description: 用户协议和隐私协议点击事件
  */
 import { sys } from 'cc';
 import { _decorator, EventTouch } from 'cc';
 import { oops } from 'db://oops-framework/core/Oops';
 import { GameComponent } from "db://oops-framework/module/common/GameComponent";
+import { CocosHandler } from '../manager/CocosHandler';
+import { smc } from '../SingletonModuleComp';
 
 const { ccclass, property } = _decorator;
 
@@ -21,12 +23,16 @@ export class ClickEventHandler extends GameComponent {
         switch (param) {
             case "User Agreement":
                 // 在游戏内打开用户协议
-                sys.openURL("https://store.cocos.com/app/detail/3814");
+                // sys.openURL("https://store.cocos.com/app/detail/3814");
+                smc.account.AccountModel.ProtocolType = 1;
                 break;
             case "Privacy Policy":
                 // 在游戏内打开隐私协议
-                sys.openURL("https://store.cocos.com/app/detail/3814");
+                smc.account.AccountModel.ProtocolType = 2;
+                // sys.openURL("https://store.cocos.com/app/detail/3814");
                 break;
         }
+
+        CocosHandler.inst.openAgreement();
     }
 }