Citrus před 6 měsíci
rodič
revize
2b593af84c
3 změnil soubory, kde provedl 1089 přidání a 103 odebrání
  1. 1006 100
      assets/Scene/scene.fire
  2. 19 0
      assets/Script/ts/HTTPS.ts
  3. 64 3
      assets/Script/ts/Login.ts

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1006 - 100
assets/Scene/scene.fire


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

@@ -118,6 +118,12 @@ export var Url = "http://yx.dashenwangluo.com";
 export var NetGet = {
     /**获取任务配置 */
     Task: Url + "/v1/task/config",//token: 用户token
+
+    /**获取提现规则 */
+    rule: Url + "/v1/withdraw/rule",//token: 用户token
+
+    /**获取提现记录 */
+    withdrawHistory: Url + "/v1/withdraw/log?page=1&limit=20",//token: 用户token
 }
 
 
@@ -129,6 +135,19 @@ export var NetPost = {
     /**手机号登录 */
     IphoneLogin: "/v1/user/login",
 
+
     /**完成任务 */
     complete: "/v1/task/complete",// task_type: 任务类型(ad_watch/sign_in)
+
+
+    /**申请提现 */
+    withdraw: "/v1/withdraw/apply",// task_type: 任务类型(ad_watch/sign_in)
+
+
+
+    /**记录广告观看 */
+    record: "/v1/ad/record",// task_type: 任务类型(ad_watch/sign_in)
+
+ 
+
 }

+ 64 - 3
assets/Script/ts/Login.ts

@@ -90,10 +90,7 @@ export default class Login extends cc.Component {
                 HTTPS.Instance.token = res.data.token
 
 
-                HTTPS.Instance.get(NetGet.Task).then(res => {
 
-
-                })
             }
         })
 
@@ -110,4 +107,68 @@ export default class Login extends cc.Component {
         }
         return isValidPhoneNumber(this.Iphone.string)
     }
+
+
+    getTask() {
+        HTTPS.Instance.get(NetGet.Task).then(res => {
+
+            console.error(res);
+
+        })
+    }
+
+    setTask() {
+        HTTPS.Instance.post(NetPost.complete, {
+            task_type: 'sign_in',
+        }).then(res => {
+            console.error(res);
+            if (res.code == 200) {
+
+            }
+        })
+    }
+
+    //获取规则
+    getRule() {
+        HTTPS.Instance.get(NetGet.rule).then(res => {
+
+            console.error(res);
+
+        })
+    }
+
+    //申请提现
+    requsetWithdraw() {
+        HTTPS.Instance.post(NetPost.withdraw, {
+            amount: 'sign_in',//提现金额
+            withdraw_type: 'sign_in',//提现方式(alipay/wxpay/bank)
+            account: 'sign_in',//提现账号
+            real_name: 'sign_in',// 真实姓名
+        }).then(res => {
+            console.error(res);
+            if (res.code == 200) {
+
+            }
+        })
+    }
+
+    //体现记录
+    requsetWithdrawHistory() {
+        HTTPS.Instance.get(NetGet.withdrawHistory).then(res => {
+            console.error(res);
+        })
+    }
+
+    //记录广告观看
+    Setrecord() {
+        HTTPS.Instance.post(NetPost.record, {
+            ad_type: 'sign_in',//广告类型(默认reward)
+            duration: 'sign_in',//观看时长,单位秒(默认30)
+        }).then(res => {
+            console.error(res);
+            if (res.code == 200) {
+
+            }
+        })
+    }
 }

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů