浏览代码

更新一个版本 api

Citrus 6 月之前
父节点
当前提交
b081576ec8

+ 228 - 0
API.txt

@@ -0,0 +1,228 @@
+yx.dashenwangluo.com
+
+API 接口说明:
+	1.发送验证码
+	POST /v1/user/send_code
+	参数:
+	- mobile: 手机号
+	返回:
+	{
+	    "code": 200,
+	    "msg": "发送成功",
+	    "time": 1621234567,
+	    "data": []
+	}
+
+	2.手机号登录
+	POST /v1/user/login
+	参数:
+	- mobile: 手机号
+	- code: 验证码
+	返回:
+	{
+	    "code": 200,
+	    "msg": "success",
+	    "time": 1621234567,
+	    "data": {
+	        "token": "xxx",
+	        "user_info": {
+	            "id": 1,
+	            "username": "13800138000",
+	            "nickname": "138****8000",
+	            "avatar": "",
+	            "balance": "0.00"
+	        }
+	    }
+	}
+
+	3.微信登录
+	POST /v1/user/wx_login
+	参数:
+	- code: 微信登录code
+	- nickName: 用户昵称(可选)
+	- avatarUrl: 头像URL(可选)
+	返回:
+	{
+	    "code": 200,
+	    "msg": "success",
+	    "time": 1621234567,
+	    "data": {
+	        "token": "xxx",
+	        "user_info": {
+	            "id": 1,
+	            "username": "",
+	            "nickname": "微信用户",
+	            "avatar": "https://xxx",
+	            "balance": "0.00"
+	        }
+	    }
+	}
+
+	4.获取任务配置
+	GET /v1/task/config
+	Header:
+	- token: 用户token
+	返回:
+	{
+	    "code": 200,
+	    "msg": "success",
+	    "time": 1621234567,
+	    "data": {
+	        "ad_watch": {
+	            "title": "观看广告",
+	            "reward_min": "0.10",
+	            "reward_max": "0.50",
+	            "total_times": 10,
+	            "finished_times": 3,
+	            "status": "ongoing"
+	        },
+	        "sign_in": {
+	            "title": "每日签到",
+	            "reward": "0.30",
+	            "continuous_days": 3,
+	            "continuous_reward": "1.00",
+	            "continuous_days_required": 7,
+	            "status": "ongoing"
+	        }
+	    }
+	}
+
+	5.完成任务
+	POST /v1/task/complete
+	Header:
+	- token: 用户token
+	参数:
+	- task_type: 任务类型(ad_watch/sign_in)
+	返回:
+	{
+	    "code": 200,
+	    "msg": "success",
+	    "time": 1621234567,
+	    "data": {
+	        "reward": "0.30",
+	        "message": "获得奖励0.30元"
+	    }
+	}
+
+	6.获取提现规则
+	GET /v1/withdraw/rule
+	Header:
+	- token: 用户token
+	返回:
+	{
+	    "code": 200,
+	    "msg": "success",
+	    "time": 1621234567,
+	    "data": {
+	        "min_amount": "10.00",
+	        "max_amount": "1000.00",
+	        "fee_rate": "1.00",
+	        "daily_times": 3,
+	        "today_times": 1,
+	        "remain_times": 2,
+	        "balance": "100.00"
+	    }
+	}
+
+	7.申请提现
+	POST /v1/withdraw/apply
+	Header:
+	- token: 用户token
+	参数:
+	- amount: 提现金额
+	- withdraw_type: 提现方式(alipay/wxpay/bank)
+	- account: 提现账号
+	- real_name: 真实姓名
+	返回:
+	{
+	    "code": 200,
+	    "msg": "success",
+	    "time": 1621234567,
+	    "data": {
+	        "amount": "100.00",
+	        "fee": "1.00",
+	        "actual_amount": "99.00",
+	        "status": "pending"
+	    }
+	}
+
+	8.获取提现记录
+	GET /v1/withdraw/log?page=1&limit=20
+	Header:
+	- token: 用户token
+	返回:
+	{
+	    "code": 200,
+	    "msg": "success",
+	    "time": 1621234567,
+	    "data": {
+	        "total": 10,
+	        "list": [
+	            {
+	                "id": 1,
+	                "amount": "100.00",
+	                "fee": "1.00",
+	                "actual_amount": "99.00",
+	                "withdraw_type": "alipay",
+	                "withdraw_type_text": "支付宝",
+	                "account": "18****88",
+	                "status": "pending",
+	                "status_text": "待审核",
+	                "createtime": "2024-01-01 12:00:00"
+	            }
+	        ]
+	    }
+	}
+
+	9.记录广告观看
+	POST /v1/ad/record
+	Header:
+	- token: 用户token
+	参数:
+	- ad_type: 广告类型(默认reward)
+	- duration: 观看时长,单位秒(默认30)
+	返回:
+	{
+	    "code": 200,
+	    "msg": "success",
+	    "time": 1621234567,
+	    "data": {
+	        "reward": "0.50",          // 获得奖励金额
+	        "balance": "100.50",       // 当前余额
+	        "today_times": 1,          // 今日已观看次数
+	        "remain_times": 9          // 今日剩余观看次数
+	    }
+	}
+	错误码:
+	- 401: 用户未登录
+	- 0: 操作太频繁,请X分钟后再试
+	- 0: 观看次数过多,请稍后再试
+	- 0: 今日观看次数已达上限
+
+	10. 获取广告配置
+	GET /v1/ad/config
+	Header:
+	- token: 用户token
+	参数: 无
+	返回:
+	{
+	    "code": 200,
+	    "msg": "success",
+	    "time": 1621234567,
+	    "data": [
+	        {
+	            "platform": "admob",           // 广告平台标识
+	            "config": {                    // 平台配置参数
+	                "app_id": "ca-app-pub-xxx",
+	                "api_key": "xxx"
+	            },
+	            "positions": [                 // 广告位列表
+	                {
+	                    "title": "激励视频",    // 广告位标题
+	                    "position_key": "reward_video",  // 广告位标识
+	                    "ad_id": "ca-app-pub-xxx"       // 广告ID
+	                }
+	            ]
+	        }
+	    ]
+	}

+ 2123 - 159
assets/Scene/scene.fire

@@ -108,19 +108,25 @@
         "__id__": 523
       },
       {
-        "__id__": 563
+        "__id__": 561
+      },
+      {
+        "__id__": 564
+      },
+      {
+        "__id__": 606
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 566
+        "__id__": 612
       },
       {
         "__id__": 358
       },
       {
-        "__id__": 567
+        "__id__": 613
       }
     ],
     "_prefab": null,
