Browse Source

Merge branch 'master' of https://git.usgamewin.com/clientsweb/game_cocos_2c

# Conflicts:
#	assets/scripts/app/AppEvents.ts
baxi 1 week ago
parent
commit
e6e4d409da
55 changed files with 3269 additions and 5590 deletions
  1. 9 0
      assets/lobbyRes/public/avatar.meta
  2. 0 0
      assets/lobbyRes/public/avatar/1.png
  3. 2 2
      assets/lobbyRes/public/avatar/1.png.meta
  4. 0 0
      assets/lobbyRes/public/avatar/10.png
  5. 2 2
      assets/lobbyRes/public/avatar/10.png.meta
  6. 0 0
      assets/lobbyRes/public/avatar/2.png
  7. 2 2
      assets/lobbyRes/public/avatar/2.png.meta
  8. 0 0
      assets/lobbyRes/public/avatar/3.png
  9. 2 2
      assets/lobbyRes/public/avatar/3.png.meta
  10. 0 0
      assets/lobbyRes/public/avatar/4.png
  11. 2 2
      assets/lobbyRes/public/avatar/4.png.meta
  12. 0 0
      assets/lobbyRes/public/avatar/5.png
  13. 2 2
      assets/lobbyRes/public/avatar/5.png.meta
  14. 0 0
      assets/lobbyRes/public/avatar/6.png
  15. 2 2
      assets/lobbyRes/public/avatar/6.png.meta
  16. 0 0
      assets/lobbyRes/public/avatar/7.png
  17. 2 2
      assets/lobbyRes/public/avatar/7.png.meta
  18. 0 0
      assets/lobbyRes/public/avatar/8.png
  19. 2 2
      assets/lobbyRes/public/avatar/8.png.meta
  20. 0 0
      assets/lobbyRes/public/avatar/9.png
  21. 2 2
      assets/lobbyRes/public/avatar/9.png.meta
  22. 445 102
      assets/lobbyRes/ui/support/Support.prefab
  23. 122 434
      assets/lobbyRes/ui/userInfo/BindEmail.prefab
  24. 286 359
      assets/lobbyRes/ui/userInfo/BindPhone.prefab
  25. 14 3428
      assets/lobbyRes/ui/userInfo/ChangeAvatar.prefab
  26. 102 433
      assets/lobbyRes/ui/userInfo/ChangeEmail.prefab
  27. 10 4
      assets/lobbyRes/ui/userInfo/ChangeName.prefab
  28. 287 359
      assets/lobbyRes/ui/userInfo/ChangePhone.prefab
  29. 338 22
      assets/lobbyRes/ui/userInfo/UnbindAccount.prefab
  30. 1 1
      assets/lobbyRes/ui/userInfo/UnbindAccount.prefab.meta
  31. 455 103
      assets/lobbyRes/ui/userInfo/UserInfoView.prefab
  32. 6 0
      assets/scripts/api/LobbyApi.ts
  33. 6 0
      assets/scripts/api/LoginApi.ts
  34. 3 0
      assets/scripts/app/AppEvents.ts
  35. 143 20
      assets/scripts/components/button/OTPButton.ts
  36. 30 9
      assets/scripts/components/selectBox/SelectBox.ts
  37. 4 4
      assets/scripts/define/UIDefine.ts
  38. 6 2
      assets/scripts/framework/ui/UIManager.ts
  39. 38 4
      assets/scripts/modules/lobby/ui/LoginView/LoginView.ts
  40. 4 4
      assets/scripts/modules/lobby/ui/Register/Register.ts
  41. 4 4
      assets/scripts/modules/lobby/ui/ResetPsd/ResetPsd.ts
  42. 4 16
      assets/scripts/modules/lobby/ui/Support/Support.ts
  43. 0 66
      assets/scripts/modules/lobby/ui/UserInfoView/AccountUnlink.ts
  44. 66 24
      assets/scripts/modules/lobby/ui/UserInfoView/BindEmail.ts
  45. 68 24
      assets/scripts/modules/lobby/ui/UserInfoView/BindPhone.ts
  46. 48 28
      assets/scripts/modules/lobby/ui/UserInfoView/ChangeAvatar.ts
  47. 71 22
      assets/scripts/modules/lobby/ui/UserInfoView/ChangeEmail.ts
  48. 28 32
      assets/scripts/modules/lobby/ui/UserInfoView/ChangeName.ts
  49. 76 22
      assets/scripts/modules/lobby/ui/UserInfoView/ChangePhone.ts
  50. 84 0
      assets/scripts/modules/lobby/ui/UserInfoView/UnbindAccount.ts
  51. 0 0
      assets/scripts/modules/lobby/ui/UserInfoView/UnbindAccount.ts.meta
  52. 215 22
      assets/scripts/modules/lobby/ui/UserInfoView/UserInfoView.ts
  53. 117 9
      assets/scripts/store/mailStore/MailStore.ts
  54. 158 13
      assets/scripts/store/mainStore/MainStore.ts
  55. 1 0
      assets/scripts/store/mainStore/data.ts

+ 9 - 0
assets/lobbyRes/public/avatar.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "1.2.0",
+  "importer": "directory",
+  "imported": true,
+  "uuid": "62ffd50f-acbb-4664-be2b-0dcf668e0e9b",
+  "files": [],
+  "subMetas": {},
+  "userData": {}
+}

+ 0 - 0
assets/lobbyRes/textures/userInfo/changeAvatar/img_man_1.png → assets/lobbyRes/public/avatar/1.png


+ 2 - 2
assets/lobbyRes/textures/userInfo/changeAvatar/img_man_1.png.meta → assets/lobbyRes/public/avatar/1.png.meta

