Explorar el Código

提现前校验微信授权,没有授权则拉授权

薛鸿潇 hace 5 años
padre
commit
8afa753b27

+ 22 - 8
assets/resources/module/agreementTip/agreementTip.prefab

@@ -24,17 +24,17 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 52
-      },
-      {
         "__id__": 53
       },
       {
         "__id__": 54
+      },
+      {
+        "__id__": 55
       }
     ],
     "_prefab": {
-      "__id__": 55
+      "__id__": 56
     },
     "_opacity": 255,
     "_color": {
@@ -116,11 +116,11 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 50
+        "__id__": 51
       }
     ],
     "_prefab": {
-      "__id__": 51
+      "__id__": 52
     },
     "_opacity": 255,
     "_color": {
@@ -1602,7 +1602,7 @@
       }
     ],
     "_prefab": {
-      "__id__": 49
+      "__id__": 50
     },
     "_opacity": 255,
     "_color": {
@@ -1770,10 +1770,24 @@
     "panel_name": "game/prefab/game",
     "open_type": 0,
     "transition_type": 3,
-    "onComplete": [],
+    "onComplete": [
+      {
+        "__id__": 49
+      }
+    ],
     "_id": ""
   },
   {
+    "__type__": "cc.ClickEvent",
+    "target": {
+      "__id__": 1
+    },
+    "component": "",
+    "_componentId": "27e8eZbIM9ApIU8LRLiALwU",
+    "handler": "clickClose",
+    "customEventData": ""
+  },
+  {
     "__type__": "cc.PrefabInfo",
     "root": {
       "__id__": 1

+ 5 - 0
assets/script/game/data/module/RedBagCashData.ts

@@ -1,5 +1,6 @@
 
 import { Data } from "../../../mk/data/Data";
+import JsbSystem from "../../../mk/system/JsbSystem";
 import { GameProp } from "../GameData";
 /**
  * 红包提现数据
@@ -48,6 +49,10 @@ export class RedBagCashData extends Data {
      * 提现操作
      */
     public async cashOP() {
+        if (!gData.loginData.isAuth) {
+            JsbSystem.WxAuth();
+            return;
+        }
         /** 提现档位 */
         const cash_index = this.cash_bar;
         let data = { index: cash_index };

+ 7 - 0
assets/script/game/module/agreementTip/agreementTip.ts

@@ -22,5 +22,12 @@ export default class agreementTip extends cc.Component {
     async clickRule(data) {
         gData.setting.rule_type = parseInt(data);
     }
+
+    /**
+     * 关闭面板
+     */
+    private clickClose() {
+        mk.ui.closePanel(this.node.name);
+    }
     // update (dt) {}
 }

+ 5 - 0
assets/script/game/module/blessingBag/BlessingBag.ts

@@ -3,6 +3,7 @@
  * @author kaka
  */
 
+import JsbSystem from "../../../mk/system/JsbSystem";
 import { AdFun } from "../../data/AdData";
 import { cashProType } from "../../data/module/CashProData";
 
@@ -229,6 +230,10 @@ export default class BlessingBag extends cc.Component {
 
     Click_AdProgressBtn() {
         mk.audio.playEffect("button");
+        if (!gData.loginData.isAuth) {
+            JsbSystem.WxAuth();
+            return;
+        }
         if (gData.blessingBag.videoRbData.needToWatchTheVideo != 1) {
             //免费加进度
             gData.blessingBag.HttpNoAdProgress();

+ 5 - 0
assets/script/game/module/pigBank/PigBank.ts

@@ -1,3 +1,4 @@
+import JsbSystem from "../../../mk/system/JsbSystem";
 
 const { ccclass, property } = cc._decorator;
 /**
@@ -88,6 +89,10 @@ export default class PigBank extends cc.Component {
             mk.tip.pop('满' + gData.pigbank.cash_min_limit + '元可提现')
             return;
         }
+        if (!gData.loginData.isAuth) {
+            JsbSystem.WxAuth();
+            return;
+        }
         gData.pigbank.cashOP();
         mk.ui.closePanel(this.node.name);
     }

+ 9 - 0
assets/script/game/module/sign/Sign.ts

@@ -1,5 +1,7 @@
+import JsbSystem from "../../../mk/system/JsbSystem";
 import TableView from "../../component/TableView";
 import { AdFun } from "../../data/AdData";
+import { RewardType } from "../../data/GameData";
 
 /**
  * 签到界面
@@ -68,6 +70,13 @@ export default class Sign extends cc.Component {
         if (gData.gameData.gameData.isSignInToday == 1) return;
         if (!gData.sign.haveSignDay()) return;
 
+        const index_old = gData.sign.getItemIndexByCanSign();
+        if (gData.sign.c_sign[index_old].rewardType === RewardType.rmb) {
+            if (!gData.loginData.isAuth) {
+                JsbSystem.WxAuth();
+                return;
+            }
+        }
         // 看广告
         mk.ad.watchAd((success: boolean) => {
             mk.console.log("watchAD:" + success);