@@ -479,10 +485,10 @@
         "__id__": 388
       },
       {
-        "__id__": 541
+        "__id__": 539
       },
       {
-        "__id__": 559
+        "__id__": 557
       },
       {
         "__id__": 374
@@ -491,7 +497,7 @@
         "__id__": 359
       },
       {
-        "__id__": 561
+        "__id__": 559
       }
     ],
     "_active": false,
@@ -785,7 +791,7 @@
         1,
         1,
         1,
-        1
+        0
       ]
     },
     "_eulerAngles": {
@@ -8340,7 +8346,7 @@
         1,
         1,
         1,
-        1
+        0
       ]
     },
     "_eulerAngles": {
@@ -12388,7 +12394,7 @@
         1,
         1,
         1,
-        1
+        0
       ]
     },
     "_eulerAngles": {
@@ -18429,7 +18435,7 @@
         1,
         1,
         1,
-        1
+        0
       ]
     },
     "_eulerAngles": {
@@ -24947,7 +24953,7 @@
         "__id__": 533
       },
       {
-        "__id__": 539
+        "__id__": 537
       }
     ],
     "_active": true,
@@ -25143,7 +25149,7 @@
         1,
         1,
         1,
-        1
+        0
       ]
     },
     "_eulerAngles": {
@@ -25276,7 +25282,7 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 538
+        "__id__": 536
       }
     ],
     "_prefab": null,
@@ -25311,7 +25317,7 @@
         1,
         1,
         1,
-        1
+        0
       ]
     },
     "_eulerAngles": {
@@ -25334,15 +25340,11 @@
     "_parent": {
       "__id__": 533
     },
-    "_children": [
-      {
-        "__id__": 535
-      }
-    ],
+    "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 537
+        "__id__": 535
       }
     ],
     "_prefab": null,
@@ -25393,103 +25395,6 @@
     "groupIndex": 0,
     "_id": "ddWZlL5YZHsY6Xkw25dDJZ"
   },
-  {
-    "__type__": "cc.PrivateNode",
-    "_name": "RICHTEXT_CHILD",
-    "_objFlags": 1024,
-    "_parent": {
-      "__id__": 534
-    },
-    "_children": [],
-    "_active": false,
-    "_components": [
-      {
-        "__id__": 536
-      }
-    ],
-    "_prefab": null,
-    "_opacity": 255,
-    "_color": {
-      "__type__": "cc.Color",
-      "r": 255,
-      "g": 255,
-      "b": 255,
-      "a": 255
-    },
-    "_contentSize": {
-      "__type__": "cc.Size",
-      "width": 60,
-      "height": 50.4
-    },
-    "_anchorPoint": {
-      "__type__": "cc.Vec2",
-      "x": 0,
-      "y": 0
-    },
-    "_trs": {
-      "__type__": "TypedArray",
-      "ctor": "Float64Array",
-      "array": [
-        -30,
-        -25.2,
-        0,
-        0,
-        0,
-        0,
-        1,
-        1,
-        1,
-        1
-      ]
-    },
-    "_eulerAngles": {
-      "__type__": "cc.Vec3",
-      "x": 0,
-      "y": 0,
-      "z": 0
-    },
-    "_skewX": 0,
-    "_skewY": 0,
-    "_zIndex": -32768,
-    "_is3DNode": false,
-    "_groupIndex": 0,
-    "groupIndex": 0,
-    "showInEditor": false,
-    "_id": "41x2dSA11G+KHnZ49JZyoM"
-  },
-  {
-    "__type__": "cc.Label",
-    "_name": "",
-    "_objFlags": 0,
-    "node": {
-      "__id__": 535
-    },
-    "_enabled": true,
-    "_materials": [
-      {
-        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
-      }
-    ],
-    "_srcBlendFactor": 770,
-    "_dstBlendFactor": 771,
-    "_string": "领取",
-    "_N$string": "领取",
-    "_fontSize": 30,
-    "_lineHeight": 40,
-    "_enableWrapText": true,
-    "_N$file": null,
-    "_isSystemFontUsed": true,
-    "_spacingX": 0,
-    "_batchAsBitmap": false,
-    "_styleFlags": 4,
-    "_underlineHeight": 0,
-    "_N$horizontalAlign": 0,
-    "_N$verticalAlign": 1,
-    "_N$fontFamily": "Arial",
-    "_N$overflow": 0,
-    "_N$cacheMode": 0,
-    "_id": "f2l9CXEO1FyaO7V2Pjo9it"
-  },
   {
     "__type__": "cc.RichText",
     "_name": "",
@@ -25590,7 +25495,7 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 540
+        "__id__": 538
       }
     ],
     "_prefab": null,
@@ -25646,7 +25551,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 539
+      "__id__": 537
     },
     "_enabled": true,
     "_materials": [
@@ -25683,22 +25588,22 @@
     },
     "_children": [
       {
-        "__id__": 542
+        "__id__": 540
       },
       {
-        "__id__": 546
+        "__id__": 544
       },
       {
-        "__id__": 550
+        "__id__": 548
       },
       {
-        "__id__": 554
+        "__id__": 552
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 558
+        "__id__": 556
       }
     ],
     "_prefab": null,
@@ -25754,16 +25659,16 @@
     "_name": "paihang",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 541
+      "__id__": 539
     },
     "_children": [],
     "_active": false,
     "_components": [
       {
-        "__id__": 543
+        "__id__": 541
       },
       {
-        "__id__": 544
+        "__id__": 542
       }
     ],
     "_prefab": null,
@@ -25819,7 +25724,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 542
+      "__id__": 540
     },
     "_enabled": true,
     "_materials": [
@@ -25851,7 +25756,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 542
+      "__id__": 540
     },
     "_enabled": true,
     "_normalMaterial": {
@@ -25862,7 +25767,7 @@
     "zoomScale": 1.2,
     "clickEvents": [
       {
-        "__id__": 545
+        "__id__": 543
       }
     ],
     "_N$interactable": true,
@@ -25935,16 +25840,16 @@
     "_name": "tujian",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 541
+      "__id__": 539
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 547
+        "__id__": 545
       },
       {
-        "__id__": 548
+        "__id__": 546
       }
     ],
     "_prefab": null,
@@ -25979,7 +25884,7 @@
         1,
         1,
         1,