@@ -11,7 +11,7 @@
     "6c48a": {
       "importer": "texture",
       "uuid": "c9805f44-59c3-4527-b3ec-8fb4144afe89@6c48a",
-      "displayName": "img_man_1",
+      "displayName": "1",
       "id": "6c48a",
       "name": "texture",
       "userData": {
@@ -35,7 +35,7 @@
     "f9941": {
       "importer": "sprite-frame",
       "uuid": "c9805f44-59c3-4527-b3ec-8fb4144afe89@f9941",
-      "displayName": "img_man_1",
+      "displayName": "1",
       "id": "f9941",
       "name": "spriteFrame",
       "userData": {

+ 0 - 0
assets/lobbyRes/textures/userInfo/changeAvatar/img_woman_5.png → assets/lobbyRes/public/avatar/10.png


+ 2 - 2
assets/lobbyRes/textures/userInfo/changeAvatar/img_woman_5.png.meta → assets/lobbyRes/public/avatar/10.png.meta

@@ -11,7 +11,7 @@
     "6c48a": {
       "importer": "texture",
       "uuid": "7ed8eb99-1b52-44ca-ae97-f7e5bf59ac6d@6c48a",
-      "displayName": "img_woman_5",
+      "displayName": "10",
       "id": "6c48a",
       "name": "texture",
       "userData": {
@@ -35,7 +35,7 @@
     "f9941": {
       "importer": "sprite-frame",
       "uuid": "7ed8eb99-1b52-44ca-ae97-f7e5bf59ac6d@f9941",
-      "displayName": "img_woman_5",
+      "displayName": "10",
       "id": "f9941",
       "name": "spriteFrame",
       "userData": {

+ 0 - 0
assets/lobbyRes/textures/userInfo/changeAvatar/img_man_2.png → assets/lobbyRes/public/avatar/2.png


+ 2 - 2
assets/lobbyRes/textures/userInfo/changeAvatar/img_man_2.png.meta → assets/lobbyRes/public/avatar/2.png.meta

@@ -11,7 +11,7 @@
     "6c48a": {
       "importer": "texture",
       "uuid": "8b9db1e7-a283-4559-bf81-1991a0d62408@6c48a",
-      "displayName": "img_man_2",
+      "displayName": "2",
       "id": "6c48a",
       "name": "texture",
       "userData": {
@@ -35,7 +35,7 @@
     "f9941": {
       "importer": "sprite-frame",
       "uuid": "8b9db1e7-a283-4559-bf81-1991a0d62408@f9941",
-      "displayName": "img_man_2",
+      "displayName": "2",
       "id": "f9941",
       "name": "spriteFrame",
       "userData": {

+ 0 - 0
assets/lobbyRes/textures/userInfo/changeAvatar/img_man_3.png → assets/lobbyRes/public/avatar/3.png


+ 2 - 2
assets/lobbyRes/textures/userInfo/changeAvatar/img_man_3.png.meta → assets/lobbyRes/public/avatar/3.png.meta

@@ -11,7 +11,7 @@
     "6c48a": {
       "importer": "texture",
       "uuid": "ed57d831-56f3-4f44-8857-236b34b77b7d@6c48a",
-      "displayName": "img_man_3",
+      "displayName": "3",
       "id": "6c48a",
       "name": "texture",
       "userData": {
@@ -35,7 +35,7 @@
     "f9941": {
       "importer": "sprite-frame",
       "uuid": "ed57d831-56f3-4f44-8857-236b34b77b7d@f9941",
-      "displayName": "img_man_3",
+      "displayName": "3",
       "id": "f9941",
       "name": "spriteFrame",
       "userData": {

+ 0 - 0
assets/lobbyRes/textures/userInfo/changeAvatar/img_man_4.png → assets/lobbyRes/public/avatar/4.png


+ 2 - 2
assets/lobbyRes/textures/userInfo/changeAvatar/img_man_4.png.meta → assets/lobbyRes/public/avatar/4.png.meta

@@ -11,7 +11,7 @@
     "6c48a": {
       "importer": "texture",
       "uuid": "fc9ec4dc-05f2-425f-93f1-be8f7c21fc16@6c48a",
-      "displayName": "img_man_4",
+      "displayName": "4",
       "id": "6c48a",
       "name": "texture",
       "userData": {
@@ -35,7 +35,7 @@
     "f9941": {
       "importer": "sprite-frame",
       "uuid": "fc9ec4dc-05f2-425f-93f1-be8f7c21fc16@f9941",
-      "displayName": "img_man_4",
+      "displayName": "4",
       "id": "f9941",
       "name": "spriteFrame",
       "userData": {

+ 0 - 0
assets/lobbyRes/textures/userInfo/changeAvatar/img_man_5.png → assets/lobbyRes/public/avatar/5.png


+ 2 - 2
assets/lobbyRes/textures/userInfo/changeAvatar/img_man_5.png.meta → assets/lobbyRes/public/avatar/5.png.meta

@@ -11,7 +11,7 @@
     "6c48a": {
       "importer": "texture",
       "uuid": "8c739566-7fa3-471a-a382-6f0b7ffd8054@6c48a",
-      "displayName": "img_man_5",
+      "displayName": "5",
       "id": "6c48a",
       "name": "texture",
       "userData": {
@@ -35,7 +35,7 @@
     "f9941": {
       "importer": "sprite-frame",
       "uuid": "8c739566-7fa3-471a-a382-6f0b7ffd8054@f9941",
-      "displayName": "img_man_5",
+      "displayName": "5",
       "id": "f9941",
       "name": "spriteFrame",
       "userData": {

+ 0 - 0
assets/lobbyRes/textures/userInfo/changeAvatar/img_woman_1.png → assets/lobbyRes/public/avatar/6.png


+ 2 - 2
assets/lobbyRes/textures/userInfo/changeAvatar/img_woman_1.png.meta → assets/lobbyRes/public/avatar/6.png.meta

@@ -11,7 +11,7 @@
     "6c48a": {
       "importer": "texture",
       "uuid": "cee3f38a-13a4-48af-ac02-fde27c0c4205@6c48a",
-      "displayName": "img_woman_1",
+      "displayName": "6",
       "id": "6c48a",
       "name": "texture",
       "userData": {
@@ -35,7 +35,7 @@
     "f9941": {
       "importer": "sprite-frame",
       "uuid": "cee3f38a-13a4-48af-ac02-fde27c0c4205@f9941",
-      "displayName": "img_woman_1",
+      "displayName": "6",
       "id": "f9941",
       "name": "spriteFrame",
       "userData": {

+ 0 - 0
assets/lobbyRes/textures/userInfo/changeAvatar/img_woman_2.png → assets/lobbyRes/public/avatar/7.png


+ 2 - 2
assets/lobbyRes/textures/userInfo/changeAvatar/img_woman_2.png.meta → assets/lobbyRes/public/avatar/7.png.meta

@@ -11,7 +11,7 @@
     "6c48a": {
       "importer": "texture",
       "uuid": "2c4d8954-22cd-4570-ad89-a9c1defcad56@6c48a",
-      "displayName": "img_woman_2",
+      "displayName": "7",
       "id": "6c48a",
       "name": "texture",
       "userData": {
@@ -35,7 +35,7 @@
     "f9941": {
       "importer": "sprite-frame",
       "uuid": "2c4d8954-22cd-4570-ad89-a9c1defcad56@f9941",
-      "displayName": "img_woman_2",
+      "displayName": "7",
       "id": "f9941",
       "name": "spriteFrame",
       "userData": {

+ 0 - 0
assets/lobbyRes/textures/userInfo/changeAvatar/img_woman_3.png → assets/lobbyRes/public/avatar/8.png


+ 2 - 2
assets/lobbyRes/textures/userInfo/changeAvatar/img_woman_3.png.meta → assets/lobbyRes/public/avatar/8.png.meta

@@ -11,7 +11,7 @@
     "6c48a": {
       "importer": "texture",
       "uuid": "ab66a52e-cd83-4d83-97f5-b271e86c7e8a@6c48a",
-      "displayName": "img_woman_3",
+      "displayName": "8",
       "id": "6c48a",
       "name": "texture",
       "userData": {
@@ -35,7 +35,7 @@
     "f9941": {
       "importer": "sprite-frame",
       "uuid": "ab66a52e-cd83-4d83-97f5-b271e86c7e8a@f9941",
-      "displayName": "img_woman_3",
+      "displayName": "8",
       "id": "f9941",
       "name": "spriteFrame",
       "userData": {

+ 0 - 0
assets/lobbyRes/textures/userInfo/changeAvatar/img_woman_4.png → assets/lobbyRes/public/avatar/9.png


+ 2 - 2
assets/lobbyRes/textures/userInfo/changeAvatar/img_woman_4.png.meta → assets/lobbyRes/public/avatar/9.png.meta

@@ -11,7 +11,7 @@
     "6c48a": {
       "importer": "texture",
       "uuid": "b6e70206-d771-47e0-902c-dcfcbac84e5b@6c48a",
-      "displayName": "img_woman_4",
+      "displayName": "9",
       "id": "6c48a",
       "name": "texture",
       "userData": {
@@ -35,7 +35,7 @@
     "f9941": {
       "importer": "sprite-frame",
       "uuid": "b6e70206-d771-47e0-902c-dcfcbac84e5b@f9941",
-      "displayName": "img_woman_4",
+      "displayName": "9",
       "id": "f9941",
       "name": "spriteFrame",
       "userData": {

File diff suppressed because it is too large
+ 445 - 102
assets/lobbyRes/ui/support/Support.prefab


+ 122 - 434
assets/lobbyRes/ui/userInfo/BindEmail.prefab

@@ -28,20 +28,20 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 252
+        "__id__": 238
       },
       {
-        "__id__": 254
+        "__id__": 240
       },
       {
-        "__id__": 256
+        "__id__": 242
       },
       {
-        "__id__": 258
+        "__id__": 244
       }
     ],
     "_prefab": {
-      "__id__": 260
+      "__id__": 246
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -291,26 +291,26 @@
         "__id__": 33
       },
       {
-        "__id__": 205
+        "__id__": 191
       },
       {
-        "__id__": 219
+        "__id__": 205
       },
       {
-        "__id__": 233
+        "__id__": 219
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 247
+        "__id__": 233
       },
       {
-        "__id__": 249
+        "__id__": 235
       }
     ],
     "_prefab": {
-      "__id__": 251
+      "__id__": 237
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -833,14 +833,14 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 200
+        "__id__": 186
       },
       {
-        "__id__": 202
+        "__id__": 188
       }
     ],
     "_prefab": {
-      "__id__": 204
+      "__id__": 190
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -1801,7 +1801,7 @@
   },
   {
     "__type__": "cc.Node",
-    "_name": "current_password",
+    "_name": "password",
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
@@ -3950,7 +3950,11 @@
     "button": {
       "__id__": 154
     },
-    "account": null,
+    "account": {
+      "__id__": 64
+    },
+    "password": null,
+    "sendType": 2,
     "_id": ""
   },
   {
@@ -4225,11 +4229,11 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 197
+        "__id__": 183
       }
     ],
     "_prefab": {
-      "__id__": 199
+      "__id__": 185
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -4398,248 +4402,29 @@
   },
   {
     "__type__": "cc.Node",
-    "_name": "input",
+    "_name": "label",
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
       "__id__": 170
     },
-    "_children": [
-      {
-        "__id__": 178
-      },
-      {
-        "__id__": 184
-      }
-    ],
-    "_active": true,
-    "_components": [
-      {
-        "__id__": 190
-      },
-      {
-        "__id__": 192
-      },
-      {
-        "__id__": 194
-      }
-    ],
-    "_prefab": {
-      "__id__": 196
-    },
-    "_lpos": {
-      "__type__": "cc.Vec3",
-      "x": 51.91,
-      "y": 4.346,
-      "z": 0
-    },
-    "_lrot": {
-      "__type__": "cc.Quat",
-      "x": 0,
-      "y": 0,
-      "z": 0,
-      "w": 1
-    },
-    "_lscale": {
-      "__type__": "cc.Vec3",
-      "x": 1,
-      "y": 1,
-      "z": 1
-    },
-    "_mobility": 0,
-    "_layer": 1073741824,
-    "_euler": {
-      "__type__": "cc.Vec3",
-      "x": 0,
-      "y": 0,
-      "z": 0
-    },
-    "_id": ""
-  },
-  {
-    "__type__": "cc.Node",
-    "_name": "TEXT_LABEL",
-    "_objFlags": 0,
-    "__editorExtras__": {},
-    "_parent": {
-      "__id__": 177
-    },
-    "_children": [],
-    "_active": false,
-    "_components": [
-      {
-        "__id__": 179
-      },
-      {
-        "__id__": 181
-      }
-    ],
-    "_prefab": {
-      "__id__": 183
-    },
-    "_lpos": {
-      "__type__": "cc.Vec3",
-      "x": -196.87599999999998,
-      "y": 20,
-      "z": 0
-    },
-    "_lrot": {
-      "__type__": "cc.Quat",
-      "x": 0,
-      "y": 0,
-      "z": 0,
-      "w": 1
-    },
-    "_lscale": {
-      "__type__": "cc.Vec3",
-      "x": 1,
-      "y": 1,
-      "z": 1
-    },
-    "_mobility": 0,
-    "_layer": 1073741824,
-    "_euler": {
-      "__type__": "cc.Vec3",
-      "x": 0,
-      "y": 0,
-      "z": 0
-    },
-    "_id": ""
-  },
-  {
-    "__type__": "cc.UITransform",
-    "_name": "",
-    "_objFlags": 0,
-    "__editorExtras__": {},
-    "node": {
-      "__id__": 178
-    },
-    "_enabled": true,
-    "__prefab": {
-      "__id__": 180
-    },
-    "_contentSize": {
-      "__type__": "cc.Size",
-      "width": 395.75199999999995,
-      "height": 40
-    },
-    "_anchorPoint": {
-      "__type__": "cc.Vec2",
-      "x": 0,
-      "y": 1
-    },
-    "_id": ""
-  },
-  {
-    "__type__": "cc.CompPrefabInfo",
-    "fileId": "62JG0lY91OoqfvnPnulLNk"
-  },
-  {
-    "__type__": "cc.Label",
-    "_name": "",
-    "_objFlags": 0,
-    "__editorExtras__": {},
-    "node": {
-      "__id__": 178
-    },
-    "_enabled": true,
-    "__prefab": {
-      "__id__": 182
-    },
-    "_customMaterial": null,
-    "_srcBlendFactor": 2,
-    "_dstBlendFactor": 4,
-    "_color": {
-      "__type__": "cc.Color",
-      "r": 255,
-      "g": 255,
-      "b": 255,
-      "a": 255
-    },
-    "_string": "",
-    "_horizontalAlign": 0,
-    "_verticalAlign": 1,
-    "_actualFontSize": 26,
-    "_fontSize": 24,
-    "_fontFamily": "Arial",
-    "_lineHeight": 24,
-    "_overflow": 1,
-    "_enableWrapText": false,
-    "_font": null,
-    "_isSystemFontUsed": true,
-    "_spacingX": 0,
-    "_isItalic": false,
-    "_isBold": false,
-    "_isUnderline": false,
-    "_underlineHeight": 2,
-    "_cacheMode": 0,
-    "_enableOutline": false,
-    "_outlineColor": {
-      "__type__": "cc.Color",
-      "r": 0,
-      "g": 0,
-      "b": 0,
-      "a": 255
-    },
-    "_outlineWidth": 2,
-    "_enableShadow": false,
-    "_shadowColor": {
-      "__type__": "cc.Color",
-      "r": 0,
-      "g": 0,
-      "b": 0,
-      "a": 255
-    },
-    "_shadowOffset": {
-      "__type__": "cc.Vec2",
-      "x": 2,
-      "y": 2
-    },
-    "_shadowBlur": 2,
-    "_id": ""
-  },
-  {
-    "__type__": "cc.CompPrefabInfo",
-    "fileId": "23usLudbVIcLDdlYtQ4nst"
-  },
-  {
-    "__type__": "cc.PrefabInfo",
-    "root": {
-      "__id__": 1
-    },
-    "asset": {
-      "__id__": 0
-    },
-    "fileId": "e1VECbKflPI4OzGnuohBZz",
-    "instance": null,
-    "targetOverrides": null,
-    "nestedPrefabInstanceRoots": null
-  },
-  {
-    "__type__": "cc.Node",
-    "_name": "PLACEHOLDER_LABEL",
-    "_objFlags": 0,
-    "__editorExtras__": {},
-    "_parent": {
-      "__id__": 177
-    },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 185
+        "__id__": 178
       },
       {
-        "__id__": 187
+        "__id__": 180
       }
     ],
     "_prefab": {
-      "__id__": 189
+      "__id__": 182
     },
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": -196.87599999999998,
-      "y": 20,
+      "x": -144.966,
+      "y": 24.346000000000004,
       "z": 0
     },
     "_lrot": {
@@ -4671,11 +4456,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 184
+      "__id__": 177
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 186
+      "__id__": 179
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -4699,11 +4484,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 184
+      "__id__": 177
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 188
+      "__id__": 181
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -4774,124 +4559,6 @@
     "targetOverrides": null,
     "nestedPrefabInstanceRoots": null
   },
-  {
-    "__type__": "cc.UITransform",
-    "_name": "",
-    "_objFlags": 0,
-    "__editorExtras__": {},
-    "node": {
-      "__id__": 177
-    },
-    "_enabled": true,
-    "__prefab": {
-      "__id__": 191
-    },
-    "_contentSize": {
-      "__type__": "cc.Size",
-      "width": 397.75199999999995,
-      "height": 40
-    },
-    "_anchorPoint": {
-      "__type__": "cc.Vec2",
-      "x": 0.5,
-      "y": 0.5
-    },
-    "_id": ""
-  },
-  {
-    "__type__": "cc.CompPrefabInfo",
-    "fileId": "90BpSOSYtM1IRgGXsS+1Ba"
-  },
-  {
-    "__type__": "cc.Sprite",
-    "_name": "",
-    "_objFlags": 0,
-    "__editorExtras__": {},
-    "node": {
-      "__id__": 177
-    },
-    "_enabled": true,
-    "__prefab": {
-      "__id__": 193
-    },
-    "_customMaterial": null,
-    "_srcBlendFactor": 2,
-    "_dstBlendFactor": 4,
-    "_color": {
-      "__type__": "cc.Color",
-      "r": 255,
-      "g": 255,
-      "b": 255,
-      "a": 255
-    },
-    "_spriteFrame": null,
-    "_type": 1,
-    "_fillType": 0,
-    "_sizeMode": 0,
-    "_fillCenter": {
-      "__type__": "cc.Vec2",
-      "x": 0,
-      "y": 0
-    },
-    "_fillStart": 0,
-    "_fillRange": 0,
-    "_isTrimmedMode": true,
-    "_useGrayscale": false,
-    "_atlas": null,
-    "_id": ""
-  },
-  {
-    "__type__": "cc.CompPrefabInfo",
-    "fileId": "11+vNsjv9CEYfeITQSuFxt"
-  },
-  {
-    "__type__": "cc.EditBox",
-    "_name": "",
-    "_objFlags": 0,
-    "__editorExtras__": {},
-    "node": {
-      "__id__": 177
-    },
-    "_enabled": true,
-    "__prefab": {
-      "__id__": 195
-    },
-    "editingDidBegan": [],
-    "textChanged": [],
-    "editingDidEnded": [],
-    "editingReturn": [],
-    "_textLabel": {
-      "__id__": 181
-    },
-    "_placeholderLabel": {
-      "__id__": 187
-    },
-    "_returnType": 0,
-    "_string": "",
-    "_tabIndex": 0,
-    "_backgroundImage": null,
-    "_inputFlag": 5,
-    "_inputMode": 6,
-    "_maxLength": 40,
-    "_id": ""
-  },
-  {
-    "__type__": "cc.CompPrefabInfo",
-    "fileId": "e0QOEvtNNPnpaV1qh6oUyT"
-  },
-  {
-    "__type__": "cc.PrefabInfo",
-    "root": {
-      "__id__": 1
-    },
-    "asset": {
-      "__id__": 0
-    },
-    "fileId": "0d4s/mTBhAXaYyCE0+E4Hl",
-    "instance": null,
-    "targetOverrides": null,
-    "nestedPrefabInstanceRoots": null
-  },
   {
     "__type__": "cc.UITransform",
     "_name": "",
@@ -4902,7 +4569,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 198
+      "__id__": 184
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -4943,7 +4610,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 201
+      "__id__": 187
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -4971,7 +4638,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 203
+      "__id__": 189
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -5029,23 +4696,23 @@
     },
     "_children": [
       {
-        "__id__": 206
+        "__id__": 192
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 212
+        "__id__": 198
       },
       {
-        "__id__": 214
+        "__id__": 200
       },
       {
-        "__id__": 216
+        "__id__": 202
       }
     ],
     "_prefab": {
-      "__id__": 218
+      "__id__": 204
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -5082,20 +4749,20 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
-      "__id__": 205
+      "__id__": 191
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 207
+        "__id__": 193
       },
       {
-        "__id__": 209
+        "__id__": 195
       }
     ],
     "_prefab": {
-      "__id__": 211
+      "__id__": 197
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -5132,11 +4799,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 206
+      "__id__": 192
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 208
+      "__id__": 194
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -5160,11 +4827,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 206
+      "__id__": 192
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 210
+      "__id__": 196
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -5241,11 +4908,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 205
+      "__id__": 191
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 213
+      "__id__": 199
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -5269,11 +4936,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 205
+      "__id__": 191
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 215
+      "__id__": 201
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -5314,11 +4981,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 205
+      "__id__": 191
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 217
+      "__id__": 203
     },
     "clickEvents": [],
     "_interactable": true,
@@ -5387,23 +5054,23 @@
     },
     "_children": [
       {
-        "__id__": 220
+        "__id__": 206
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 226
+        "__id__": 212
       },
       {
-        "__id__": 228
+        "__id__": 214
       },
       {
-        "__id__": 230
+        "__id__": 216
       }
     ],
     "_prefab": {
-      "__id__": 232
+      "__id__": 218
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -5440,20 +5107,20 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
-      "__id__": 219
+      "__id__": 205
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 221
+        "__id__": 207
       },
       {
-        "__id__": 223
+        "__id__": 209
       }
     ],
     "_prefab": {
-      "__id__": 225
+      "__id__": 211
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -5490,11 +5157,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 220
+      "__id__": 206
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 222
+      "__id__": 208
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -5518,11 +5185,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 220
+      "__id__": 206
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 224
+      "__id__": 210
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -5599,11 +5266,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 219
+      "__id__": 205
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 227
+      "__id__": 213
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -5627,11 +5294,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 219
+      "__id__": 205
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 229
+      "__id__": 215
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -5672,11 +5339,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 219
+      "__id__": 205
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 231
+      "__id__": 217
     },
     "clickEvents": [],
     "_interactable": true,
@@ -5745,23 +5412,23 @@
     },
     "_children": [
       {
-        "__id__": 234
+        "__id__": 220
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 240
+        "__id__": 226
       },
       {
-        "__id__": 242
+        "__id__": 228
       },
       {
-        "__id__": 244
+        "__id__": 230
       }
     ],
     "_prefab": {
-      "__id__": 246
+      "__id__": 232
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -5798,20 +5465,20 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
-      "__id__": 233
+      "__id__": 219
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 235
+        "__id__": 221
       },
       {
-        "__id__": 237
+        "__id__": 223
       }
     ],
     "_prefab": {
-      "__id__": 239
+      "__id__": 225
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -5848,11 +5515,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 234
+      "__id__": 220
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 236
+      "__id__": 222
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -5876,11 +5543,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 234
+      "__id__": 220
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 238
+      "__id__": 224
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -5957,11 +5624,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 233
+      "__id__": 219
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 241
+      "__id__": 227
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -5985,11 +5652,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 233
+      "__id__": 219
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 243
+      "__id__": 229
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -6030,11 +5697,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 233
+      "__id__": 219
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 245
+      "__id__": 231
     },
     "clickEvents": [],
     "_interactable": true,
@@ -6103,7 +5770,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 248
+      "__id__": 234
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -6131,7 +5798,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 250
+      "__id__": 236
     },
     "_alignFlags": 45,
     "_target": null,
@@ -6180,7 +5847,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 253
+      "__id__": 239
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -6208,7 +5875,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 255
+      "__id__": 241
     },
     "_alignFlags": 45,
     "_target": null,
@@ -6244,7 +5911,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 257
+      "__id__": 243
     },
     "_id": ""
   },
@@ -6262,7 +5929,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 259
+      "__id__": 245
     },
     "popupMask": {
       "__id__": 9
@@ -6270,9 +5937,30 @@
     "popupRoot": {
       "__id__": 12
     },
-    "btnClose": null,
-    "btnView": null,
-    "btnSubmit": null,
+    "btn_close": {
+      "__id__": 19
+    },
+    "btn_cancel": {
+      "__id__": 191
+    },
+    "btn_confirm": {
+      "__id__": 205
+    },
+    "btn_grey": {
+      "__id__": 219
+    },
+    "new_email": {
+      "__id__": 64
+    },
+    "psd": {
+      "__id__": 102
+    },
+    "verify_code": {
+      "__id__": 140
+    },
+    "psd_label": {
+      "__id__": 76
+    },
     "_id": ""
   },
   {

File diff suppressed because it is too large
+ 286 - 359
assets/lobbyRes/ui/userInfo/BindPhone.prefab


File diff suppressed because it is too large
+ 14 - 3428
assets/lobbyRes/ui/userInfo/ChangeAvatar.prefab


File diff suppressed because it is too large
+ 102 - 433
assets/lobbyRes/ui/userInfo/ChangeEmail.prefab


+ 10 - 4
assets/lobbyRes/ui/userInfo/ChangeName.prefab

@@ -1742,7 +1742,7 @@
   },
   {
     "__type__": "cc.Node",
-    "_name": "btn_green",
+    "_name": "btn_confirm",
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
@@ -2216,9 +2216,15 @@
     "popupRoot": {
       "__id__": 12
     },
-    "btnClose": null,
-    "btnView": null,
-    "btnSubmit": null,
+    "btn_close": {
+      "__id__": 63
+    },
+    "btn_confirm": {
+      "__id__": 71
+    },
+    "nickname": {
+      "__id__": 38
+    },
     "_id": ""
   },
   {

File diff suppressed because it is too large
+ 287 - 359
assets/lobbyRes/ui/userInfo/ChangePhone.prefab


+ 338 - 22
assets/lobbyRes/ui/userInfo/AccountUnlink.prefab → assets/lobbyRes/ui/userInfo/UnbindAccount.prefab

@@ -1,7 +1,7 @@
 [
   {
     "__type__": "cc.Prefab",
-    "_name": "AccountUnlink",
+    "_name": "UnbindAccount",
     "_objFlags": 0,
     "__editorExtras__": {},
     "_native": "",
@@ -13,7 +13,7 @@
   },
   {
     "__type__": "cc.Node",
-    "_name": "AccountUnlink",
+    "_name": "UnbindAccount",
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": null,
@@ -28,20 +28,20 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 164
+        "__id__": 176
       },
       {
-        "__id__": 166
+        "__id__": 178
       },
       {
-        "__id__": 168
+        "__id__": 180
       },
       {
-        "__id__": 170
+        "__id__": 182
       }
     ],
     "_prefab": {
-      "__id__": 172
+      "__id__": 184
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -143,7 +143,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1624,
-      "height": 749.9999999999999
+      "height": 750
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -295,19 +295,22 @@
       },
       {
         "__id__": 147
+      },
+      {
+        "__id__": 159
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 159
+        "__id__": 171
       },
       {
-        "__id__": 161
+        "__id__": 173
       }
     ],
     "_prefab": {
-      "__id__": 163
+      "__id__": 175
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -3289,6 +3292,7 @@
     "account": {
       "__id__": 76
     },
+    "sendType": 8,
     "_id": ""
   },
   {
@@ -3884,22 +3888,321 @@
     "targetOverrides": null,
     "nestedPrefabInstanceRoots": null
   },
+  {
+    "__type__": "cc.Node",
+    "_name": "btn_grey",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "_parent": {
+      "__id__": 12
+    },
+    "_children": [
+      {
+        "__id__": 160
+      }
+    ],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 166
+      },
+      {
+        "__id__": 168
+      }
+    ],
+    "_prefab": {
+      "__id__": 170
+    },
+    "_lpos": {
+      "__type__": "cc.Vec3",
+      "x": -7,
+      "y": -236.955,
+      "z": 0
+    },
+    "_lrot": {
+      "__type__": "cc.Quat",
+      "x": 0,
+      "y": 0,
+      "z": 0,
+      "w": 1
+    },
+    "_lscale": {
+      "__type__": "cc.Vec3",
+      "x": 1,
+      "y": 1,
+      "z": 1
+    },
+    "_mobility": 0,
+    "_layer": 1073741824,
+    "_euler": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "label",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "_parent": {
+      "__id__": 159
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 161
+      },
+      {
+        "__id__": 163
+      }
+    ],
+    "_prefab": {
+      "__id__": 165
+    },
+    "_lpos": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 2.671,
+      "z": 0
+    },
+    "_lrot": {
+      "__type__": "cc.Quat",
+      "x": 0,
+      "y": 0,
+      "z": 0,
+      "w": 1
+    },
+    "_lscale": {
+      "__type__": "cc.Vec3",
+      "x": 1,
+      "y": 1,
+      "z": 1
+    },
+    "_mobility": 0,
+    "_layer": 1073741824,
+    "_euler": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_id": ""
+  },
   {
     "__type__": "cc.UITransform",
     "_name": "",
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 12
+      "__id__": 160
     },
     "_enabled": true,
     "__prefab": {
+      "__id__": 162
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 155.3125,
+      "height": 46.32
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "48W+lOulFGrbFq3cwuDNOH"
+  },
+  {
+    "__type__": "cc.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
       "__id__": 160
     },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 164
+    },
+    "_customMaterial": null,
+    "_srcBlendFactor": 2,
+    "_dstBlendFactor": 4,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_string": "CONFIRM",
+    "_horizontalAlign": 1,
+    "_verticalAlign": 1,
+    "_actualFontSize": 32,
+    "_fontSize": 32,
+    "_fontFamily": "Arial",
+    "_lineHeight": 32,
+    "_overflow": 0,
+    "_enableWrapText": true,
+    "_font": null,
+    "_isSystemFontUsed": true,
+    "_spacingX": 0,
+    "_isItalic": false,
+    "_isBold": true,
+    "_isUnderline": false,
+    "_underlineHeight": 2,
+    "_cacheMode": 0,
+    "_enableOutline": true,
+    "_outlineColor": {
+      "__type__": "cc.Color",
+      "r": 50,
+      "g": 47,
+      "b": 47,
+      "a": 255
+    },
+    "_outlineWidth": 3,
+    "_enableShadow": false,
+    "_shadowColor": {
+      "__type__": "cc.Color",
+      "r": 0,
+      "g": 0,
+      "b": 0,
+      "a": 255
+    },
+    "_shadowOffset": {
+      "__type__": "cc.Vec2",
+      "x": 2,
+      "y": 2
+    },
+    "_shadowBlur": 2,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "e1ENKD0DZAO5tZdgO8xcPi"
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "cdUkF2dhBIYZWJwMUvGhIZ",
+    "instance": null,
+    "targetOverrides": null,
+    "nestedPrefabInstanceRoots": null
+  },
+  {
+    "__type__": "cc.UITransform",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 159
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 167
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 334,
+      "height": 94
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "77BaX1RwlFW7JeWhx6roc4"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 159
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 169
+    },
+    "_customMaterial": null,
+    "_srcBlendFactor": 2,
+    "_dstBlendFactor": 4,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_spriteFrame": {
+      "__uuid__": "08869bb6-3d15-4eca-a8e2-6c7bca4df725@f9941",
+      "__expectedType__": "cc.SpriteFrame"
+    },
+    "_type": 1,
+    "_fillType": 0,
+    "_sizeMode": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_useGrayscale": false,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "ebe9yIcNxHKqAA7XV8uk5O"
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "1auqxHoTFKc4LQ8NtQxrBs",
+    "instance": null,
+    "targetOverrides": null,
+    "nestedPrefabInstanceRoots": null
+  },
+  {
+    "__type__": "cc.UITransform",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 12
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 172
+    },
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1624,
-      "height": 749.9999999999999
+      "height": 750
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -3922,7 +4225,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 162
+      "__id__": 174
     },
     "_alignFlags": 45,
     "_target": null,
@@ -3971,12 +4274,12 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 165
+      "__id__": 177
     },
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1624,
-      "height": 749.9999999999999
+      "height": 750
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -3999,7 +4302,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 167
+      "__id__": 179
     },
     "_alignFlags": 45,
     "_target": null,
@@ -4035,7 +4338,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 169
+      "__id__": 181
     },
     "_id": ""
   },
@@ -4053,7 +4356,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 171
+      "__id__": 183
     },
     "popupMask": {
       "__id__": 9
@@ -4061,9 +4364,22 @@
     "popupRoot": {
       "__id__": 12
     },
-    "btnClose": null,
-    "btnView": null,
-    "btnSubmit": null,
+    "btn_close": {
+      "__id__": 37
+    },
+    "btn_confirm": {
+      "__id__": 147
+    },
+    "btn_grey": {
+      "__id__": 159
+    },
+    "account": {
+      "__id__": 76
+    },
+    "verify_code": {
+      "__id__": 114
+    },
+    "_account": null,
     "_id": ""
   },
   {

+ 1 - 1
assets/lobbyRes/ui/userInfo/AccountUnlink.prefab.meta → assets/lobbyRes/ui/userInfo/UnbindAccount.prefab.meta

@@ -8,6 +8,6 @@
   ],
   "subMetas": {},
   "userData": {
-    "syncNodeName": "AccountUnlink"
+    "syncNodeName": "UnbindAccount"
   }
 }

File diff suppressed because it is too large
+ 455 - 103
assets/lobbyRes/ui/userInfo/UserInfoView.prefab


+ 6 - 0
assets/scripts/api/LobbyApi.ts

@@ -24,6 +24,12 @@ export const APP_MAIL_DELETE = get('mail/del');
 export const APP_MAIL_TAKE = get('mail/take');
 export const APP_EMAIL_SEND_CODE = post('email/auth/send-code');
 export const APP_EMAIL_RESET_PSD = post('email/auth/reset-password');
+export const APP_EMAIL_BIND_CODE = post('email/auth/bind/send-code');
+export const APP_EMAIL_BIND_CONFIRM = post('email/auth/bind/confirm');
+export const APP_EMAIL_CHANGE_CODE = post('email/change/send-code');
+export const APP_EMAIL_CHANGE_CONFIRM = post('email/change/confirm');
+
+
 
 
 export const APP_CHECKIN_CHECK = get('checkin/check');

+ 6 - 0
assets/scripts/api/LoginApi.ts

@@ -5,6 +5,12 @@ export const APP_LOGIN = post('login');
 /** 第三方授权登录 */
 export const APP_LOGIN_3RD = post('thirdPartyLogin');
 
+export const APP_BIND_3RD = post('thirdParty/bind');
+
+export const APP_UNBIND_3RD = post('thirdParty/unbind/send-code');
+
+export const APP_UNBIND_3RD_CONFIRM = post('thirdParty/unbind/confirm');
+
 export const APP_REGISTER = post('register');
 
 export const APP_GET_REGISTER_GOLD = post('getRegisterGold');

+ 3 - 0
assets/scripts/app/AppEvents.ts

@@ -1,3 +1,4 @@
+import { UIViewID } from '@scripts/define/UIDefine';
 import type {
   HallCallClientMessage,
   HallMessage,
@@ -22,4 +23,6 @@ export interface AppEventMap {
   'firstPack:update': undefined,
   'club:update': undefined,
   'wallet:update': undefined,
+  'open:ui-view': UIViewID,
+  'close:ui-view': UIViewID,
 }

+ 143 - 20
assets/scripts/components/button/OTPButton.ts

@@ -1,4 +1,5 @@
 import { AppKernel } from '@scripts/app/AppKernel';
+import { MailOtpType, OtpType } from '@scripts/store';
 import { checkIsEmail } from '@scripts/utils/Helper';
 import { addBtnClick } from '@scripts/utils/UIHelper';
 import { _decorator, Button, Component, EditBox, Enum, Label, Node } from 'cc';
@@ -7,6 +8,13 @@ const { ccclass, property } = _decorator;
 export enum OTPSendType {
     Register,   // 注册
     ResetPsd,  // 重置密码
+    BindEmail, // 绑定邮箱
+    ChangeEmailOld, // 修改邮箱(旧邮箱)
+    ChangeEmailNew, // 修改邮箱(新邮箱)
+    BindPhone,  // 绑定手机
+    ChangePhoneOld, // 修改手机(旧手机)
+    ChangePhoneNew, // 修改手机(新手机)
+    Unbind3rdLogin, // 解绑第三方登录
 }
 
 @ccclass('OTPButton')
@@ -40,36 +48,112 @@ export class OTPButton extends Component {
     }
 
     private async onSendCode() {
-        const account = this.account.string;
-        if (!account) return;
-
         if (this._sending) return;
         this._sending = true;
 
-        const isEmail = checkIsEmail(account);
         const { mainStore, mailStore } = AppKernel.stores;
         switch (this.sendType) {
-            case OTPSendType.Register:
-                const res_register = isEmail
+            case OTPSendType.Register: {
+                const account = this.account.string;
+                if (!account) break;
+
+                const isEmail = checkIsEmail(account);
+                isEmail
                     ? await mailStore.reqSendCode(account, "register")
                     : await mainStore.reqSendCode(account);
 
-                if (res_register) {
-                    this._account = account;
-                    this.startTimer();
-                }
+                this._account = account;
+                this.startTimer();
                 break;
+            }
+            case OTPSendType.ResetPsd: {
+                const account = this.account.string;
+                if (!account) break;
 
-            case OTPSendType.ResetPsd:
-                const res_resetPsd = isEmail
+                const isEmail = checkIsEmail(account);
+                isEmail
                     ? await mailStore.reqSendCode(account, "reset_password")
                     : await mainStore.reqSendCode(account);
 
-                if (res_resetPsd) {
-                    this._account = account;
-                    this.startTimer();
-                }
+                this._account = account;
+                this.startTimer();
+                break;
+            }
+            case OTPSendType.BindEmail: {
+                const account = this.account.string;
+                if (!account) break;
+
+                await mailStore.reqBindEmailCode({ account });
+                this._account = account;
+                this.startTimer();
+                break;
+            }
+            case OTPSendType.ChangeEmailOld: {
+                const { Email: account } = AppKernel.stores.mainStore.userInfo;
+                if (!account) break;
+
+                await mailStore.reqChangeEmailCode({
+                    account,
+                    target: "old"
+                });
+                this._account = account;
+                this.startTimer();
+                break;
+            }
+            case OTPSendType.ChangeEmailNew: {
+                const account = this.account.string;
+                if (!account) break;
+
+                await mailStore.reqChangeEmailCode({
+                    account,
+                    target: "new"
+                });
+                this._account = account;
+                this.startTimer();
+                break;
+            }
+            case OTPSendType.BindPhone: {
+                const account = this.account.string;
+                if (!account) break;
+
+                await mainStore.reqSendCode(account);
+                this._account = account;
+                this.startTimer();
+                break;
+            }
+            case OTPSendType.ChangePhoneOld: {
+                const { Phone: account } = AppKernel.stores.mainStore.userInfo;
+                if (!account) break;
+
+                await mainStore.reqSendCode(account, true);
+                this._account = account;
+                this.startTimer();
+                break;
+            }
+            case OTPSendType.ChangePhoneNew: {
+                const account = this.account.string;
+                if (!account) break;
+
+                await mainStore.reqSendCode(account);
+                this._account = account;
+                this.startTimer();
                 break;
+            }
+
+            case OTPSendType.Unbind3rdLogin: {
+                const account = this.account.string;
+                if (!account) break;
+
+                const isEmail = checkIsEmail(account);
+                await mainStore.reqUnBind3rdCode({
+                    verify_type: isEmail ? "email" : "phone"
+                });
+                this._account = account;
+                this.startTimer();
+                break;
+            }
+
+
             default:
                 break;
         }
@@ -118,10 +202,34 @@ export class OTPButton extends Component {
         const { mainStore, mailStore } = AppKernel.stores;
         switch (this.sendType) {
             case OTPSendType.Register:
-                return isEmail ? mailStore.otpCD : mainStore.otpCD;
+                return isEmail
+                    ? mailStore.getOtpCD(MailOtpType.Register)
+                    : mainStore.getOtpCD(OtpType.Main);
 
             case OTPSendType.ResetPsd:
-                return isEmail ? mailStore.otpCD : mainStore.otpCD;
+                return isEmail
+                    ? mailStore.getOtpCD(MailOtpType.Reset)
+                    : mainStore.getOtpCD(OtpType.Main);
+
+            case OTPSendType.BindEmail:
+                return mailStore.getOtpCD(MailOtpType.Bind);
+
+            case OTPSendType.ChangeEmailOld:
+                return mailStore.getOtpCD(MailOtpType.ChangeOld);
+
+            case OTPSendType.ChangeEmailNew:
+                return mailStore.getOtpCD(MailOtpType.ChangeNew);
+
+            case OTPSendType.BindPhone:
+            case OTPSendType.ChangePhoneNew:
+                return mainStore.getOtpCD(OtpType.Main);
+
+            case OTPSendType.ChangePhoneOld:
+                return mainStore.getOtpCD(OtpType.ChangeOld);
+
+            case OTPSendType.Unbind3rdLogin:
+                return mainStore.getOtpCD(OtpType.Unbind3rd);
+
             default:
                 break;
         }
@@ -130,14 +238,29 @@ export class OTPButton extends Component {
     private getOptLabel(state: string) {
         if (state === "send") {
             switch (this.sendType) {
-                case OTPSendType.Register:
+                case OTPSendType.BindEmail:
+                case OTPSendType.ChangeEmailNew:
+                case OTPSendType.BindPhone:
+                case OTPSendType.ChangePhoneNew:
+                case OTPSendType.Unbind3rdLogin:
+                    return "Send Code"
+                case OTPSendType.ChangeEmailOld:
+                case OTPSendType.ChangePhoneOld:
+                    return "Send to Current"
 
                 default:
                     return "Send"
             }
         } else if (state === "resend") {
             switch (this.sendType) {
-                case OTPSendType.Register:
+                case OTPSendType.BindEmail:
+                case OTPSendType.ChangeEmailOld:
+                case OTPSendType.ChangeEmailNew:
+                case OTPSendType.BindPhone:
+                case OTPSendType.ChangePhoneOld:
+                case OTPSendType.ChangePhoneNew:
+                case OTPSendType.Unbind3rdLogin:
+                    return "Resend Code"
 
                 default:
                     return "Resend"

+ 30 - 9
assets/scripts/components/selectBox/SelectBox.ts

@@ -17,12 +17,16 @@ export class SelectBox extends Component {
     pull_down: Node;
 
     @property(Node)
-    layout: Node;
+    item: Node;
 
     @property(Node)
-    item: Node;
+    scroll_view: Node;
+
+    @property(Node)
+    content: Node;
 
     private _current_idx: number = -1;
+    private _data: string[] = [];
 
     protected onLoad(): void {
         addBtnClick(this.pull_toggle, this.onBtnToggleClick, this);
@@ -40,24 +44,30 @@ export class SelectBox extends Component {
     private init() {
         this.pull_down.active = true;
         this.pull_up.active = false;
-        this.layout.active = false;
-        this.layout.removeAllChildren();
+        this.content.active = false;
+        this.scroll_view.active = false;
+        this.content.removeAllChildren();
         this.label.string = '';
     }
 
-    public initSelectItems(data: string[] = []) {
+    public initSelectItems(data: string[] = [], params: any = {}) {
         const selectData = data;
+        this._data = selectData;
         this.init();
 
+
         for (let i = 0; i < selectData.length; i++) {
             const item = instantiate(this.item);
             item.active = true;
-            item.parent = this.layout;
+            item.parent = this.content;
             item.getChildByName("selected").active = false;
             item.getChildByName("label").getComponent(Label).string = selectData[i];
 
             addBtnClick(item, () => { this.handleClickItem(i, selectData[i]) }, this);
         }
+
+        const { defaultIndex } = params;
+        this.setDefaultIndex(defaultIndex);
     }
 
     public getSelectedStr() {
@@ -73,11 +83,12 @@ export class SelectBox extends Component {
     private onBtnToggleClick() {
         this.pull_down.active = !this.pull_down.active;
         this.pull_up.active = !this.pull_up.active;
-        this.layout.active = !this.layout.active;
+        this.content.active = !this.content.active;
+        this.scroll_view.active = this.content.active;
 
-        if (this.layout.active) {
+        if (this.content.active) {
             // 标记selected
-            this.layout.children.forEach((item, index) => {
+            this.content.children.forEach((item, index) => {
                 if (index === this._current_idx) {
                     item.getChildByName("selected").active = true;
                 } else {
@@ -86,6 +97,16 @@ export class SelectBox extends Component {
             })
         }
     }
+
+    private setDefaultIndex(defaultIndex: number) {
+        if (defaultIndex >= 0) {
+            this._current_idx = defaultIndex;
+            const item = this.content.children[defaultIndex];
+            item.getChildByName("selected").active = true;
+            this.label.string = this._data[defaultIndex];
+        }
+        
+    }
 }
 
 

+ 4 - 4
assets/scripts/define/UIDefine.ts

@@ -20,7 +20,7 @@ export const UIViewID = {
     UIToast: "UIToast",
     UIDialog: "UIDialog",
     UserInfoView: "UserInfoView",
-    AccountUnlink: "AccountUnlink",
+    UnbindAccount: "UnbindAccount",
     ChangeName: "ChangeName",
     ChangeAvatar: "ChangeAvatar",
     BindPhone: "BindPhone",
@@ -173,9 +173,9 @@ export const UIViewConfigs: Record<string, UIViewConfig> = {
         prefabPath: 'ui/userInfo/UserInfoView',
         layer: UILayer.Page
     },
-    [UIViewID.AccountUnlink]: {
-        id: UIViewID.AccountUnlink,
-        prefabPath: 'ui/userInfo/AccountUnlink',
+    [UIViewID.UnbindAccount]: {
+        id: UIViewID.UnbindAccount,
+        prefabPath: 'ui/userInfo/UnbindAccount',
         layer: UILayer.Popup
     },
     [UIViewID.ChangeName]: {

+ 6 - 2
assets/scripts/framework/ui/UIManager.ts

@@ -201,7 +201,9 @@ export class UIManager {
     const opening = this.performOpen(record, root, params, generation);
     record.opening = opening;
     try {
-      return await opening as TView | null;
+      await opening as TView | null;
+      AppKernel.events.emit("open:ui-view", viewId);
+      return;
     } finally {
       if (record.opening === opening) record.opening = null;
     }
@@ -226,7 +228,9 @@ export class UIManager {
     ++record.generation;
     record.closing = this.performClose(record, reason);
     try {
-      return await record.closing;
+      await record.closing;
+      AppKernel.events.emit("close:ui-view", viewIdOrInstance);
+      return;
     } finally {
       record.closing = null;
     }

+ 38 - 4
assets/scripts/modules/lobby/ui/LoginView/LoginView.ts

@@ -1,4 +1,4 @@
-import { _decorator, Button, Color, EditBox, instantiate, Label, Node, RichText, Sprite, SpriteFrame, UITransform } from 'cc';
+import { _decorator, Button, Color, EditBox, instantiate, Label, Node, RichText, Sprite, SpriteFrame, sys, UITransform } from 'cc';
 import { UIView } from '@scripts/framework/ui/UIView';
 import { AppKernel } from '@scripts/app/AppKernel';
 import { UIViewID } from '@scripts/define/UIDefine';
@@ -50,6 +50,12 @@ export class LoginView extends UIView {
   private _policyAgree = true;
   private _googleWebBtn;
 
+  private listenViews: UIViewID[] = [
+    UIViewID.Register,
+    UIViewID.ResetPsd,
+    UIViewID.Support
+  ];
+
   protected onCreate(): void | Promise<void> {
     addBtnClick(this.btnGuest.node, this.onBtnGuestClick, this);
     addBtnClick(this.btnFacebook.node, this.onBtnFBClick, this);
@@ -64,6 +70,10 @@ export class LoginView extends UIView {
     addBtnClick(this.btnResetPsd, this.onBtnResetPsdClick, this);
     addBtnClick(this.btnSupport, this.onBtnSupportClick, this);
 
+    AppKernel.events.on('open:ui-view', this.handleSubViewOpen, this);
+    AppKernel.events.on('close:ui-view', this.handleSubViewClose, this);
+
+
 
 
     this.initPsdInput();
@@ -172,7 +182,7 @@ export class LoginView extends UIView {
   }
 
   private onBtnRegisterClick() {
-    this._googleWebBtn?.setActive(false);
+    // this._googleWebBtn?.setActive(false);
     AppKernel.ui.open(UIViewID.Register);
   }
 
@@ -185,12 +195,12 @@ export class LoginView extends UIView {
   }
 
   private onBtnResetPsdClick() {
-    this._googleWebBtn?.setActive(false);
+    // this._googleWebBtn?.setActive(false);
     AppKernel.ui.open(UIViewID.ResetPsd);
   }
 
   private async onBtnSupportClick() {
-    this._googleWebBtn?.setActive(false);
+    // this._googleWebBtn?.setActive(false);
     AppKernel.ui.open(UIViewID.Support);
   }
 
@@ -213,4 +223,28 @@ export class LoginView extends UIView {
     check.active = !check.active;
     this._policyAgree = check.active;
   }
+
+
+  getGoogleLoginBtnDom() {
+    if (!sys.isBrowser) {
+      return null;
+    }
+    const btnDom = document.getElementById('google-login-button') as HTMLElement | null;
+    return btnDom;
+  }
+
+  private handleSubViewOpen(payload: UIViewID) {
+    if (this.listenViews.includes(payload)) {
+      this._googleWebBtn?.setActive(false);
+      console.log("LoginView handleSubUIOpen", payload);
+    }
+  }
+
+  private handleSubViewClose(payload: UIViewID) {
+    if (this.listenViews.includes(payload)) {
+      this._googleWebBtn?.setActive(true);
+      console.log("LoginView handleSubUIClose", payload);
+    }
+  }
+
 }

+ 4 - 4
assets/scripts/modules/lobby/ui/Register/Register.ts

@@ -39,10 +39,10 @@ export class Register extends UIPopup {
 
   private onBtnCloseClick() {
     AppKernel.ui.close(UIViewID.Register);
-    const loginView = AppKernel.ui.get(UIViewID.LoginView) as any;
-    if (loginView && loginView?.enabled) {
-      loginView?._googleWebBtn?.setActive(true);
-    }
+    // const loginView = AppKernel.ui.get(UIViewID.LoginView) as any;
+    // if (loginView && loginView?.enabled) {
+    //   loginView?._googleWebBtn?.setActive(true);
+    // }
   }
 
   private async onBtnSignUpClick() {

+ 4 - 4
assets/scripts/modules/lobby/ui/ResetPsd/ResetPsd.ts

@@ -36,10 +36,10 @@ export class ResetPsd extends UIPopup {
 
   private onBtnCloseClick() {
     AppKernel.ui.close(UIViewID.ResetPsd);
-    const loginView = AppKernel.ui.get(UIViewID.LoginView) as any;
-    if (loginView && loginView?.enabled) {
-      loginView?._googleWebBtn?.setActive(true);
-    }
+    // const loginView = AppKernel.ui.get(UIViewID.LoginView) as any;
+    // if (loginView && loginView?.enabled) {
+    //   loginView?._googleWebBtn?.setActive(true);
+    // }
   }
 
   private async onBtnResetClick() {

+ 4 - 16
assets/scripts/modules/lobby/ui/Support/Support.ts

@@ -21,18 +21,6 @@ export class Support extends UIPopup {
   @property(Node)
   private btnSubmit: Node = null;
 
-  @property(EditBox)
-  account: EditBox;
-
-  @property(EditBox)
-  code: EditBox;
-
-  @property(EditBox)
-  psd: EditBox;
-
-  @property(EditBox)
-  inviteCode: EditBox;
-
   @property(SelectBox)
   selectBox: SelectBox;
 
@@ -49,10 +37,10 @@ export class Support extends UIPopup {
 
   private onBtnCloseClick() {
     AppKernel.ui.close(UIViewID.Support);
-    const loginView = AppKernel.ui.get(UIViewID.LoginView) as any;
-    if (loginView && loginView?.enabled) {
-      loginView?._googleWebBtn?.setActive(true);
-    }
+    // const loginView = AppKernel.ui.get(UIViewID.LoginView) as any;
+    // if (loginView && loginView?.enabled) {
+    //   loginView?._googleWebBtn?.setActive(true);
+    // }
   }
 
   private onBtnViewClick() {

+ 0 - 66
assets/scripts/modules/lobby/ui/UserInfoView/AccountUnlink.ts

@@ -1,66 +0,0 @@
-import { _decorator, Button, Color, EditBox, instantiate, Label, Node, RichText, Sprite, SpriteFrame, UITransform } from 'cc';
-import { UIViewID } from '@scripts/define/UIDefine';
-import { UICloseReason } from '@scripts/framework/ui/UILayer';
-import { addBtnClick } from '@scripts/utils/UIHelper';
-import { AppKernel } from '@scripts/app/AppKernel';
-import { SelectBox } from '@scripts/components/selectBox/SelectBox';
-import { UIPopup } from '@scripts/framework/ui/UIPopup';
-
-const { ccclass, property } = _decorator;
-
-@ccclass('AccountUnlink')
-export class AccountUnlink extends UIPopup {
-  readonly viewId = UIViewID.AccountUnlink;
-
-  @property(Node)
-  private btnClose: Node = null;
-
-  @property(Node)
-  private btnView: Node = null;
-
-  @property(Node)
-  private btnSubmit: Node = null;
-
-  @property(EditBox)
-  account: EditBox;
-
-  @property(EditBox)
-  code: EditBox;
-
-  @property(EditBox)
-  psd: EditBox;
-
-  @property(EditBox)
-  inviteCode: EditBox;
-
-  @property(SelectBox)
-  selectBox: SelectBox;
-
-
-  protected onCreate(): void | Promise<void> {
-    // addBtnClick(this.btnClose, this.onBtnCloseClick, this);
-    // addBtnClick(this.btnView, this.onBtnViewClick, this);
-    // addBtnClick(this.btnSubmit, this.onBtnSubmitClick, this);
-
-
-    // const selectData = ["Account & Login", "Gameplay Issue", "Payment & Purchase", "Technical Issue"];
-    // this.selectBox?.initSelectItems(selectData);
-  }
-
-  private onBtnCloseClick() {
-    AppKernel.ui.close(UIViewID.Support);
-    const loginView = AppKernel.ui.get(UIViewID.LoginView) as any;
-    if (loginView && loginView?.enabled) {
-      loginView?._googleWebBtn?.setActive(true);
-    }
-  }
-
-  private onBtnViewClick() {
-    
-  }
-
-  private onBtnSubmitClick() {
-    
-  }
-
-}

+ 66 - 24
assets/scripts/modules/lobby/ui/UserInfoView/BindEmail.ts

@@ -13,54 +13,96 @@ export class BindEmail extends UIPopup {
   readonly viewId = UIViewID.BindEmail;
 
   @property(Node)
-  private btnClose: Node = null;
+  private btn_close: Node = null;
 
   @property(Node)
-  private btnView: Node = null;
+  private btn_cancel: Node = null;
 
   @property(Node)
-  private btnSubmit: Node = null;
+  private btn_confirm: Node = null;
 
-  @property(EditBox)
-  account: EditBox;
+  @property(Node)
+  private btn_grey: Node = null;
 
   @property(EditBox)
-  code: EditBox;
+  private new_email: EditBox = null;
 
   @property(EditBox)
-  psd: EditBox;
+  private psd: EditBox = null;
 
   @property(EditBox)
-  inviteCode: EditBox;
-
-  @property(SelectBox)
-  selectBox: SelectBox;
+  private verify_code: EditBox = null;
 
+  @property(Label)
+  private psd_label: Label = null;
+  private _new_email: string = '';
+  private _psd: string = '';
+  private _verify_code: string = '';
 
   protected onCreate(): void | Promise<void> {
-    // addBtnClick(this.btnClose, this.onBtnCloseClick, this);
-    // addBtnClick(this.btnView, this.onBtnViewClick, this);
-    // addBtnClick(this.btnSubmit, this.onBtnSubmitClick, this);
+    addBtnClick(this.btn_close, this.onBtnCloseClick, this);
+    addBtnClick(this.btn_cancel, this.onBtnCloseClick, this);
+    addBtnClick(this.btn_confirm, this.onBtnConfirmClick, this);
+
+    this.new_email.node.on(EditBox.EventType.TEXT_CHANGED, this.onNewEmailTextChanged, this);
+    this.psd.node.on(EditBox.EventType.TEXT_CHANGED, this.onPsdTextChanged, this);
+    this.verify_code.node.on(EditBox.EventType.TEXT_CHANGED, this.onVerifyCodeTextChanged, this);
 
 
-    // const selectData = ["Account & Login", "Gameplay Issue", "Payment & Purchase", "Technical Issue"];
-    // this.selectBox?.initSelectItems(selectData);
+
+
+    const { isGuest } = AppKernel.stores.mainStore.userInfo;
+    const hasPsd = isGuest ? false : true;
+    this.psd_label.string = hasPsd ? 'Current Password' : 'Set Password';
+    this.psd.placeholder = hasPsd ? 'Current Password' : 'Set Password';
   }
 
   private onBtnCloseClick() {
-    AppKernel.ui.close(UIViewID.Support);
-    const loginView = AppKernel.ui.get(UIViewID.LoginView) as any;
-    if (loginView && loginView?.enabled) {
-      loginView?._googleWebBtn?.setActive(true);
+    AppKernel.ui.close(UIViewID.BindEmail);
+  }
+
+  private async onBtnConfirmClick() {
+    const email = this.new_email.string;
+    const pwd = this.psd.string;
+    const code = this.verify_code.string;
+    const isReady = !!email && !!pwd && !!code;
+    if (!isReady) return;
+
+    const res = await AppKernel.stores.mailStore.reqBindEmailConfirm({
+      account: email,
+      password: pwd,
+      code: code
+    });
+    if (res) {
+      await AppKernel.ui.close(UIViewID.BindEmail);
+      AppKernel.ui.toast("Bind success");
     }
   }
 
-  private onBtnViewClick() {
-    
+  private onTextChanged() {
+    const isReady = !!this._new_email && !!this._psd && !!this._verify_code;
+    this.btn_grey.active = !isReady;
+    this.btn_confirm.active = isReady;
+  }
+
+  private onNewEmailTextChanged(editBox: EditBox) {
+    console.log('onNewEmailTextChanged', editBox.string);
+    this._new_email = editBox.string;
+    this.onTextChanged();
   }
 
-  private onBtnSubmitClick() {
-    
+  private onPsdTextChanged(editBox: EditBox) {
+    console.log('onPsdTextChanged', editBox.string);
+    this._psd = editBox.string;
+    this.onTextChanged();
   }
 
+  private onVerifyCodeTextChanged(editBox: EditBox) {
+    console.log('onVerifyCodeTextChanged', editBox.string);
+    this._verify_code = editBox.string;
+    this.onTextChanged();
+  }
+
+
+
 }

+ 68 - 24
assets/scripts/modules/lobby/ui/UserInfoView/BindPhone.ts

@@ -12,55 +12,99 @@ const { ccclass, property } = _decorator;
 export class BindPhone extends UIPopup {
   readonly viewId = UIViewID.BindPhone;
 
+  @property(SelectBox)
+  private select_country: SelectBox = null;
+
   @property(Node)
-  private btnClose: Node = null;
+  private btn_close: Node = null;
 
   @property(Node)
-  private btnView: Node = null;
+  private btn_cancel: Node = null;
 
   @property(Node)
-  private btnSubmit: Node = null;
+  private btn_confirm: Node = null;
 
-  @property(EditBox)
-  account: EditBox;
+  @property(Node)
+  private btn_grey: Node = null;
 
   @property(EditBox)
-  code: EditBox;
+  private phone: EditBox = null;
 
   @property(EditBox)
-  psd: EditBox;
+  private psd: EditBox = null;
 
   @property(EditBox)
-  inviteCode: EditBox;
-
-  @property(SelectBox)
-  selectBox: SelectBox;
+  private verify_code: EditBox = null;
 
+  @property(Label)
+  private psd_label: Label = null;
+  private _phone: string = '';
+  private _psd: string = '';
+  private _verify_code: string = '';
 
   protected onCreate(): void | Promise<void> {
-    // addBtnClick(this.btnClose, this.onBtnCloseClick, this);
-    // addBtnClick(this.btnView, this.onBtnViewClick, this);
-    // addBtnClick(this.btnSubmit, this.onBtnSubmitClick, this);
+    addBtnClick(this.btn_close, this.onBtnCloseClick, this);
+    addBtnClick(this.btn_cancel, this.onBtnCloseClick, this);
+    addBtnClick(this.btn_confirm, this.onBtnConfirmClick, this);
+
+    this.phone.node.on(EditBox.EventType.TEXT_CHANGED, this.onPhoneTextChanged, this);
+    this.psd.node.on(EditBox.EventType.TEXT_CHANGED, this.onPsdTextChanged, this);
+    this.verify_code.node.on(EditBox.EventType.TEXT_CHANGED, this.onVerifyCodeTextChanged, this);
+
 
+    const { isGuest } = AppKernel.stores.mainStore.userInfo;
+    const hasPsd = isGuest ? false : true;
+    this.psd_label.string = hasPsd ? 'Current Password' : 'Set Password';
+    this.psd.placeholder = hasPsd ? 'Current Password' : 'Set Password';
 
-    // const selectData = ["Account & Login", "Gameplay Issue", "Payment & Purchase", "Technical Issue"];
-    // this.selectBox?.initSelectItems(selectData);
+    this.select_country.initSelectItems(["+1 United States"], { defaultIndex: 0 });
   }
 
   private onBtnCloseClick() {
-    AppKernel.ui.close(UIViewID.Support);
-    const loginView = AppKernel.ui.get(UIViewID.LoginView) as any;
-    if (loginView && loginView?.enabled) {
-      loginView?._googleWebBtn?.setActive(true);
+    AppKernel.ui.close(UIViewID.BindPhone);
+  }
+
+  private async onBtnConfirmClick() {
+    const phone = this.phone.string;
+    const pwd = this.psd.string;
+    const code = this.verify_code.string;
+    const isReady = !!phone && !!pwd && !!code;
+    if (!isReady) return;
+
+    const res = await AppKernel.stores.mainStore.reqBindPhoneConfirm({
+      account: phone,
+      password: pwd,
+      code: code
+    });
+    if (res) {
+      await AppKernel.ui.close(UIViewID.BindPhone);
+      AppKernel.ui.toast("Bind success");
     }
+
+  }
+
+  private onTextChanged() {
+    const isReady = !!this.phone && !!this._psd && !!this._verify_code;
+    this.btn_grey.active = !isReady;
+    this.btn_confirm.active = isReady;
+  }
+
+  private onPhoneTextChanged(editBox: EditBox) {
+    console.log('onPhoneTextChanged', editBox.string);
+    this._phone = editBox.string;
+    this.onTextChanged();
   }
 
-  private onBtnViewClick() {
-    
+  private onPsdTextChanged(editBox: EditBox) {
+    console.log('onPsdTextChanged', editBox.string);
+    this._psd = editBox.string;
+    this.onTextChanged();
   }
 
-  private onBtnSubmitClick() {
-    
+  private onVerifyCodeTextChanged(editBox: EditBox) {
+    console.log('onVerifyCodeTextChanged', editBox.string);
+    this._verify_code = editBox.string;
+    this.onTextChanged();
   }
 
 }

+ 48 - 28
assets/scripts/modules/lobby/ui/UserInfoView/ChangeAvatar.ts

@@ -5,6 +5,7 @@ import { addBtnClick } from '@scripts/utils/UIHelper';
 import { AppKernel } from '@scripts/app/AppKernel';
 import { SelectBox } from '@scripts/components/selectBox/SelectBox';
 import { UIPopup } from '@scripts/framework/ui/UIPopup';
+import { setSpriteFrame } from '@scripts/utils/ResHelper';
 
 const { ccclass, property } = _decorator;
 
@@ -13,54 +14,73 @@ export class ChangeAvatar extends UIPopup {
   readonly viewId = UIViewID.ChangeAvatar;
 
   @property(Node)
-  private btnClose: Node = null;
+  private btn_close: Node = null;
 
   @property(Node)
-  private btnView: Node = null;
+  private btn_confirm: Node = null;
 
   @property(Node)
-  private btnSubmit: Node = null;
+  private item_avatar: Node = null;
+
+  @property(Node)
+  private layout_select: Node = null;
 
-  @property(EditBox)
-  account: EditBox;
 
-  @property(EditBox)
-  code: EditBox;
+  private items_avatar: Node[] = [];
+  private selectedAvatarId: number = 0;
 
-  @property(EditBox)
-  psd: EditBox;
+  protected onCreate(): void | Promise<void> {
+    addBtnClick(this.btn_close, this.onBtnCloseClick, this);
+    addBtnClick(this.btn_confirm, this.onBtnConfirmClick, this);
 
-  @property(EditBox)
-  inviteCode: EditBox;
+    this.initView();
+  }
 
-  @property(SelectBox)
-  selectBox: SelectBox;
+  private initView() {
+    const { FaceID } = AppKernel.stores.mainStore.userInfo;
+    for (let i = 1; i <= 10; i++) {
+      let node = instantiate(this.item_avatar);
+      node.parent = this.layout_select;
+      node.active = true;
 
+      const sprite_avatar = node.getChildByName('avatar').getComponent(Sprite);
+      const selected = node.getChildByName('selected');
+      setSpriteFrame(sprite_avatar, "public/avatar/" + i, "lobbyRes");
+      selected.active = i == FaceID;
 
-  protected onCreate(): void | Promise<void> {
-    // addBtnClick(this.btnClose, this.onBtnCloseClick, this);
-    // addBtnClick(this.btnView, this.onBtnViewClick, this);
-    // addBtnClick(this.btnSubmit, this.onBtnSubmitClick, this);
+      addBtnClick(node, () => this.onSelectAvatar(i), this);
 
+      this.items_avatar.push(node);
+    }
 
-    // const selectData = ["Account & Login", "Gameplay Issue", "Payment & Purchase", "Technical Issue"];
-    // this.selectBox?.initSelectItems(selectData);
   }
 
+
+
   private onBtnCloseClick() {
-    AppKernel.ui.close(UIViewID.Support);
-    const loginView = AppKernel.ui.get(UIViewID.LoginView) as any;
-    if (loginView && loginView?.enabled) {
-      loginView?._googleWebBtn?.setActive(true);
-    }
+    AppKernel.ui.close(UIViewID.ChangeAvatar);
   }
 
-  private onBtnViewClick() {
-    
+  private async onBtnConfirmClick() {
+    if (this.selectedAvatarId >= 1) {
+      const res = await AppKernel.stores.mainStore.reqChangeUserInfo({ FaceID: this.selectedAvatarId });
+      if (res) {
+        await AppKernel.ui.close(UIViewID.ChangeAvatar);
+        AppKernel.ui.toast("Change success")
+      }
+    }
   }
 
-  private onBtnSubmitClick() {
-    
+  private onSelectAvatar(id: number) {
+    if (this.selectedAvatarId == id) return;
+    console.log("onSelectAvatar", id);
+
+    this.selectedAvatarId = id;
+    this.items_avatar.forEach((item, i) => {
+      const selected = item.getChildByName('selected');
+      selected.active = (i + 1 == id);
+    })
   }
 
+
 }

+ 71 - 22
assets/scripts/modules/lobby/ui/UserInfoView/ChangeEmail.ts

@@ -13,54 +13,103 @@ export class ChangeEmail extends UIPopup {
   readonly viewId = UIViewID.ChangeEmail;
 
   @property(Node)
-  private btnClose: Node = null;
+  private btn_close: Node = null;
 
   @property(Node)
-  private btnView: Node = null;
+  private btn_cancel: Node = null;
 
   @property(Node)
-  private btnSubmit: Node = null;
+  private btn_confirm: Node = null;
+
+  @property(Node)
+  private btn_grey: Node = null;
 
   @property(EditBox)
-  account: EditBox;
+  private cur_email_code: EditBox = null;
 
   @property(EditBox)
-  code: EditBox;
+  private new_email: EditBox = null;
 
   @property(EditBox)
-  psd: EditBox;
+  private psd: EditBox = null;
 
   @property(EditBox)
-  inviteCode: EditBox;
+  private verify_code: EditBox = null;
 
-  @property(SelectBox)
-  selectBox: SelectBox;
+  @property(Label)
+  private cur_email: Label = null;
 
+  private _cur_email_code: string = '';
+  private _new_email: string = '';
+  private _psd: string = '';
+  private _verify_code: string = '';
 
   protected onCreate(): void | Promise<void> {
-    // addBtnClick(this.btnClose, this.onBtnCloseClick, this);
-    // addBtnClick(this.btnView, this.onBtnViewClick, this);
-    // addBtnClick(this.btnSubmit, this.onBtnSubmitClick, this);
+    addBtnClick(this.btn_close, this.onBtnCloseClick, this);
+    addBtnClick(this.btn_cancel, this.onBtnCloseClick, this);
+    addBtnClick(this.btn_confirm, this.onBtnConfirmClick, this);
+
+    this.cur_email_code.node.on(EditBox.EventType.TEXT_CHANGED, this.onCurEmailCodeTextChanged, this);
+    this.new_email.node.on(EditBox.EventType.TEXT_CHANGED, this.onNewEmailTextChanged, this);
+    this.psd.node.on(EditBox.EventType.TEXT_CHANGED, this.onPsdTextChanged, this);
+    this.verify_code.node.on(EditBox.EventType.TEXT_CHANGED, this.onVerifyCodeTextChanged, this);
 
+    const { Email } = AppKernel.stores.mainStore.userInfo;
+    this.cur_email.string = "Current Email:" + Email;
 
-    // const selectData = ["Account & Login", "Gameplay Issue", "Payment & Purchase", "Technical Issue"];
-    // this.selectBox?.initSelectItems(selectData);
   }
 
   private onBtnCloseClick() {
-    AppKernel.ui.close(UIViewID.Support);
-    const loginView = AppKernel.ui.get(UIViewID.LoginView) as any;
-    if (loginView && loginView?.enabled) {
-      loginView?._googleWebBtn?.setActive(true);
+    AppKernel.ui.close(UIViewID.ChangeEmail);
+  }
+
+  private async onBtnConfirmClick() {
+    const old_code = this.cur_email_code.string;
+    const email = this.new_email.string;
+    const pwd = this.psd.string;
+    const new_code = this.verify_code.string;
+    const isReady = !!old_code && !!email && !!pwd && !!new_code;
+    if (!isReady) return;
+
+    const res = await AppKernel.stores.mailStore.reqChangeEmailConfirm({
+      account: email,
+      old_code,
+      new_code,
+      password: pwd
+    });
+    if (res) {
+      await AppKernel.ui.close(UIViewID.ChangeEmail);
+      AppKernel.ui.toast("Change success");
     }
   }
 
-  private onBtnViewClick() {
-    
+  private onTextChanged() {
+    const isReady = !!this._cur_email_code && !!this._new_email && !!this._psd && !!this._verify_code;
+    this.btn_grey.active = !isReady;
+    this.btn_confirm.active = isReady;
   }
 
-  private onBtnSubmitClick() {
-    
+  private onCurEmailCodeTextChanged(editBox: EditBox) {
+    console.log('onCurEmailCodeTextChanged', editBox.string);
+    this._cur_email_code = editBox.string;
+    this.onTextChanged();
   }
 
+  private onNewEmailTextChanged(editBox: EditBox) {
+    console.log('onNewEmailTextChanged', editBox.string);
+    this._new_email = editBox.string;
+    this.onTextChanged();
+  }
+
+  private onPsdTextChanged(editBox: EditBox) {
+    console.log('onPsdTextChanged', editBox.string);
+    this._psd = editBox.string;
+    this.onTextChanged();
+  }
+
+  private onVerifyCodeTextChanged(editBox: EditBox) {
+    console.log('onVerifyCodeTextChanged', editBox.string);
+    this._verify_code = editBox.string;
+    this.onTextChanged();
+  }
 }

+ 28 - 32
assets/scripts/modules/lobby/ui/UserInfoView/ChangeName.ts

@@ -13,54 +13,50 @@ export class ChangeName extends UIPopup {
   readonly viewId = UIViewID.ChangeName;
 
   @property(Node)
-  private btnClose: Node = null;
+  private btn_close: Node = null;
 
   @property(Node)
-  private btnView: Node = null;
-
-  @property(Node)
-  private btnSubmit: Node = null;
-
-  @property(EditBox)
-  account: EditBox;
-
-  @property(EditBox)
-  code: EditBox;
+  private btn_confirm: Node = null;
 
   @property(EditBox)
-  psd: EditBox;
-
-  @property(EditBox)
-  inviteCode: EditBox;
-
-  @property(SelectBox)
-  selectBox: SelectBox;
+  private nickname: EditBox = null;
 
+  private _userInfo: any = null;
 
   protected onCreate(): void | Promise<void> {
-    // addBtnClick(this.btnClose, this.onBtnCloseClick, this);
-    // addBtnClick(this.btnView, this.onBtnViewClick, this);
-    // addBtnClick(this.btnSubmit, this.onBtnSubmitClick, this);
+    addBtnClick(this.btn_close, this.onBtnCloseClick, this);
+    addBtnClick(this.btn_confirm, this.onBtnConfirmClick, this);
 
+    this._userInfo = AppKernel.stores.mainStore.userInfo;
+    const { NickName } = this._userInfo;
+    this.nickname.placeholder = NickName;
 
-    // const selectData = ["Account & Login", "Gameplay Issue", "Payment & Purchase", "Technical Issue"];
-    // this.selectBox?.initSelectItems(selectData);
   }
 
   private onBtnCloseClick() {
-    AppKernel.ui.close(UIViewID.Support);
-    const loginView = AppKernel.ui.get(UIViewID.LoginView) as any;
-    if (loginView && loginView?.enabled) {
-      loginView?._googleWebBtn?.setActive(true);
-    }
+    AppKernel.ui.close(UIViewID.ChangeName);
   }
 
-  private onBtnViewClick() {
-    
+  private async onBtnConfirmClick() {
+    const newName = this.nickname.string;
+    if (this._userInfo.NickName === newName || !newName) {
+      AppKernel.ui.toast("Cannot use the same nickname");
+    } else if (!this.validateNickname(newName)) {
+      AppKernel.ui.toast("Invalid format")
+    } else {
+      const res = await AppKernel.stores.mainStore.reqChangeUserInfo({ NickName: newName });
+      if (res) {
+        await AppKernel.ui.close(UIViewID.ChangeName);
+        AppKernel.ui.toast("Change success")
+      }
+    }
   }
 
-  private onBtnSubmitClick() {
-    
+  private validateNickname(name: string): boolean {
+    const str = name.trim();
+    const reg = /^[a-zA-Z][a-zA-Z0-9_]{2,19}$/;
+    return reg.test(str);
   }
 
+
 }

+ 76 - 22
assets/scripts/modules/lobby/ui/UserInfoView/ChangePhone.ts

@@ -12,55 +12,109 @@ const { ccclass, property } = _decorator;
 export class ChangePhone extends UIPopup {
   readonly viewId = UIViewID.ChangePhone;
 
+  @property(SelectBox)
+  private select_country: SelectBox = null;
+
+  @property(Node)
+  private btn_close: Node = null;
+
   @property(Node)
-  private btnClose: Node = null;
+  private btn_cancel: Node = null;
 
   @property(Node)
-  private btnView: Node = null;
+  private btn_confirm: Node = null;
 
   @property(Node)
-  private btnSubmit: Node = null;
+  private btn_grey: Node = null;
 
   @property(EditBox)
-  account: EditBox;
+  private cur_phone_code: EditBox = null;
 
   @property(EditBox)
-  code: EditBox;
+  private new_phone: EditBox = null;
 
   @property(EditBox)
-  psd: EditBox;
+  private psd: EditBox = null;
 
   @property(EditBox)
-  inviteCode: EditBox;
+  private verify_code: EditBox = null;
 
-  @property(SelectBox)
-  selectBox: SelectBox;
+  @property(Label)
+  private cur_phone: Label = null;
 
+  private _cur_phone_code: string = '';
+  private _new_phone: string = '';
+  private _psd: string = '';
+  private _verify_code: string = '';
 
   protected onCreate(): void | Promise<void> {
-    // addBtnClick(this.btnClose, this.onBtnCloseClick, this);
-    // addBtnClick(this.btnView, this.onBtnViewClick, this);
-    // addBtnClick(this.btnSubmit, this.onBtnSubmitClick, this);
+    addBtnClick(this.btn_close, this.onBtnCloseClick, this);
+    addBtnClick(this.btn_cancel, this.onBtnCloseClick, this);
+    addBtnClick(this.btn_confirm, this.onBtnConfirmClick, this);
+
+    this.cur_phone_code.node.on(EditBox.EventType.TEXT_CHANGED, this.onCurPhoneCodeTextChanged, this);
+    this.new_phone.node.on(EditBox.EventType.TEXT_CHANGED, this.onNewPhoneTextChanged, this);
+    this.psd.node.on(EditBox.EventType.TEXT_CHANGED, this.onPsdTextChanged, this);
+    this.verify_code.node.on(EditBox.EventType.TEXT_CHANGED, this.onVerifyCodeTextChanged, this);
+
+    const { Phone } = AppKernel.stores.mainStore.userInfo;
+    this.cur_phone.string = "Current Phone:" + Phone;
 
 
-    // const selectData = ["Account & Login", "Gameplay Issue", "Payment & Purchase", "Technical Issue"];
-    // this.selectBox?.initSelectItems(selectData);
+    this.select_country.initSelectItems(["+1 United States"], { defaultIndex: 0 });
   }
 
   private onBtnCloseClick() {
-    AppKernel.ui.close(UIViewID.Support);
-    const loginView = AppKernel.ui.get(UIViewID.LoginView) as any;
-    if (loginView && loginView?.enabled) {
-      loginView?._googleWebBtn?.setActive(true);
+    AppKernel.ui.close(UIViewID.ChangePhone);
+  }
+
+  private async onBtnConfirmClick() {
+    const old_code = this.cur_phone_code.string;
+    const phone = this.new_phone.string;
+    const pwd = this.psd.string;
+    const new_code = this.verify_code.string;
+    const isReady = !!old_code && !!phone && !!pwd && !!new_code;
+    if (!isReady) return;
+
+    const res = await AppKernel.stores.mainStore.reqChangePhoneConfirm({
+      oldCode: old_code,
+      newPhone: phone,
+      newCode: new_code,
+      password: pwd
+    });
+    if (res) {
+      await AppKernel.ui.close(UIViewID.ChangePhone);
+      AppKernel.ui.toast("Change success");
     }
   }
 
-  private onBtnViewClick() {
-    
+  private onTextChanged() {
+    const isReady = !!this._cur_phone_code && !!this._new_phone && !!this._psd && !!this._verify_code;
+    this.btn_grey.active = !isReady;
+    this.btn_confirm.active = isReady;
+  }
+
+  private onCurPhoneCodeTextChanged(editBox: EditBox) {
+    console.log('onCurPhoneCodeTextChanged', editBox.string);
+    this._cur_phone_code = editBox.string;
+    this.onTextChanged();
   }
 
-  private onBtnSubmitClick() {
-    
+  private onNewPhoneTextChanged(editBox: EditBox) {
+    console.log('onNewPhoneTextChanged', editBox.string);
+    this._new_phone = editBox.string;
+    this.onTextChanged();
   }
 
+  private onPsdTextChanged(editBox: EditBox) {
+    console.log('onPsdTextChanged', editBox.string);
+    this._psd = editBox.string;
+    this.onTextChanged();
+  }
+
+  private onVerifyCodeTextChanged(editBox: EditBox) {
+    console.log('onVerifyCodeTextChanged', editBox.string);
+    this._verify_code = editBox.string;
+    this.onTextChanged();
+  }
 }

+ 84 - 0
assets/scripts/modules/lobby/ui/UserInfoView/UnbindAccount.ts

@@ -0,0 +1,84 @@
+import { _decorator, Button, Color, EditBox, instantiate, Label, Node, RichText, Sprite, SpriteFrame, UITransform } from 'cc';
+import { UIViewID } from '@scripts/define/UIDefine';
+import { UICloseReason } from '@scripts/framework/ui/UILayer';
+import { addBtnClick } from '@scripts/utils/UIHelper';
+import { AppKernel } from '@scripts/app/AppKernel';
+import { SelectBox } from '@scripts/components/selectBox/SelectBox';
+import { UIPopup } from '@scripts/framework/ui/UIPopup';
+import { checkIsEmail } from '@scripts/utils/Helper';
+
+const { ccclass, property } = _decorator;
+
+@ccclass('UnbindAccount')
+export class UnbindAccount extends UIPopup {
+  readonly viewId = UIViewID.UnbindAccount;
+
+  @property(Node)
+  private btn_close: Node = null;
+
+  @property(Node)
+  private btn_confirm: Node = null;
+
+  @property(Node)
+  private btn_grey: Node = null;
+
+  @property(EditBox)
+  private account: EditBox = null;
+
+  @property(EditBox)
+  private verify_code: EditBox = null;
+
+  @property(Label)
+  private _account: string = '';
+  private _verify_code: string = '';
+
+  protected onCreate(): void | Promise<void> {
+    addBtnClick(this.btn_close, this.onBtnCloseClick, this);
+    addBtnClick(this.btn_confirm, this.onBtnConfirmClick, this);
+
+    this.account.node.on(EditBox.EventType.TEXT_CHANGED, this.onAccountTextChanged, this);
+    this.verify_code.node.on(EditBox.EventType.TEXT_CHANGED, this.onVerifyCodeTextChanged, this);
+  }
+
+  private onBtnCloseClick() {
+    AppKernel.ui.close(UIViewID.UnbindAccount);
+  }
+
+  private async onBtnConfirmClick() {
+    const account = this.account.string;
+    const code = this.verify_code.string;
+    const isReady = !!account && !!code;
+    if (!isReady) return;
+
+    const res = await AppKernel.stores.mainStore.reqUnBind3rdConfirm({
+      verify_type: checkIsEmail(account) ? "email" : "phone",
+      code
+    });
+    if (res) {
+      await AppKernel.ui.close(UIViewID.UnbindAccount);
+      AppKernel.ui.toast("Unbind success");
+    }
+  }
+
+  private onTextChanged() {
+    const isReady = !!this._account && !!this._verify_code;
+    this.btn_confirm.active = isReady;
+    this.btn_grey.active = !isReady;
+  }
+
+  private onAccountTextChanged(editBox: EditBox) {
+    console.log('onAccountTextChanged', editBox.string);
+    this._account = editBox.string;
+    this.onTextChanged();
+  }
+
+  private onVerifyCodeTextChanged(editBox: EditBox) {
+    console.log('onVerifyCodeTextChanged', editBox.string);
+    this._verify_code = editBox.string;
+    this.onTextChanged();
+  }
+
+
+
+
+}

+ 0 - 0
assets/scripts/modules/lobby/ui/UserInfoView/AccountUnlink.ts.meta → assets/scripts/modules/lobby/ui/UserInfoView/UnbindAccount.ts.meta


+ 215 - 22
assets/scripts/modules/lobby/ui/UserInfoView/UserInfoView.ts

@@ -5,6 +5,7 @@ import { UIViewID } from '@scripts/define/UIDefine';
 import { UICloseReason } from '@scripts/framework/ui/UILayer';
 import { formatCurrency } from '@scripts/utils/Helper';
 import { addBtnClick } from '@scripts/utils/UIHelper';
+import { setSpriteFrame } from '@scripts/utils/ResHelper';
 
 const { ccclass, property } = _decorator;
 
@@ -12,50 +13,242 @@ const { ccclass, property } = _decorator;
 export class UserInfoView extends UIView {
   readonly viewId = UIViewID.UserInfoView;
 
-  @property(Button)
-  btnGuest: Button;
-
-  @property(Button)
-  btnFacebook: Button;
+  @property(Node)
+  btn_close: Node;
 
-  @property(Button)
-  btnGoogle: Button;
+  @property(Node)
+  btn_email: Node;
 
-  @property(EditBox)
-  loginAccount: EditBox;
+  @property(Node)
+  btn_phone: Node;
 
-  @property(EditBox)
-  loginPassword: EditBox;
+  @property(Node)
+  btn_avatar: Node;
 
   @property(Node)
-  psd_visible_control: Node;
+  btn_name: Node;
 
   @property(Node)
-  btnLogin: Node;
+  btn_copy_id: Node;
 
   @property(Node)
-  btnRegister: Node;
+  btn_bind_google: Node;
 
   @property(Node)
-  btnResetPsd: Node;
+  btn_bind_facebook: Node;
 
   @property(Node)
-  btnSupport: Node;
+  btn_unlink_third_party: Node;
+
+  @property(Sprite)
+  avatar: Sprite;
+
+  @property(Label)
+  nickname: Label;
+
+  @property(Label)
+  id: Label;
+
+  @property(Label)
+  level: Label;
+
+  @property(Label)
+  vip_level: Label;
+
+  @property(Label)
+  score: Label;
+
+  @property(Label)
+  gold_score: Label;
+
+  @property(Label)
+  email: Label;
+
+  @property(Label)
+  phone: Label;
 
   @property(Node)
-  policyContainer: Node;
+  third_party: Node;
+
+
+
+  private _userInfo: any;
+  private _googleWebBtn;
+
+  private listenViews: UIViewID[] = [
+    UIViewID.BindEmail,
+    UIViewID.ChangeEmail,
+    UIViewID.BindPhone,
+    UIViewID.ChangePhone,
+    UIViewID.ChangeAvatar,
+    UIViewID.ChangeName,
+    UIViewID.UnbindAccount,
+  ];
+
 
 
   protected onCreate(): void | Promise<void> {
-    // addBtnClick(this.btnGuest.node, this.onBtnGuestClick, this);
-    // addBtnClick(this.btnFacebook.node, this.onBtnFBClick, this);
-    // addBtnClick(this.btnGoogle.node, this.onBtnGoogleClick, this);
+    AppKernel.events.on('user:update', this.updateUserInfo, this);
+    AppKernel.events.on('open:ui-view', this.handleSubViewOpen, this);
+    AppKernel.events.on('close:ui-view', this.handleSubViewClose, this);
+
+    addBtnClick(this.btn_close, this.onBtnCloseClick, this);
+    addBtnClick(this.btn_email, this.onBtnEmailClick, this);
+    addBtnClick(this.btn_phone, this.onBtnPhoneClick, this);
+    addBtnClick(this.btn_avatar, this.onBtnAvatarClick, this);
+    addBtnClick(this.btn_name, this.onBtnNameClick, this);
+    addBtnClick(this.btn_copy_id, this.onBtnCopyIDClick, this);
+    addBtnClick(this.btn_bind_google, this.onBtnBindGoogleClick, this);
+    addBtnClick(this.btn_bind_facebook, this.onBtnBindFacebookClick, this);
+    addBtnClick(this.btn_unlink_third_party, this.onBtnUnlinkThirdPartyClick, this);
+
+
+    this._googleWebBtn = AppKernel.google.createLoginBtn(
+      this.btn_bind_google,
+      res => this.onGoogleWebLogin(res),
+    );
+  }
+
+  protected onOpen(_params: unknown): void | Promise<void> {
+    /// 播放完打开动画后 再显示h5 google login btn dom
+    this._googleWebBtn?.setActive(true);
+    this.updateUserInfo();
+  }
+
+  protected onClose(_reason: UICloseReason): void | Promise<void> {
+    this._googleWebBtn?.setActive(false);
+  }
 
+  protected onDestroy(): void {
+    this._googleWebBtn?.clear();
+    super.onDestroy();
+  }
+
+  private updateUserInfo() {
+    this._userInfo = AppKernel.stores.mainStore.userInfo;
+    const {
+      FaceID,
+      NickName,
+      GameID,
+      Level,
+      vipLevel,
+      Score,
+      InsureScore,
+      Email,
+      Phone,
+      third_party
+    } = this._userInfo; // TODO: 获取用户信息
+    console.log("updateUserInfo", this._userInfo);
+
+    if (FaceID >= 1) setSpriteFrame(this.avatar, "public/avatar/" + FaceID, "lobbyRes");
+    this.nickname.string = NickName;
+    this.id.string = `ID:${GameID}`;
+    this.level.string = `LV.${Level}`;
+    this.vip_level.string = `VIP.${vipLevel}`;
+    this.score.string = Score;
+    this.gold_score.string = InsureScore;
+
+    this.email.string = Email ? Email : "Not bound";
+    const btn_email_label = this.btn_email.getChildByName("label");
+    btn_email_label.getComponent(Label).string = Email ? "CHANGE" : "BIND";
+
+    this.phone.string = Phone ? Phone : "Not bound";
+    const btn_phone_label = this.btn_phone.getChildByName("label");
+    btn_phone_label.getComponent(Label).string = Phone ? "CHANGE" : "BIND";
+
+    if (third_party) {
+      const third_party_unlink = this.third_party.getChildByName("unlink");
+      const third_party_linked = this.third_party.getChildByName("linked");
+      const { bound, provider } = third_party;
+      third_party_linked.active = bound;
+      third_party_unlink.active = !bound;
+      if (bound) {
+        const google = third_party_linked.getChildByName("google");
+        const facebook = third_party_linked.getChildByName("facebook");
+        google.active = provider === "google";
+        facebook.active = provider === "facebook";
+      }
+    }
+  }
+
+  private onBtnCloseClick() {
+    AppKernel.ui.close(UIViewID.UserInfoView);
+  }
+
+  private onBtnEmailClick() {
+    const { Email } = this._userInfo;
+    AppKernel.ui.open(Email ? UIViewID.ChangeEmail : UIViewID.BindEmail);
+  }
+
+  private onBtnPhoneClick() {
+    const { Phone } = this._userInfo;
+    AppKernel.ui.open(Phone ? UIViewID.ChangePhone : UIViewID.BindPhone);
+  }
+
+  private onBtnAvatarClick() {
+    AppKernel.ui.open(UIViewID.ChangeAvatar);
+  }
+
+  private onBtnNameClick() {
+    AppKernel.ui.open(UIViewID.ChangeName);
+  }
+
+  private onBtnCopyIDClick() {
+    const { GameID } = this._userInfo;
+  }
+
+  private async onBtnBindGoogleClick() {
+    AppKernel.ui.loading(true);
+    const res = await AppKernel.stores.mainStore.reqBindGoogle();
+    AppKernel.ui.loading(false);
+    if (res) AppKernel.ui.toast("Bind success");
+  }
+
+  private async onGoogleWebLogin(res) {
+    AppKernel.ui.loading(true);
+    const result = await AppKernel.stores.mainStore.reqBindGoogle(res);
+    AppKernel.ui.loading(false);
+    if (result) AppKernel.ui.toast("Bind success");
+  }
+
+  private async onBtnBindFacebookClick() {
+    AppKernel.ui.loading(true);
+    const res = await AppKernel.stores.mainStore.reqBindFacebook();
+    AppKernel.ui.loading(false);
+    if (res) AppKernel.ui.toast("Bind success");
+  }
 
+  private onBtnUnlinkThirdPartyClick() {
+    const { Phone, Email } = this._userInfo;
+
+    console.log("onBtnUnlinkThirdPartyClick", Phone, Email);
+    if (!Phone && !Email) {
+      AppKernel.ui.dialog({
+        message: "Bind an email or phone number before unlinking this account.",
+        callBack: (res) => {
+          // AppKernel.appLobby.openLogin();
+          // console.log("close dialog");
+          return true;
+        }
+      })
+    } else {
+      AppKernel.ui.open(UIViewID.UnbindAccount);
+    }
+  }
 
-    // this.initPsdInput();
-    // this.initPolicyDesc();
+  private handleSubViewOpen(payload: UIViewID) {
+    if (this.listenViews.includes(payload)) {
+      this._googleWebBtn?.setActive(false);
+      console.log("UserInfoView handleSubUIOpen", payload);
+    }
+  }
 
+  private handleSubViewClose(payload: UIViewID) {
+    if (this.listenViews.includes(payload)) {
+      this._googleWebBtn?.setActive(true);
+      console.log("UserInfoView handleSubUIClose", payload);
+    }
   }
 
+
 }

+ 117 - 9
assets/scripts/store/mailStore/MailStore.ts

@@ -1,4 +1,8 @@
 import {
+    APP_EMAIL_BIND_CODE,
+    APP_EMAIL_BIND_CONFIRM,
+    APP_EMAIL_CHANGE_CODE,
+    APP_EMAIL_CHANGE_CONFIRM,
     APP_EMAIL_RESET_PSD,
     APP_EMAIL_SEND_CODE,
     APP_MAIL_CHECK,
@@ -12,15 +16,53 @@ import { Http } from '../../request';
 import { success } from '@scripts/api/ApiHelper';
 import { IMailActionData, IMailCheckData, IMailItem, IMailPageData } from './data';
 import { APP_LOGIN_TYPE } from '@scripts/define/Define';
+import { mainStore } from '../mainStore/MainStore';
+import { AppKernel } from '@scripts/app/AppKernel';
+import { IUserData } from '../mainStore/data';
 
 const APP_OTP_INTERVAL = 60;
 
+export enum MailOtpType {
+    Register,
+    Reset,
+    Bind,
+    ChangeOld,
+    ChangeNew,
+}
+
 class MailStore {
     private _pageData: IMailPageData = null;
     private _newMailCount = 0;
     private _mailList: IMailItem[] = [];
     private _readMailID = 0;
-    private _lastOtpTs = 0;
+    // private _lastOtpTs = 0;
+    // private _lastOtpTs_bindEmail = 0;
+    // private _lastOtpTs_changeEmail_old = 0;
+    // private _lastOtpTs_changeEmail_new = 0;
+
+    private _otpTsMap: Record<MailOtpType, number> = {
+        [MailOtpType.Register]: 0,
+        [MailOtpType.Reset]: 0,
+        [MailOtpType.Bind]: 0,
+        [MailOtpType.ChangeOld]: 0,
+        [MailOtpType.ChangeNew]: 0,
+    };
+
+    private calcOtpCD(lastTs: number): number {
+        const times = Math.floor((Date.now() - lastTs) / 1000);
+        if (times > APP_OTP_INTERVAL) return 0;
+        return APP_OTP_INTERVAL - times;
+    }
+
+    public setOtpTs(type: MailOtpType): void {
+        this._otpTsMap[type] = Date.now();
+    }
+    public getOtpCD(type: MailOtpType): number {
+        return this.calcOtpCD(this._otpTsMap[type]);
+    }
+
+
+
 
     public get pageData() { return this._pageData; }
 
@@ -30,12 +72,6 @@ class MailStore {
 
     public get readMailID() { return this._readMailID; }
 
-    public get otpCD() {
-        const times = Math.floor((Date.now() - this._lastOtpTs) / 1000);
-        if (times > APP_OTP_INTERVAL) return 0;
-        return APP_OTP_INTERVAL - times;
-    }
-
     getMail(mailID: number) {
         return this._mailList.find(item => Number(item.MailID) === Number(mailID)) || null;
     }
@@ -112,7 +148,11 @@ class MailStore {
     }
 
     async reqSendCode(account: string, purpose: string) {
-        const cd = this.otpCD;
+        const send_type = purpose == "register"
+            ? MailOtpType.Register
+            : MailOtpType.Reset;
+
+        const cd = this.getOtpCD(send_type);
         if (cd > 0) return false;
 
         const params = {
@@ -123,7 +163,7 @@ class MailStore {
 
         const res = await Http.call(APP_EMAIL_SEND_CODE, params);
         if (success(res)) {
-            this._lastOtpTs = Date.now();
+            this.setOtpTs(send_type);
             return true;
         }
         return false;
@@ -163,6 +203,74 @@ class MailStore {
         return false;
     }
 
+    async reqBindEmailCode({ account }) {
+        const params = {
+            email: account,
+            confirm_email: account,
+        }
+
+        const res = await Http.call(APP_EMAIL_BIND_CODE, params);
+        if (success(res)) {
+            this.setOtpTs(MailOtpType.Bind);
+            return true;
+        }
+        return false;
+    }
+
+    async reqBindEmailConfirm({ account, code, password }) {
+        const params = {
+            email: account,
+            code,
+            password,
+        }
+
+        const res = await Http.call<IUserData>(APP_EMAIL_BIND_CONFIRM, params);
+        if (success(res)) {
+            mainStore.updateUserInfo(res.data);
+            AppKernel.events.emit('user:update');
+
+            return true;
+        }
+        return false;
+    }
+
+    async reqChangeEmailCode({ account, target }) {
+        const send_type = target == "new"
+            ? MailOtpType.ChangeNew
+            : MailOtpType.ChangeOld;
+
+        const params = {
+            target,
+            email: account,
+            confirm_email: account
+        }
+
+        const res = await Http.call(APP_EMAIL_CHANGE_CODE, params);
+        if (success(res)) {
+            this.setOtpTs(send_type);
+            return true;
+        }
+        return false;
+    }
+
+    async reqChangeEmailConfirm({ account, old_code, new_code, password }) {
+        const params = {
+            email: account,
+            old_code,
+            new_code,
+            password,
+        }
+
+        const res = await Http.call(APP_EMAIL_CHANGE_CONFIRM, params);
+        if (success(res)) {
+            await mainStore.reqUserInfo();
+            AppKernel.events.emit('user:update');
+
+            return true;
+        }
+        return false;
+    }
+
 }
 
 export const mailStore = new MailStore();

+ 158 - 13
assets/scripts/store/mainStore/MainStore.ts

@@ -10,6 +10,11 @@ import {
     APP_FORGET_PASS,
     APP_LOGOUT,
     APP_CHANGE_INFO,
+    APP_BIND_SMS,
+    APP_CHANGE_BIND_PHONE,
+    APP_BIND_3RD,
+    APP_UNBIND_3RD,
+    APP_UNBIND_3RD_CONFIRM,
 } from "../../api";
 import { success } from '@scripts/api/ApiHelper';
 import { AppKernel } from "../../app/AppKernel";
@@ -25,9 +30,16 @@ import {
     IUserData,
     IWithdrawChannel,
 } from "./data";
+import { IGoogleLoginRes } from "@scripts/platform/Google/GoogleImpl";
 
 const APP_OTP_INTERVAL = 60;
 
+export enum OtpType {
+    Main,
+    ChangeOld,
+    Unbind3rd,
+}
+
 class MainStore {
     private _hallServerUrl: string;
     private _isGuest: boolean;
@@ -41,10 +53,28 @@ class MainStore {
     private _withdrawFeeRate: number;
     private _serverKick: boolean;
     private _protectInfo: IProtectInfo = null;
-    private _lastOtpTs = 0;
     private _noticesList: INoticeData[] = [];
     private _currencyKind: CurrencyType;
 
+    private _otpTsMap: Record<OtpType, number> = {
+        [OtpType.Main]: 0,
+        [OtpType.ChangeOld]: 0,
+        [OtpType.Unbind3rd]: 0,
+    };
+
+    private calcOtpCD(lastTs: number): number {
+        const times = Math.floor((Date.now() - lastTs) / 1000);
+        if (times > APP_OTP_INTERVAL) return 0;
+        return APP_OTP_INTERVAL - times;
+    }
+
+    public setOtpTs(type: OtpType): void {
+        this._otpTsMap[type] = Date.now();
+    }
+    public getOtpCD(type: OtpType): number {
+        return this.calcOtpCD(this._otpTsMap[type]);
+    }
+
     public set currencyKind(value: CurrencyType) {
         this._currencyKind = value;
         localStorageSet(LOCAL_CURRENCY_MODE, value);
@@ -88,11 +118,6 @@ class MainStore {
 
     public get gcScore() { return this.userInfo?.InsureScore || 0 };
 
-    public get otpCD() {
-        const times = Math.floor((Date.now() - this._lastOtpTs) / 1000);
-        if (times > APP_OTP_INTERVAL) return 0;
-        return APP_OTP_INTERVAL - times;
-    }
 
     constructor() {
         this._currencyKind = localStorageGet(LOCAL_CURRENCY_MODE, CURRENCY_TYPE.GC) as CurrencyType;
@@ -277,18 +302,27 @@ class MainStore {
         }
     }
 
-    async reqSendCode(account: string) {
-        const cd = this.otpCD;
+    async reqSendCode(account: string, isChangeOld: boolean = false) {
+        const Type = isChangeOld ? 3 : 2 //换绑发旧手机为3
+
+        const cd = isChangeOld
+            ? this.getOtpCD(OtpType.ChangeOld)
+            : this.getOtpCD(OtpType.Main);
         if (cd > 0) return false;
 
         const params = {
             Phone: account,
             country: 1,
+            Type
         }
 
         const res = await Http.call(APP_SEND_CODE, params);
         if (success(res)) {
-            this._lastOtpTs = Date.now();
+            if (isChangeOld) {
+                this.setOtpTs(OtpType.ChangeOld);
+            } else {
+                this.setOtpTs(OtpType.Main);
+            }
             return true;
         }
         return false;
@@ -323,18 +357,25 @@ class MainStore {
         return false;
     }
 
-    async reqChangeUserInfo() {
+    async reqChangeUserInfo(payload: any) {
         const params = {
-
-        }
-        const res = await Http.call(APP_CHANGE_INFO, params);
+            ...payload
+        };
+        const res = await Http.call<IUserData>(APP_CHANGE_INFO, params);
         if (success(res)) {
+            this._userInfo = res.data;
+            AppKernel.events.emit('user:update');
             return true;
         }
 
         return false;
     }
 
+    updateUserInfo(data: IUserData) {
+        if (!data || typeof data !== 'object') return;
+        this.parseLogin(data);
+    }
+
     async reqLogout() {
         const res = await Http.call(APP_LOGOUT);
         if (success(res)) {
@@ -354,6 +395,110 @@ class MainStore {
         return this._noticesList.shift();
     }
 
+    async reqBindPhoneConfirm({ account, code, password }) {
+        const params = {
+            phone: account,
+            code,
+            password,
+            country: 1
+        }
+        const res = await Http.call<IUserData>(APP_BIND_SMS, params);
+        if (success(res)) {
+            mainStore.updateUserInfo(res.data);
+            AppKernel.events.emit('user:update');
+
+            return true;
+        }
+        return false;
+
+    }
+
+    async reqChangePhoneConfirm({ oldCode, newPhone, newCode, password }) {
+        const params = {
+            oldCode,
+            newPhone,
+            newCode,
+            password,
+            country: 1
+        }
+        const res = await Http.call<IUserData>(APP_CHANGE_BIND_PHONE, params);
+        if (success(res)) {
+            mainStore.updateUserInfo(res.data);
+            AppKernel.events.emit('user:update');
+
+            return true;
+        }
+        return false;
+
+    }
+
+
+    async reqBind3rd(type: Login3rdType, token: string) {
+        const params: any = {
+            provider: type,
+            token: token
+        }
+        const res = await Http.call(APP_BIND_3RD, params);
+        if (success(res)) {
+            await this.reqUserInfo();
+            AppKernel.events.emit('user:update');
+        }
+        return res;
+    }
+
+    async reqBindFacebook() {
+        const res = await AppKernel.fb.login();
+        console.log("facebook bind res: ", res);
+        if (res.accessToken) {
+            return await this.reqBind3rd('facebook', res.accessToken);
+        }
+
+        return false;
+    }
+
+    async reqBindGoogle(res?: IGoogleLoginRes) {
+        if (!res) {
+            /// h5 通过dom按钮触发登录
+            res = await AppKernel.google.login();
+        }
+
+        if (res && res.accessToken) {
+            return await this.reqBind3rd('google', res.accessToken);
+        }
+        return true;
+    }
+
+    async reqUnBind3rdCode({ verify_type }) {
+        const params = {
+            verify_type
+        }
+
+        const res = await Http.call(APP_UNBIND_3RD, params);
+        if (success(res)) {
+            this.setOtpTs(OtpType.Unbind3rd);
+            return true;
+        }
+        return false;
+
+    }
+
+    async reqUnBind3rdConfirm({ verify_type, code }) {
+        const params = {
+            verify_type,
+            code
+        }
+        const res = await Http.call(APP_UNBIND_3RD_CONFIRM, params);
+        if (success(res)) {
+            await this.reqUserInfo();
+            AppKernel.events.emit('user:update');
+
+            return true;
+        }
+        return false;
+    }
+
+
+
 }
 
 

+ 1 - 0
assets/scripts/store/mainStore/data.ts

@@ -31,6 +31,7 @@ export interface IUserData {
     vipExp: number;
     recommendGame?: string;
     reg?: number;
+    isGuest: boolean;
 }
 
 export interface IWithdrawConfig {

Some files were not shown because too many files changed in this diff