-        1
+        0
       ]
     },
     "_eulerAngles": {
@@ -26000,7 +25905,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 546
+      "__id__": 544
     },
     "_enabled": true,
     "_materials": [
@@ -26032,7 +25937,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 546
+      "__id__": 544
     },
     "_enabled": true,
     "_normalMaterial": {
@@ -26043,7 +25948,7 @@
     "zoomScale": 1.2,
     "clickEvents": [
       {
-        "__id__": 549
+        "__id__": 547
       }
     ],
     "_N$interactable": true,
@@ -26116,16 +26021,16 @@
     "_name": "fenxiang",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 541
+      "__id__": 539
     },
     "_children": [],
     "_active": false,
     "_components": [
       {
-        "__id__": 551
+        "__id__": 549
       },
       {
-        "__id__": 552
+        "__id__": 550
       }
     ],
     "_prefab": null,
@@ -26181,7 +26086,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 550
+      "__id__": 548
     },
     "_enabled": true,
     "_materials": [
@@ -26213,7 +26118,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 550
+      "__id__": 548
     },
     "_enabled": true,
     "_normalMaterial": {
@@ -26224,7 +26129,7 @@
     "zoomScale": 1.2,
     "clickEvents": [
       {
-        "__id__": 553
+        "__id__": 551
       }
     ],
     "_N$interactable": true,
@@ -26297,16 +26202,16 @@
     "_name": "wanfa",
     "_objFlags": 0,
     "_parent": {
-      "__id__": 541
+      "__id__": 539
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 555
+        "__id__": 553
       },
       {
-        "__id__": 556
+        "__id__": 554
       }
     ],
     "_prefab": null,
@@ -26341,7 +26246,7 @@
         1,
         1,
         1,
-        1
+        0
       ]
     },
     "_eulerAngles": {
@@ -26362,7 +26267,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 554
+      "__id__": 552
     },
     "_enabled": true,
     "_materials": [
@@ -26394,7 +26299,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 554
+      "__id__": 552
     },
     "_enabled": true,
     "_normalMaterial": {
@@ -26405,7 +26310,7 @@
     "zoomScale": 1.2,
     "clickEvents": [
       {
-        "__id__": 557
+        "__id__": 555
       }
     ],
     "_N$interactable": true,
@@ -26478,7 +26383,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 541
+      "__id__": 539
     },
     "_enabled": true,
     "_layoutSize": {
@@ -26516,7 +26421,7 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 560
+        "__id__": 558
       }
     ],
     "_prefab": null,
@@ -26572,7 +26477,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 559
+      "__id__": 557
     },
     "_enabled": true,
     "_materials": [
@@ -26611,7 +26516,7 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 562
+        "__id__": 560
       }
     ],
     "_prefab": null,
@@ -26667,7 +26572,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 561
+      "__id__": 559
     },
     "_enabled": true,
     "_normalMaterial": null,
@@ -26741,10 +26646,10 @@
     "_active": false,
     "_components": [
       {
-        "__id__": 564
+        "__id__": 562
       },
       {
-        "__id__": 565
+        "__id__": 563
       }
     ],
     "_prefab": null,
@@ -26800,7 +26705,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 563
+      "__id__": 561
     },
     "_enabled": false,
     "_materials": [
@@ -26830,7 +26735,7 @@
     "_name": "",
     "_objFlags": 0,
     "node": {
-      "__id__": 563
+      "__id__": 561
     },
     "_enabled": true,
     "alignMode": 1,
@@ -26852,6 +26757,2065 @@
     "_originalHeight": 1334,
     "_id": "88EvTosJFKB7RPleajcjjx"
   },
+  {
+    "__type__": "cc.Node",
+    "_name": "Login",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 2
+    },
+    "_children": [
+      {
+        "__id__": 565
+      },
+      {
+        "__id__": 568
+      },
+      {
+        "__id__": 579
+      },
+      {
+        "__id__": 590
+      },
+      {
+        "__id__": 597
+      }
+    ],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 604
+      },
+      {
+        "__id__": 605
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 750,
+      "height": 1334
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": "20B13U6y1P6qwGMmzD/hxR"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "Bg",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 564
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 566
+      },
+      {
+        "__id__": 567
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 750,
+      "height": 1334
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": "a0PWqeOTBDZaXMSHfYgigL"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 565
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91"
+    },
+    "_type": 0,
+    "_sizeMode": 0,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": "67wx7oOcVFO5bRLr3t6/+O"
+  },
+  {
+    "__type__": "cc.Widget",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 565
+    },
+    "_enabled": true,
+    "alignMode": 1,
+    "_target": null,
+    "_alignFlags": 45,
+    "_left": 0,
+    "_right": 0,
+    "_top": 0,
+    "_bottom": 0,
+    "_verticalCenter": 0,
+    "_horizontalCenter": 0,
+    "_isAbsLeft": true,
+    "_isAbsRight": true,
+    "_isAbsTop": true,
+    "_isAbsBottom": true,
+    "_isAbsHorizontalCenter": true,
+    "_isAbsVerticalCenter": true,
+    "_originalWidth": 40,
+    "_originalHeight": 36,
+    "_id": "cdTyMNmXBIxqK3dvTzZM4I"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "Iphone",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 564
+    },
+    "_children": [
+      {
+        "__id__": 569
+      },
+      {
+        "__id__": 572
+      },
+      {
+        "__id__": 575
+      }
+    ],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 578
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 255.8,
+      "height": 40
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        76.226,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": "da+qrVWKxNL4bwQzMTl0oQ"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "BACKGROUND_SPRITE",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 568
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 570
+      },
+      {
+        "__id__": 571
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 255.8,
+      "height": 40
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": "41Cu9hunpLcKE0/HZOrpiN"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 569
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "60c32293-ab9a-48a2-baed-0c71c134edab"
+    },
+    "_type": 1,
+    "_sizeMode": 0,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": "c71azCgORJ8bx3oiaLVGY8"
+  },
+  {
+    "__type__": "cc.Widget",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 569
+    },
+    "_enabled": true,
+    "alignMode": 0,
+    "_target": null,
+    "_alignFlags": 45,
+    "_left": 0,
+    "_right": 0,
+    "_top": 0,
+    "_bottom": 0,
+    "_verticalCenter": 0,
+    "_horizontalCenter": 0,
+    "_isAbsLeft": true,
+    "_isAbsRight": true,
+    "_isAbsTop": true,
+    "_isAbsBottom": true,
+    "_isAbsHorizontalCenter": true,
+    "_isAbsVerticalCenter": true,
+    "_originalWidth": 160,
+    "_originalHeight": 40,
+    "_id": "aafZARqB5Il6O3eXVxO0i6"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "TEXT_LABEL",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 568
+    },
+    "_children": [],
+    "_active": false,
+    "_components": [
+      {
+        "__id__": 573
+      },
+      {
+        "__id__": 574
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 234.1,
+      "height": 40
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 1
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        -116.9,
+        20,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": "d5sLLbuPRA/LASAv8CGHWe"
+  },
+  {
+    "__type__": "cc.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 572
+    },
+    "_enabled": true,
+    "_materials": [],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_string": "",
+    "_N$string": "",
+    "_fontSize": 20,
+    "_lineHeight": 25,
+    "_enableWrapText": false,
+    "_N$file": null,
+    "_isSystemFontUsed": true,
+    "_spacingX": 0,
+    "_batchAsBitmap": false,
+    "_styleFlags": 0,
+    "_underlineHeight": 0,
+    "_N$horizontalAlign": 0,
+    "_N$verticalAlign": 1,
+    "_N$fontFamily": "Arial",
+    "_N$overflow": 1,
+    "_N$cacheMode": 0,
+    "_id": "1dQvpeL5lF/YJ4RTERS1T5"
+  },
+  {
+    "__type__": "cc.Widget",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 572
+    },
+    "_enabled": true,
+    "alignMode": 0,
+    "_target": null,
+    "_alignFlags": 45,
+    "_left": 2,
+    "_right": 0,
+    "_top": 0,
+    "_bottom": 0,
+    "_verticalCenter": 0,
+    "_horizontalCenter": 0,
+    "_isAbsLeft": true,
+    "_isAbsRight": true,
+    "_isAbsTop": true,
+    "_isAbsBottom": true,
+    "_isAbsHorizontalCenter": true,
+    "_isAbsVerticalCenter": true,
+    "_originalWidth": 158,
+    "_originalHeight": 40,
+    "_id": "21aka4xkdEyYN/P5Ye6DPn"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "PLACEHOLDER_LABEL",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 568
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 576
+      },
+      {
+        "__id__": 577
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 187,
+      "g": 187,
+      "b": 187,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 253.8,
+      "height": 40
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 1
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        -125.9,
+        20,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": "1eql7nhtRHio5Um55SgaCk"
+  },
+  {
+    "__type__": "cc.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 575
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_string": "  请输入手机号",
+    "_N$string": "  请输入手机号",
+    "_fontSize": 20,
+    "_lineHeight": 25,
+    "_enableWrapText": false,
+    "_N$file": null,
+    "_isSystemFontUsed": true,
+    "_spacingX": 0,
+    "_batchAsBitmap": false,
+    "_styleFlags": 0,
+    "_underlineHeight": 0,
+    "_N$horizontalAlign": 0,
+    "_N$verticalAlign": 1,
+    "_N$fontFamily": "Arial",
+    "_N$overflow": 1,
+    "_N$cacheMode": 0,
+    "_id": "f7lBJZJbFAordMfnS30hnj"
+  },
+  {
+    "__type__": "cc.Widget",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 575
+    },
+    "_enabled": true,
+    "alignMode": 0,
+    "_target": null,
+    "_alignFlags": 45,
+    "_left": 2,
+    "_right": 0,
+    "_top": 0,
+    "_bottom": 0,
+    "_verticalCenter": 0,
+    "_horizontalCenter": 0,
+    "_isAbsLeft": true,
+    "_isAbsRight": true,
+    "_isAbsTop": true,
+    "_isAbsBottom": true,
+    "_isAbsHorizontalCenter": true,
+    "_isAbsVerticalCenter": true,
+    "_originalWidth": 158,
+    "_originalHeight": 40,
+    "_id": "deBmMEhHFE743KKGJM9TW1"
+  },
+  {
+    "__type__": "cc.EditBox",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 568
+    },
+    "_enabled": true,
+    "_string": "",
+    "returnType": 0,
+    "maxLength": 11,
+    "_tabIndex": 0,
+    "editingDidBegan": [],
+    "textChanged": [],
+    "editingDidEnded": [],
+    "editingReturn": [],
+    "_N$textLabel": {
+      "__id__": 573
+    },
+    "_N$placeholderLabel": {
+      "__id__": 576
+    },
+    "_N$background": {
+      "__id__": 570
+    },
+    "_N$inputFlag": 5,
+    "_N$inputMode": 3,
+    "_N$stayOnTop": false,
+    "_id": "a3oYND0OtKw7AP5nO2Mmdm"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "Code",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 564
+    },
+    "_children": [
+      {
+        "__id__": 580
+      },
+      {
+        "__id__": 583
+      },
+      {
+        "__id__": 586
+      }
+    ],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 589
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 255.8,
+      "height": 40
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": "34erdZmsxInafro38MMjw7"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "BACKGROUND_SPRITE",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 579
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 581
+      },
+      {
+        "__id__": 582
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 255.8,
+      "height": 40
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": "c0DaVfjGpDmoCQdgrQ2pGc"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 580
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "60c32293-ab9a-48a2-baed-0c71c134edab"
+    },
+    "_type": 1,
+    "_sizeMode": 0,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": "f29bSW5YxO/LyNRfr+6bSX"
+  },
+  {
+    "__type__": "cc.Widget",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 580
+    },
+    "_enabled": true,
+    "alignMode": 0,
+    "_target": null,
+    "_alignFlags": 45,
+    "_left": 0,
+    "_right": 0,
+    "_top": 0,
+    "_bottom": 0,
+    "_verticalCenter": 0,
+    "_horizontalCenter": 0,
+    "_isAbsLeft": true,
+    "_isAbsRight": true,
+    "_isAbsTop": true,
+    "_isAbsBottom": true,
+    "_isAbsHorizontalCenter": true,
+    "_isAbsVerticalCenter": true,
+    "_originalWidth": 160,
+    "_originalHeight": 40,
+    "_id": "93kp4snoFBVKapJDxeuGcB"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "TEXT_LABEL",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 579
+    },
+    "_children": [],
+    "_active": false,
+    "_components": [
+      {
+        "__id__": 584
+      },
+      {
+        "__id__": 585
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 234.1,
+      "height": 40
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 1
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        -116.9,
+        20,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": "14OpyWVoFHkpBxEaeL61t8"
+  },
+  {
+    "__type__": "cc.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 583
+    },
+    "_enabled": true,
+    "_materials": [],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_string": "",
+    "_N$string": "",
+    "_fontSize": 20,
+    "_lineHeight": 25,
+    "_enableWrapText": false,
+    "_N$file": null,
+    "_isSystemFontUsed": true,
+    "_spacingX": 0,
+    "_batchAsBitmap": false,
+    "_styleFlags": 0,
+    "_underlineHeight": 0,
+    "_N$horizontalAlign": 0,
+    "_N$verticalAlign": 1,
+    "_N$fontFamily": "Arial",
+    "_N$overflow": 1,
+    "_N$cacheMode": 0,
+    "_id": "73DkObyvNDl43xmPSE5OaR"
+  },
+  {
+    "__type__": "cc.Widget",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 583
+    },
+    "_enabled": true,
+    "alignMode": 0,
+    "_target": null,
+    "_alignFlags": 45,
+    "_left": 2,
+    "_right": 0,
+    "_top": 0,
+    "_bottom": 0,
+    "_verticalCenter": 0,
+    "_horizontalCenter": 0,
+    "_isAbsLeft": true,
+    "_isAbsRight": true,
+    "_isAbsTop": true,
+    "_isAbsBottom": true,
+    "_isAbsHorizontalCenter": true,
+    "_isAbsVerticalCenter": true,
+    "_originalWidth": 158,
+    "_originalHeight": 40,
+    "_id": "5cmSOuH4lGZKfX8dn/r0lE"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "PLACEHOLDER_LABEL",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 579
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 587
+      },
+      {
+        "__id__": 588
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 187,
+      "g": 187,
+      "b": 187,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 253.8,
+      "height": 40
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 1
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        -125.9,
+        20,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": "baBBmnsKNIAq8AhZMO7hQj"
+  },
+  {
+    "__type__": "cc.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 586
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_string": "  请输入验证码",
+    "_N$string": "  请输入验证码",
+    "_fontSize": 20,
+    "_lineHeight": 25,
+    "_enableWrapText": false,
+    "_N$file": null,
+    "_isSystemFontUsed": true,
+    "_spacingX": 0,
+    "_batchAsBitmap": false,
+    "_styleFlags": 0,
+    "_underlineHeight": 0,
+    "_N$horizontalAlign": 0,
+    "_N$verticalAlign": 1,
+    "_N$fontFamily": "Arial",
+    "_N$overflow": 1,
+    "_N$cacheMode": 0,
+    "_id": "23mxUWGC5LTLHafEOIfbbA"
+  },
+  {
+    "__type__": "cc.Widget",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 586
+    },
+    "_enabled": true,
+    "alignMode": 0,
+    "_target": null,
+    "_alignFlags": 45,
+    "_left": 2,
+    "_right": 0,
+    "_top": 0,
+    "_bottom": 0,
+    "_verticalCenter": 0,
+    "_horizontalCenter": 0,
+    "_isAbsLeft": true,
+    "_isAbsRight": true,
+    "_isAbsTop": true,
+    "_isAbsBottom": true,
+    "_isAbsHorizontalCenter": true,
+    "_isAbsVerticalCenter": true,
+    "_originalWidth": 158,
+    "_originalHeight": 40,
+    "_id": "e5CJAWZL9BZZHhcUf++/Ky"
+  },
+  {
+    "__type__": "cc.EditBox",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 579
+    },
+    "_enabled": true,
+    "_string": "",
+    "returnType": 0,
+    "maxLength": 8,
+    "_tabIndex": 0,
+    "editingDidBegan": [],
+    "textChanged": [],
+    "editingDidEnded": [],
+    "editingReturn": [],
+    "_N$textLabel": {
+      "__id__": 584
+    },
+    "_N$placeholderLabel": {
+      "__id__": 587
+    },
+    "_N$background": {
+      "__id__": 581
+    },
+    "_N$inputFlag": 5,
+    "_N$inputMode": 2,
+    "_N$stayOnTop": false,
+    "_id": "9e2ZPqmytOV658Ek0z7TsM"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "SendCode",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 564
+    },
+    "_children": [
+      {
+        "__id__": 591
+      }
+    ],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 594
+      },
+      {
+        "__id__": 595
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 94.1,
+      "height": 36.2
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        174.7,
+        77.8,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        0
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": "f6o0lT8jNGcqCiry1C79oi"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "Label",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 590
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 592
+      },
+      {
+        "__id__": 593
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 68,
+      "height": 29.72
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": "69zD/3tplK9rZLqZrcC3fF"
+  },
+  {
+    "__type__": "cc.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 591
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_string": "验证码",
+    "_N$string": "验证码",
+    "_fontSize": 22,
+    "_lineHeight": 22,
+    "_enableWrapText": true,
+    "_N$file": null,
+    "_isSystemFontUsed": true,
+    "_spacingX": 0,
+    "_batchAsBitmap": false,
+    "_styleFlags": 0,
+    "_underlineHeight": 0,
+    "_N$horizontalAlign": 1,
+    "_N$verticalAlign": 1,
+    "_N$fontFamily": "Arial",
+    "_N$overflow": 0,
+    "_N$cacheMode": 0,
+    "_id": "16pp+6PMdEi5nGu4h2yE4q"
+  },
+  {
+    "__type__": "cc.LabelOutline",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 591
+    },
+    "_enabled": true,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 0,
+      "g": 0,
+      "b": 0,
+      "a": 255
+    },
+    "_width": 1,
+    "_id": "08EWK1iMVKoqTrDpPgjQDu"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 590
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "f3414d58-b929-41b5-a431-62ad6a261af9"
+    },
+    "_type": 1,
+    "_sizeMode": 0,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": "81LI/aksdKH5DxNYLMBBbY"
+  },
+  {
+    "__type__": "cc.Button",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 590
+    },
+    "_enabled": true,
+    "_normalMaterial": null,
+    "_grayMaterial": null,
+    "duration": 0.1,
+    "zoomScale": 1.05,
+    "clickEvents": [
+      {
+        "__id__": 596
+      }
+    ],
+    "_N$interactable": true,
+    "_N$enableAutoGrayEffect": false,
+    "_N$transition": 3,
+    "transition": 3,
+    "_N$normalColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_N$pressedColor": {
+      "__type__": "cc.Color",
+      "r": 211,
+      "g": 211,
+      "b": 211,
+      "a": 255
+    },
+    "pressedColor": {
+      "__type__": "cc.Color",
+      "r": 211,
+      "g": 211,
+      "b": 211,
+      "a": 255
+    },
+    "_N$hoverColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "hoverColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_N$disabledColor": {
+      "__type__": "cc.Color",
+      "r": 124,
+      "g": 124,
+      "b": 124,
+      "a": 255
+    },
+    "_N$normalSprite": null,
+    "_N$pressedSprite": null,
+    "pressedSprite": null,
+    "_N$hoverSprite": null,
+    "hoverSprite": null,
+    "_N$disabledSprite": null,
+    "_N$target": null,
+    "_id": "239uy4eTlDrI8C3raG2MfK"
+  },
+  {
+    "__type__": "cc.ClickEvent",
+    "target": {
+      "__id__": 564
+    },
+    "component": "",
+    "_componentId": "df2564rnWNMLKKN+zoxs5xX",
+    "handler": "SendCode",
+    "customEventData": ""
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "Login",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 564
+    },
+    "_children": [
+      {
+        "__id__": 598
+      }
+    ],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 601
+      },
+      {
+        "__id__": 602
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 110.1,
+      "height": 46.6
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        -70.4,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        0
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": "586yW5YBhLt5erNG1ahXih"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "New Label",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 597
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 599
+      },
+      {
+        "__id__": 600
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 48,
+      "height": 30.98
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": "797B+WEpdNrZXE5+ZhNM0Q"
+  },
+  {
+    "__type__": "cc.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 598
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_string": "登录",
+    "_N$string": "登录",
+    "_fontSize": 23,
+    "_lineHeight": 23,
+    "_enableWrapText": true,
+    "_N$file": null,
+    "_isSystemFontUsed": true,
+    "_spacingX": 0,
+    "_batchAsBitmap": false,
+    "_styleFlags": 0,
+    "_underlineHeight": 0,
+    "_N$horizontalAlign": 1,
+    "_N$verticalAlign": 1,
+    "_N$fontFamily": "Arial",
+    "_N$overflow": 0,
+    "_N$cacheMode": 0,
+    "_id": "7asDbvJ9lOhZMJ7bWduS7Z"
+  },
+  {
+    "__type__": "cc.LabelOutline",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 598
+    },
+    "_enabled": true,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 0,
+      "g": 0,
+      "b": 0,
+      "a": 255
+    },
+    "_width": 1,
+    "_id": "07JHEki41Eho/D4i0jsTqw"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 597
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "f3414d58-b929-41b5-a431-62ad6a261af9"
+    },
+    "_type": 1,
+    "_sizeMode": 0,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": "6dD1InDRVDTbnU2/N3V+J5"
+  },
+  {
+    "__type__": "cc.Button",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 597
+    },
+    "_enabled": true,
+    "_normalMaterial": null,
+    "_grayMaterial": null,
+    "duration": 0.1,
+    "zoomScale": 1.05,
+    "clickEvents": [
+      {
+        "__id__": 603
+      }
+    ],
+    "_N$interactable": true,
+    "_N$enableAutoGrayEffect": false,
+    "_N$transition": 3,
+    "transition": 3,
+    "_N$normalColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_N$pressedColor": {
+      "__type__": "cc.Color",
+      "r": 211,
+      "g": 211,
+      "b": 211,
+      "a": 255
+    },
+    "pressedColor": {
+      "__type__": "cc.Color",
+      "r": 211,
+      "g": 211,
+      "b": 211,
+      "a": 255
+    },
+    "_N$hoverColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "hoverColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_N$disabledColor": {
+      "__type__": "cc.Color",
+      "r": 124,
+      "g": 124,
+      "b": 124,
+      "a": 255
+    },
+    "_N$normalSprite": null,
+    "_N$pressedSprite": null,
+    "pressedSprite": null,
+    "_N$hoverSprite": null,
+    "hoverSprite": null,
+    "_N$disabledSprite": null,
+    "_N$target": null,
+    "_id": "b1N2AIhElCCZ73KQNq0kGf"
+  },
+  {
+    "__type__": "cc.ClickEvent",
+    "target": {
+      "__id__": 564
+    },
+    "component": "",
+    "_componentId": "df2564rnWNMLKKN+zoxs5xX",
+    "handler": "login",
+    "customEventData": ""
+  },
+  {
+    "__type__": "cc.Widget",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 564
+    },
+    "_enabled": true,
+    "alignMode": 1,
+    "_target": null,
+    "_alignFlags": 45,
+    "_left": 0,
+    "_right": 0,
+    "_top": 0,
+    "_bottom": 0,
+    "_verticalCenter": 0,
+    "_horizontalCenter": 0,
+    "_isAbsLeft": true,
+    "_isAbsRight": true,
+    "_isAbsTop": true,
+    "_isAbsBottom": true,
+    "_isAbsHorizontalCenter": true,
+    "_isAbsVerticalCenter": true,
+    "_originalWidth": 40,
+    "_originalHeight": 36,
+    "_id": "acTtYmQHNHapOsq7BRIXPp"
+  },
+  {
+    "__type__": "df2564rnWNMLKKN+zoxs5xX",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 564
+    },
+    "_enabled": true,
+    "Iphone": {
+      "__id__": 578
+    },
+    "Code": {
+      "__id__": 589
+    },
+    "_id": "2bazI22BhLV7LyRKoIV32G"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "Tips",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 2
+    },
+    "_children": [
+      {
+        "__id__": 607
+      }
+    ],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 611
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 0,
+      "height": 0
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": "82GckIuzBAlKd9uFsTyGWb"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "tips",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 606
+    },
+    "_children": [
+      {
+        "__id__": 608
+      }
+    ],
+    "_active": false,
+    "_components": [
+      {
+        "__id__": 610
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 0,
+      "g": 0,
+      "b": 0,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 643,
+      "height": 100
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": "8a0gp5DQJIP64u34Jq8yeC"
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "New Label",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 607
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 609
+      }
+    ],
+    "_prefab": null,
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 400,
+      "height": 50.4
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": "3dIjY9TPpFSLkw2+KOKppX"
+  },
+  {
+    "__type__": "cc.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 608
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_string": "您输入的验证码不正确",
+    "_N$string": "您输入的验证码不正确",
+    "_fontSize": 40,
+    "_lineHeight": 40,
+    "_enableWrapText": true,
+    "_N$file": null,
+    "_isSystemFontUsed": true,
+    "_spacingX": 0,
+    "_batchAsBitmap": false,
+    "_styleFlags": 0,
+    "_underlineHeight": 0,
+    "_N$horizontalAlign": 1,
+    "_N$verticalAlign": 1,
+    "_N$fontFamily": "Arial",
+    "_N$overflow": 0,
+    "_N$cacheMode": 0,
+    "_id": "928qP2JXFKRbMIdH9S9UuX"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 607
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91"
+    },
+    "_type": 0,
+    "_sizeMode": 0,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": "94RUosQbxK55fBOVge7fUR"
+  },
+  {
+    "__type__": "b79fcjLZO1PWrrjZeLNst3R",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 606
+    },
+    "_enabled": true,
+    "_id": "1bVeYIhTlG8KInJBnMhe3C"
+  },
   {
     "__type__": "cc.Canvas",
     "_name": "",

+ 13 - 0
assets/Script/ts.meta

@@ -0,0 +1,13 @@
+{
+  "ver": "1.1.3",
+  "uuid": "a970e1d6-9711-40ca-91fe-935ee2f0e5b3",
+  "importer": "folder",
+  "isBundle": false,
+  "bundleName": "",
+  "priority": 1,
+  "compressionType": {},
+  "optimizeHotUpdate": {},
+  "inlineSpriteFrames": {},
+  "isRemoteBundle": {},
+  "subMetas": {}
+}

+ 134 - 0
assets/Script/ts/HTTPS.ts

@@ -0,0 +1,134 @@
+const { ccclass, property } = cc._decorator;
+@ccclass
+export default class HTTPS {
+    private static _instance = null;
+    public static get Instance(): HTTPS {
+        if (this._instance == null) {
+            this._instance = new HTTPS();
+        }
+        return this._instance;
+    }
+    token = null;
+
+    // private _URL = "http://120.79.5.67:7000";
+
+    //得到现在的时间
+    private GetNowTime(): string {
+        const date = new Date(cc.sys.now());
+        const hours = date.getHours();
+        const minutes = date.getMinutes();
+        const seconds = date.getSeconds();
+        return `${hours}:${minutes}:${seconds}    `;
+    }
+    post(action: string, data: object | string): Promise<any> {
+        if (CC_DEBUG) {
+            cc.error(this.GetNowTime() + "发送消息    >>>>>> :" + action, data);
+            // cc.error(this.GetNowTime() + "消息内容 >>>>>> :", data);
+        }
+        const promise: Promise<any> = new Promise((resolve, reject) => {
+            var timeoutKey: any;
+            var retry = 5;//失败重试次数
+            const send = () => {
+                const httpRequest = new XMLHttpRequest();
+                const method = 'POST'
+                httpRequest.onreadystatechange = (event: Event): void => {
+                    const readyState = httpRequest.readyState;
+                    if (readyState !== 4) return;
+                    if (!timeoutKey) return;//已通知超时,之后收到数据后也不处理
+                    clearTimeout(timeoutKey);
+                    timeoutKey = null;
+                    const requestStatus = httpRequest.status;
+                    if (requestStatus >= 200 && requestStatus < 400) {
+                        let resp = JSON.parse(httpRequest.responseText);
+                        resolve(resp);
+                        if (CC_DEBUG) {
+                            cc.error(this.GetNowTime() + `收到消息(${retry}) >>>>>> :` + action, resp);
+                            // cc.error(httpRequest.responseText);
+                        }
+                    }
+                    else if (retry-- > 0) send();
+                    else reject(new Error('全部超时'));
+                }
+
+                httpRequest.open(method, Url + action, true);
+                // httpRequest.setRequestHeader("Access-Control-Allow-Origin", "*");
+                httpRequest.setRequestHeader("Content-Type", "application/json;charset=utf-8");
+                httpRequest.setRequestHeader("Authorization", this.token != null ? this.token : "");
+
+                var text = typeof (data) == "string" ? data : JSON.stringify(data);
+                data ? httpRequest.send(text) : httpRequest.send();
+                timeoutKey = setTimeout(() => {
+                    timeoutKey = null;
+                    httpRequest.abort();
+                    reject(new Error(`Timeout`));
+                }, 12000);//超时时间(毫秒)
+            }
+            send();
+        })
+        return promise;
+    }
+    get(action: string): Promise<any> {
+
+        if (CC_DEBUG) {
+            cc.error(this.GetNowTime() + "发送消息    >>>>>> :" + action);
+        }
+
+        const promise: Promise<any> = new Promise((resolve, reject) => {
+            var timeoutKey: any;
+            var retry = 5;//失败重试次数
+            const send = () => {
+                const httpRequest = new XMLHttpRequest();
+                const method = 'GET'
+                httpRequest.onreadystatechange = (event: Event): void => {
+                    const readyState = httpRequest.readyState;
+                    if (readyState !== 4) return;
+                    if (!timeoutKey) return;//已通知超时,之后收到数据后也不处理
+                    clearTimeout(timeoutKey);
+                    timeoutKey = null;
+                    const requestStatus = httpRequest.status;
+                    if (requestStatus >= 200 && requestStatus < 400) {
+                        let resp = JSON.parse(httpRequest.responseText);
+                        resolve(resp);
+                        if (CC_DEBUG) {
+                            cc.error(this.GetNowTime() + `收到消息(${retry}) >>>>>> :` + action, resp);
+                        }
+                    }
+                    else if (retry-- > 0) send();
+                    else reject(new Error('全部超时'));
+                }
+
+                httpRequest.open(method, action, true);
+                httpRequest.setRequestHeader("Authorization", this.token != null ? this.token : "");
+                httpRequest.send();
+                timeoutKey = setTimeout(() => {
+                    timeoutKey = null;
+                    httpRequest.abort();
+                    reject(new Error(`Timeout`));
+                }, 12000);//超时时间(毫秒)
+            }
+            send();
+        })
+        return promise;
+    }
+}
+
+export var Url = "http://yx.dashenwangluo.com";
+
+
+export var NetGet = {
+    /**获取任务配置 */
+    Task: Url + "/v1/task/config",//token: 用户token
+}
+
+
+
+
+export var NetPost = {
+    /**发送验证码 */
+    SendIphoneCode: "/v1/user/send_code",
+    /**手机号登录 */
+    IphoneLogin: "/v1/user/login",
+
+    /**完成任务 */
+    complete: "/v1/task/complete",// task_type: 任务类型(ad_watch/sign_in)
+}

+ 10 - 0
assets/Script/ts/HTTPS.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "b61af9c7-a2fa-48e7-826d-9fcebb0e9cab",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 113 - 0
assets/Script/ts/Login.ts

@@ -0,0 +1,113 @@
+// Learn TypeScript:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
+// Learn Attribute:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
+// Learn life-cycle callbacks:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html
+
+import HTTPS, { NetGet, NetPost } from "./HTTPS";
+import Tips from "./Tips";
+
+const { ccclass, property } = cc._decorator;
+
+@ccclass
+export default class Login extends cc.Component {
+
+    @property(cc.EditBox)
+    Iphone: cc.EditBox = null;
+
+    @property(cc.EditBox)
+    Code: cc.EditBox = null;
+
+
+
+    protected onLoad(): void {
+
+    }
+
+
+
+    CountDown = 0
+    SendCode() {
+        if (!this.checkIphone()) {
+            Tips.Instance.show('手机号码不正确')
+            return
+        }
+
+        if (this.CountDown != 0) {
+            return
+        }
+
+        HTTPS.Instance.post(NetPost.SendIphoneCode, {
+            mobile: this.Iphone.string
+        }).then(res => {
+
+            if (res.code == 200) {
+                Tips.Instance.show(res.msg)
+
+                let Label = this.node.getChildByName("SendCode").getChildByName("Label").getComponent(cc.Label)
+                this.CountDown = 60
+                Label.string = `(${this.CountDown}s)`
+
+                this.schedule(() => {
+                    Label.string = `(${--this.CountDown}s)`
+                    if (this.CountDown == 0) {
+                        this.unscheduleAllCallbacks()
+                        Label.string = '验证码'
+                    }
+                }, 1, 59, 1)
+            } else {
+                Tips.Instance.show(res.msg)
+            }
+        })
+    }
+
+
+    login() {
+        if (!this.checkIphone()) {
+            Tips.Instance.show('手机号码不正确')
+            return
+        }
+
+        HTTPS.Instance.post(NetPost.IphoneLogin, {
+            mobile: this.Iphone.string,
+            code: this.Code.string
+        }).then(res => {
+            if (res.code == 200) {
+
+                // "token": "xxx",
+                // "user_info": {
+                //     "id": 1,
+                //     "username": "13800138000",
+                //     "nickname": "138****8000",
+                //     "avatar": "",
+                //     "balance": "0.00"
+                // }
+
+                res.data.user_info
+
+
+                HTTPS.Instance.token = res.data.token
+
+
+                HTTPS.Instance.get(NetGet.Task).then(res => {
+
+
+                })
+            }
+        })
+
+
+    }
+    // update (dt) {}
+
+
+    checkIphone() {
+        function isValidPhoneNumber(phoneNumber: string): boolean {
+            // 正则表达式,适用于中国手机号码
+            const phonePattern = /^1[3-9]\d{9}$/;
+            return phonePattern.test(phoneNumber);
+        }
+        return isValidPhoneNumber(this.Iphone.string)
+    }
+}

+ 10 - 0
assets/Script/ts/Login.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "df256e2b-9d63-4c2c-a28d-fb3a31b39c57",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 34 - 0
assets/Script/ts/Tips.ts

@@ -0,0 +1,34 @@
+// Learn TypeScript:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
+// Learn Attribute:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
+// Learn life-cycle callbacks:
+//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html
+
+const { ccclass, property } = cc._decorator;
+
+@ccclass
+export default class Tips extends cc.Component {
+
+
+
+    static Instance: Tips = null;
+    onLoad() {
+        Tips.Instance = this
+    }
+
+
+    show(str: string) {
+
+        this.unscheduleAllCallbacks()
+        let tips = this.node.getChildByName("tips")
+        tips.active = true
+        tips.getComponentInChildren(cc.Label).string = str
+
+        this.scheduleOnce(() => {
+            tips.active = false
+        }, 1)
+    }
+
+    // update (dt) {}
+}

+ 10 - 0
assets/Script/ts/Tips.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "b79fc8cb-64ed-4f5a-bae3-65e2cdb2ddd1",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 13 - 0
assets/Texture/login.meta

@@ -0,0 +1,13 @@
+{
+  "ver": "1.1.3",
+  "uuid": "71b2fc0b-87b1-4d53-bf2e-562352f38130",
+  "importer": "folder",
+  "isBundle": false,
+  "bundleName": "",
+  "priority": 1,
+  "compressionType": {},
+  "optimizeHotUpdate": {},
+  "inlineSpriteFrames": {},
+  "isRemoteBundle": {},
+  "subMetas": {}
+}

二进制
assets/Texture/login/Frame 1000007067.png


+ 38 - 0
assets/Texture/login/Frame 1000007067.png.meta

@@ -0,0 +1,38 @@
+{
+  "ver": "2.3.7",
+  "uuid": "1a462325-56fc-4f82-a5db-f61202e1c585",
+  "importer": "texture",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 111,
+  "height": 66,
+  "platformSettings": {},
+  "subMetas": {
+    "Frame 1000007067": {
+      "ver": "1.0.6",
+      "uuid": "f3414d58-b929-41b5-a431-62ad6a261af9",
+      "importer": "sprite-frame",
+      "rawTextureUuid": "1a462325-56fc-4f82-a5db-f61202e1c585",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 111,
+      "height": 66,
+      "rawWidth": 111,
+      "rawHeight": 66,
+      "borderTop": 20,
+      "borderBottom": 21,
+      "borderLeft": 21,
+      "borderRight": 21,
+      "subMetas": {}
+    }
+  }
+}

二进制
assets/Texture/login/设置_底2.png


+ 38 - 0
assets/Texture/login/设置_底2.png.meta

@@ -0,0 +1,38 @@
+{
+  "ver": "2.3.7",
+  "uuid": "89772ca9-956a-4faa-ba26-0c4c93d8b620",
+  "importer": "texture",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 32,
+  "height": 32,
+  "platformSettings": {},
+  "subMetas": {
+    "设置_底2": {
+      "ver": "1.0.6",
+      "uuid": "60c32293-ab9a-48a2-baed-0c71c134edab",
+      "importer": "sprite-frame",
+      "rawTextureUuid": "89772ca9-956a-4faa-ba26-0c4c93d8b620",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": -0.5,
+      "offsetY": 0.5,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 31,
+      "height": 31,
+      "rawWidth": 32,
+      "rawHeight": 32,
+      "borderTop": 8.5,
+      "borderBottom": 7.5,
+      "borderLeft": 10.5,
+      "borderRight": 12.5,
+      "subMetas": {}
+    }
+  }
+}

+ 2 - 1
settings/project.json

@@ -37,5 +37,6 @@
     "cloud-function"
   ],
   "preview-port": 7456,
-  "clear-simulator-cache": true
+  "clear-simulator-cache": true,
+  "start-scene": "34a6e269-c4a1-4b06-b283-a25d10e81155"
 }