Browse Source

Merge branch 'master' of http://git.mokasz.com/zouyong/mk_framework

kaka 5 years ago
parent
commit
5e129b7df5
33 changed files with 1055 additions and 558 deletions
  1. 220 135
      assets/resources/game/prefab/game.prefab
  2. 13 13
      assets/resources/module/pigBank/pigBank.prefab
  3. BIN
      assets/resources/module/redBagCash/texture/close.png
  4. 6 6
      assets/resources/module/redBagCash/texture/close.png.meta
  5. 3 3
      assets/resources/module/redBagCode/redBagCode.prefab
  6. 11 11
      assets/resources/module/reward/reward.prefab
  7. 11 11
      assets/resources/module/reward/rewardLuck.prefab
  8. 3 3
      assets/resources/module/reward/rewardMission.prefab
  9. BIN
      assets/resources/module/reward/texture/button_big.png
  10. 36 0
      assets/resources/module/reward/texture/button_big.png.meta
  11. 0 4
      assets/script/before/mgr/PoolMgr.ts
  12. 1 0
      assets/script/before/view/uiItem/CellItem.ts
  13. 48 5
      assets/script/game/data/GameData.ts
  14. 90 57
      assets/script/game/data/LoginData.ts
  15. 1 14
      assets/script/game/data/module/PigBankData.ts
  16. 7 0
      assets/script/game/data/module/RewardData.ts
  17. 20 44
      assets/script/game/data/module/SignData.ts
  18. 16 1
      assets/script/game/game/Game.ts
  19. 0 1
      assets/script/game/module/help/Help.ts
  20. 19 2
      assets/script/game/module/login/Login.ts
  21. 10 2
      assets/script/game/module/pigBank/PigBank.ts
  22. 4 6
      assets/script/game/module/reward/Reward.ts
  23. 11 9
      assets/script/game/module/setting/Setting.ts
  24. 2 2
      assets/script/game/module/sign/Sign.ts
  25. 9 0
      assets/script/mk/system/AdSystem.ts
  26. 28 8
      assets/script/mk/system/FlySystem.ts
  27. 7 7
      assets/script/mk/system/JsbSystem.ts
  28. 3 3
      build/jsb-link/frameworks/runtime-src/proj.android-studio/.idea/modules/-1746423203/libcocos2dx.iml
  29. 3 3
      build/jsb-link/frameworks/runtime-src/proj.android-studio/.idea/modules/app/EasyEliminate.iml
  30. BIN
      build/jsb-link/frameworks/runtime-src/proj.android-studio/app/release/EasyEliminate-release.apk
  31. 71 0
      build/jsb-link/frameworks/runtime-src/proj.android-studio/app/src/org/cocos2dx/javascript/AppActivity.java
  32. 10 0
      build/jsb-link/frameworks/runtime-src/proj.android-studio/app/src/org/cocos2dx/javascript/thirdSdk/ThirdSdkMgr.java
  33. 392 208
      build/jsb-link/js backups (useful for debugging)/main.index.js

File diff suppressed because it is too large
+ 220 - 135
assets/resources/game/prefab/game.prefab


+ 13 - 13
assets/resources/module/pigBank/pigBank.prefab

@@ -688,7 +688,7 @@
       "ctor": "Float64Array",
       "array": [
         243.665,
-        -359.42,
+        -375,
         0,
         0,
         0,
@@ -1523,7 +1523,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 428,
+      "width": 460,
       "height": 60
     },
     "_anchorPoint": {
@@ -1536,7 +1536,7 @@
       "ctor": "Float64Array",
       "array": [
         -10.56,
-        -359.255,
+        -375,
         0,
         0,
         0,
@@ -1590,7 +1590,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 264,
+      "width": 284,
       "height": 54.4
     },
     "_anchorPoint": {
@@ -1602,7 +1602,7 @@
       "__type__": "TypedArray",
       "ctor": "Float64Array",
       "array": [
-        -82,
+        -88,
         0,
         0,
         0,
@@ -1644,7 +1644,7 @@
     "_dstBlendFactor": 771,
     "_string": "每观看一个视频,都有",
     "_N$string": "每观看一个视频,都有",
-    "_fontSize": 26,
+    "_fontSize": 28,
     "_lineHeight": 40,
     "_enableWrapText": true,
     "_N$file": {
@@ -1721,7 +1721,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 108,
+      "width": 116,
       "height": 54.4
     },
     "_anchorPoint": {
@@ -1733,7 +1733,7 @@
       "__type__": "TypedArray",
       "ctor": "Float64Array",
       "array": [
-        104,
+        112,
         0,
         0,
         0,
@@ -1775,7 +1775,7 @@
     "_dstBlendFactor": 771,
     "_string": "一笔现金",
     "_N$string": "一笔现金",
-    "_fontSize": 26,
+    "_fontSize": 28,
     "_lineHeight": 40,
     "_enableWrapText": true,
     "_N$file": {
@@ -1852,7 +1852,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 56,
+      "width": 60,
       "height": 54.4
     },
     "_anchorPoint": {
@@ -1864,7 +1864,7 @@
       "__type__": "TypedArray",
       "ctor": "Float64Array",
       "array": [
-        186,
+        200,
         0,
         0,
         0,
@@ -1906,7 +1906,7 @@
     "_dstBlendFactor": 771,
     "_string": "存入",
     "_N$string": "存入",
-    "_fontSize": 26,
+    "_fontSize": 28,
     "_lineHeight": 40,
     "_enableWrapText": true,
     "_N$file": {
@@ -1963,7 +1963,7 @@
     "_enabled": true,
     "_layoutSize": {
       "__type__": "cc.Size",
-      "width": 428,
+      "width": 460,
       "height": 60
     },
     "_resize": 1,

BIN
assets/resources/module/redBagCash/texture/close.png


+ 6 - 6
assets/resources/module/redBagCash/texture/close.png.meta

@@ -7,8 +7,8 @@
   "premultiplyAlpha": false,
   "genMipmaps": false,
   "packable": true,
-  "width": 53,
-  "height": 49,
+  "width": 88,
+  "height": 88,
   "platformSettings": {},
   "subMetas": {
     "close": {
@@ -22,10 +22,10 @@
       "offsetY": 0,
       "trimX": 0,
       "trimY": 0,
-      "width": 53,
-      "height": 49,
-      "rawWidth": 53,
-      "rawHeight": 49,
+      "width": 88,
+      "height": 88,
+      "rawWidth": 88,
+      "rawHeight": 88,
       "borderTop": 0,
       "borderBottom": 0,
       "borderLeft": 0,

+ 3 - 3
assets/resources/module/redBagCode/redBagCode.prefab

@@ -898,9 +898,9 @@
     "_opacity": 255,
     "_color": {
       "__type__": "cc.Color",
-      "r": 0,
-      "g": 0,
-      "b": 0,
+      "r": 146,
+      "g": 96,
+      "b": 72,
       "a": 255
     },
     "_contentSize": {

+ 11 - 11
assets/resources/module/reward/reward.prefab

@@ -454,8 +454,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 58,
-      "height": 39.8
+      "width": 60,
+      "height": 41.8
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -536,12 +536,12 @@
     "_enabled": true,
     "_color": {
       "__type__": "cc.Color",
-      "r": 39,
+      "r": 207,
       "g": 110,
-      "b": 186,
+      "b": 3,
       "a": 255
     },
-    "_width": 1,
+    "_width": 2,
     "_id": ""
   },
   {
@@ -552,7 +552,7 @@
     "asset": {
       "__uuid__": "14193c60-068a-42b4-92cf-a6cb623fe40f"
     },
-    "fileId": "50AX0Mr0dJEpg5S1sxUhui",
+    "fileId": "da7lho9qNH2ZB/qccJ7nBS",
     "sync": false
   },
   {
@@ -571,7 +571,7 @@
     "_srcBlendFactor": 770,
     "_dstBlendFactor": 771,
     "_spriteFrame": {
-      "__uuid__": "a833cf58-9d83-4c93-bc43-76a3a2110b3f"
+      "__uuid__": "fa82b822-09c5-49ed-ac06-d9ff17013b1f"
     },
     "_type": 0,
     "_sizeMode": 1,
@@ -679,7 +679,7 @@
     "asset": {
       "__uuid__": "14193c60-068a-42b4-92cf-a6cb623fe40f"
     },
-    "fileId": "8en+L8aJpIdIfKaeU0fmm3",
+    "fileId": "22G3V2YSJBt5kHm/Bxrm69",
     "sync": false
   },
   {
@@ -2089,8 +2089,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 258,
-      "height": 109
+      "width": 328,
+      "height": 137
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -2273,7 +2273,7 @@
     "_srcBlendFactor": 770,
     "_dstBlendFactor": 771,
     "_spriteFrame": {
-      "__uuid__": "14b76ceb-5063-4baf-b85e-159a06092a0e"
+      "__uuid__": "cb3cd092-c92d-4a3a-8805-93621d1c1a9b"
     },
     "_type": 0,
     "_sizeMode": 1,

+ 11 - 11
assets/resources/module/reward/rewardLuck.prefab

@@ -454,8 +454,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 58,
-      "height": 39.8
+      "width": 60,
+      "height": 41.8
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -536,12 +536,12 @@
     "_enabled": true,
     "_color": {
       "__type__": "cc.Color",
-      "r": 39,
+      "r": 207,
       "g": 110,
-      "b": 186,
+      "b": 3,
       "a": 255
     },
-    "_width": 1,
+    "_width": 2,
     "_id": ""
   },
   {
@@ -552,7 +552,7 @@
     "asset": {
       "__uuid__": "eb3877a0-0566-4cd8-bb4e-fe5969e6f0e2"
     },
-    "fileId": "50AX0Mr0dJEpg5S1sxUhui",
+    "fileId": "d7+/uB2JtDTYhdLXeHf8UZ",
     "sync": false
   },
   {
@@ -571,7 +571,7 @@
     "_srcBlendFactor": 770,
     "_dstBlendFactor": 771,
     "_spriteFrame": {
-      "__uuid__": "a833cf58-9d83-4c93-bc43-76a3a2110b3f"
+      "__uuid__": "fa82b822-09c5-49ed-ac06-d9ff17013b1f"
     },
     "_type": 0,
     "_sizeMode": 1,
@@ -679,7 +679,7 @@
     "asset": {
       "__uuid__": "eb3877a0-0566-4cd8-bb4e-fe5969e6f0e2"
     },
-    "fileId": "8en+L8aJpIdIfKaeU0fmm3",
+    "fileId": "09/48ULD1IPpZUKHJYtAP0",
     "sync": false
   },
   {
@@ -2089,8 +2089,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 258,
-      "height": 109
+      "width": 328,
+      "height": 137
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -2273,7 +2273,7 @@
     "_srcBlendFactor": 770,
     "_dstBlendFactor": 771,
     "_spriteFrame": {
-      "__uuid__": "14b76ceb-5063-4baf-b85e-159a06092a0e"
+      "__uuid__": "cb3cd092-c92d-4a3a-8805-93621d1c1a9b"
     },
     "_type": 0,
     "_sizeMode": 1,

+ 3 - 3
assets/resources/module/reward/rewardMission.prefab

@@ -2089,8 +2089,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 258,
-      "height": 109
+      "width": 328,
+      "height": 137
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -2273,7 +2273,7 @@
     "_srcBlendFactor": 770,
     "_dstBlendFactor": 771,
     "_spriteFrame": {
-      "__uuid__": "14b76ceb-5063-4baf-b85e-159a06092a0e"
+      "__uuid__": "cb3cd092-c92d-4a3a-8805-93621d1c1a9b"
     },
     "_type": 0,
     "_sizeMode": 1,

BIN
assets/resources/module/reward/texture/button_big.png


+ 36 - 0
assets/resources/module/reward/texture/button_big.png.meta

@@ -0,0 +1,36 @@
+{
+  "ver": "2.3.5",
+  "uuid": "3884bc38-27df-4707-ac5c-b80f451f6bc1",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 328,
+  "height": 137,
+  "platformSettings": {},
+  "subMetas": {
+    "button_big": {
+      "ver": "1.0.4",
+      "uuid": "cb3cd092-c92d-4a3a-8805-93621d1c1a9b",
+      "rawTextureUuid": "3884bc38-27df-4707-ac5c-b80f451f6bc1",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 328,
+      "height": 137,
+      "rawWidth": 328,
+      "rawHeight": 137,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

+ 0 - 4
assets/script/before/mgr/PoolMgr.ts

@@ -203,14 +203,10 @@ export enum NODEPOOLPREFABTYPE {
     Hammer = 7,
     /**变化特效 */
     Change = 8,
-    /**提现 */
-    CashOutItem = 9,
     /**提示item */
     TipItemUI = 10,
     /**目标达成 */
     GetTargetScoreTip = 11,
-    /**关卡红包 */
-    LevelRedPacketItem = 12,
     /**得分 */
     GetScore = 13,
     /**图片提示item */

+ 1 - 0
assets/script/before/view/uiItem/CellItem.ts

@@ -357,6 +357,7 @@ export default class CellItem extends cc.Component {
                 GamePlay.Inst.node_effectUI.addChild(node_scoreEnergy);
 
                 if (this.spr_redPackIcon.node.active && GamePlay.Inst.finalGetScore < GamePlay.Inst.targetScore) {
+                    gData.reward.subType = 2;
                     mk.ui.openPanel("module/reward/rewardLuck");
                 }
             }

+ 48 - 5
assets/script/game/data/GameData.ts

@@ -24,6 +24,9 @@ export class GameData {
     public gameData: PlayerProp = null;
     /** 标志位:刷新主界面货币 */
     public init_coin: boolean = false;
+    
+     /** 标志位:刷新主界面头像 */
+    public init_head:boolean = false;
 
     public props: Map<number, number> = new Map<number, number>();
 
@@ -213,21 +216,48 @@ export enum GameProp {
 class PlayerProp {
     /** 自定义不需要校验的数据 */
     gameUserData = 0;
-    /** 今日是否有签到 */
-    isSignInToday = 0;
+    
+    _isSignInToday = 0;
+    /**
+     * 今日是否有签到
+     * - 0 未签到,表示可以签到
+     * - 1 有签到,表示不可签到
+     */
+    set isSignInToday(value: number) {
+        this._isSignInToday = value;
+        gData.sign.init_data = true;
+    }
+    get isSignInToday(): number {
+        return this._isSignInToday;
+    }
 
     private _piggyBank: number = 0;
     /** 存钱罐存款 */
     set piggyBank(value: number) {
         this._piggyBank = value;
         gData.gameData.init_coin = true;
+        gData.pigbank.init_data = true;
     }
     get piggyBank(): number {
         return this._piggyBank;
     }
 
-    /** 存钱罐能否提现 */
-    isWithdrawable = 0;
+    _isWithdrawable = 0;
+    /**
+     * 存钱罐能否提现
+     * - 0 不能提现
+     * - 1 能提现
+     */
+    set isWithdrawable(value: number) {
+        if (this._isWithdrawable != value) {
+            this._isWithdrawable = value;
+            gData.pigbank.init_data = true;
+        }
+    }
+    get isWithdrawable(): number {
+        return this._isWithdrawable;
+    }
+
     /** 存钱罐每日提现次数 */
     piggyBankCashTimes = 0;
     /** 累计存钱罐每日提现次数 */
@@ -249,8 +279,16 @@ class PlayerProp {
     get redMoney(): number {
         return this._redMoney;
     }
+
+    _signInDay = 0;
     /** 累计签到次数 客户端理解 上次签到天数 */
-    signInDay = 0;
+    set signInDay(value: number) {
+        this._signInDay = value;
+        gData.sign.init_data = true;
+    }
+    get signInDay(): number {
+        return this._signInDay;
+    }
     /** 转盘次数 */
     turntableTimes = 0;
     /** 版本号 */
@@ -394,3 +432,8 @@ export enum EVENT_TYPE {
     BACK_WxAuth = "BACK_WxAuth",
     UPDATE_CashNum = "UPDATE_CashNum",
 }
+
+export enum StorageKey{
+
+    
+}

+ 90 - 57
assets/script/game/data/LoginData.ts

@@ -6,13 +6,15 @@ import { StorageKey } from "./StorageData";
  */
 export class LoginData {
 
-    public loadResCompelete: boolean = false;   
+    public loadResCompelete: boolean = false;
 
     /** 是否登录 */
     public isLogin: boolean = false;
 
     public sessionKey: string = '';
 
+    public randomKey: string = "abcdefghijklopqrstuvwxyzabcdefgh";
+
     /** 玩家唯一id */
     public uin: string = '';
 
@@ -53,20 +55,20 @@ export class LoginData {
     }
 
     /**
-     * 登录流程 initApp-->initAd-->connect-->wxLogin-->checkLogin-->getAccountInfo
+     * 初始化
      */
-    public async login() {
-        mk.pool.init(gData.gameData.pools);
-        gData.appData.init();
-        gData.adData.init();
+    public init() {
+        let uin = mk.storage.getStorage(StorageKey.uin);
+        this.uin = uin ? uin : "";
+        let sessionKey = mk.storage.getStorage(StorageKey.sessionKey);
+        this.sessionKey = sessionKey ? sessionKey : "";
+    }
 
-        //测试参数
-        if (cc.sys.os == cc.sys.OS_ANDROID) {
-            mk.ad.ifShowAd = true;
-        }
-        else {
-            mk.ad.ifShowAd = false;
-        }
+    /**
+     * 登录流程 
+     * @description initApp-->initAd-->connect-->wxLogin-->checkLogin-->getAccountInfo
+     */
+    public async login() {
 
         //有登录记录直接跳转到登录流程最后一步
         if (this.sessionKey != '' && this.uin != '') {
@@ -74,40 +76,58 @@ export class LoginData {
             this.getAccountInfo();
             return;
         }
-        console.log("=== login 无登录记录");
-        
-        let ranKey = mk.encrypt.randomString();
+        else {
+            console.log("=== login 无登录记录");
+            this.connect();
+        }
+
+    }
+
+    /**
+     * 链接 
+     * @description 获取临时的uin
+     */
+    private async connect() {
+        //connect
+        this.randomKey = mk.encrypt.randomString();
         let data: any = {
             "mac": gData.appData.mac,
-            "psk": ranKey,
+            "psk": this.randomKey,
             "appId": gData.appData.appId
         }
 
-        //connect
         let response = await mk.http.sendRequest('connectTest', 'POST', JSON.stringify(data));
         if (response.errcode != 0) {
             return;
         }
-        data = mk.encrypt.decrypt(response.encrypt, ranKey, gData.appData.appId);
+        data = mk.encrypt.decrypt(response.encrypt, this.randomKey, gData.appData.appId);
+        console.log("[FC]connectTest decryptData", data);
         this.tempUin = JSON.parse(data).tmp_uin;
+        mk.storage.setStorage(StorageKey.uin, this.tempUin);
+        this.wxLogin();
+    }
 
+    public async wxLogin() {
         //wxLogin
+        let data;
         let encode;
-        if (gData.wechatData.code != null) {//微信登录
+        if (gData.wechatData.code != null) {
+            //微信登录
             encode = mk.encrypt.encrypt(JSON.stringify({ "code": gData.wechatData.code }), this.sessionKey, gData.appData.appId);
             data = {
                 "uin": this.uin,
                 "encrypt": encode
             };
         }
-        else {//游客登录
-            encode = mk.encrypt.encrypt(JSON.stringify({ "code": '' }), ranKey, gData.appData.appId);
+        else {
+            //游客登录
+            encode = mk.encrypt.encrypt(JSON.stringify({ "code": '' }), this.randomKey, gData.appData.appId);
             data = {
                 "uin": this.tempUin,
                 "encrypt": encode
             };
         }
-        response = await mk.http.sendRequest('wxlogin', 'POST', JSON.stringify(data), false, false);
+        let response = await mk.http.sendRequest('wxlogin', 'POST', JSON.stringify(data), false, false);
         if (response.errcode != 0) {
             if (response.errcode == -10003 || response.errcode == -20003) {
                 //清除缓存
@@ -119,13 +139,14 @@ export class LoginData {
             data = mk.encrypt.decrypt(response.encrypt, this.sessionKey, gData.appData.appId);
         }
         else {
-            data = mk.encrypt.decrypt(response.encrypt, ranKey, gData.appData.appId);
+            data = mk.encrypt.decrypt(response.encrypt, this.randomKey, gData.appData.appId);
         }
         data = JSON.parse(data);
         this.loginTicket = data.login_ticket;
+        console.log("[FC]wxLoginTest decrypt", data);
         mk.storage.setStorage(StorageKey.loginTicket, this.loginTicket);
 
-        let isFirstIn = mk.storage.getStorage('isFirstIn');
+        let isFirstIn = mk.storage.getStorage(StorageKey.isFirstIn);
         if (isFirstIn == null) {
             this.isFirstIn = true;
             mk.storage.setStorage(StorageKey.isFirstIn, 1);
@@ -138,11 +159,15 @@ export class LoginData {
         else {
             this.isNew = true;
         }
-        mk.console.log("uin:", this.uin);
         mk.storage.setStorage(StorageKey.uin, this.uin);
+        this.checkLogin();
+    }
 
-        console.log('uin  ', this.uin)
-        console.log('tempUin  ', this.tempUin)
+    /**
+     * 检测登录
+     * @returns 
+     */
+    private async checkLogin() {
         //checkLogin
         let tmp_key = '';
         if (gData.wechatData.code != null) {
@@ -152,49 +177,56 @@ export class LoginData {
             tmp_key = mk.encrypt.randomString();
         }
 
-        data = {
+        let data = {
             "tmp_key": tmp_key,
             "uin": this.uin,
             "login_ticket": this.loginTicket,
             "appId": gData.appData.appId
         }
-        response = await mk.http.sendRequest('checklogin', 'POST', JSON.stringify(data));
+        let response = await mk.http.sendRequest('checklogin', 'POST', JSON.stringify(data));
         if (response.errcode != 0) {
             return;
         }
+        let decryptData;
         if (gData.wechatData.code != null) {
-            data = mk.encrypt.decrypt(response.encrypt, this.sessionKey, gData.appData.appId);
+            decryptData = mk.encrypt.decrypt(response.encrypt, this.sessionKey, gData.appData.appId);
         }
         else {
-            data = mk.encrypt.decrypt(response.encrypt, tmp_key, gData.appData.appId);
+            decryptData = mk.encrypt.decrypt(response.encrypt, tmp_key, gData.appData.appId);
         }
 
-        data = JSON.parse(data);
-        this.sessionKey = data.session_key;
-
-        mk.storage.setStorage('sessionKey', this.sessionKey);
+        let parseData = JSON.parse(decryptData);
+        this.sessionKey = parseData.session_key;
+        console.log("[FC]checkLogin decrypt", parseData);
+        mk.storage.setStorage(StorageKey.sessionKey, this.sessionKey);
+        this.getUserInfo();
+    }
 
-        if (gData.wechatData.code != null) {
-            if (this.isNew) {//玩过此游戏并且本地数据是本机的
-                this.getAccountInfo();
-            }
-            else {//玩过此游戏 但 本地数据不是本账户的 清空数据 重新登录游戏
-                this.isNew = false;
-                gData.wechatData.code = null;
-                this.reload();
-            }
-        }
-        else {
-            this.getAccountInfo();
-        }
+    private async getUserInfo() {
+        
+        // if (gData.wechatData.code != null) {
+        //     if (this.isNew) {//玩过此游戏并且本地数据是本机的
+        //         this.getAccountInfo();
+        //     }
+        //     else {//玩过此游戏 但 本地数据不是本账户的 清空数据 重新登录游戏
+        //         this.isNew = false;
+        //         gData.wechatData.code = null;
+        //         this.reload();
+        //     }
+        // }
+        // else {
+        //     this.getAccountInfo();
+        // }
+
+        this.getAccountInfo();
     }
 
     private async getAccountInfo() {
-        let nickname = mk.storage.getStorage(StorageKey.nickname);
-        if (nickname) {
-            gData.wechatData.nickName = nickname;
-        }
-        else {
+        // let nickname = mk.storage.getStorage(StorageKey.nickname);
+        // if (nickname) {
+        //     gData.wechatData.nickName = nickname;
+        // }
+        // else {
             let aa = {
                 "uin": this.uin,
                 "login_ticket": this.loginTicket
@@ -215,22 +247,23 @@ export class LoginData {
             }
             response = mk.http.checkData(response, true);
             data = response.data;
+            mk.console.logSingle("[FC] getAccountInfo decrypt", data);
             this.isAuth = data.is_auth;
             if (this.isAuth) {
                 gData.wechatData.nickName = data.nickname;
                 gData.wechatData.avatar = data.headimgurl;
+                gData.gameData.init_head = true;
                 mk.storage.setStorage(StorageKey.isAuth, 1);
                 mk.storage.setStorage(StorageKey.nickname, gData.wechatData.nickName, false);
                 mk.storage.setStorage(StorageKey.avatar, gData.wechatData.avatar, false);
             }
-        }
+
+        // }
 
         //获取游戏数据
         gData.gameData.init();
     }
 
-
-
     /**
      * 本地数据不是本账户的 清空数据 重新登录游戏
      */

+ 1 - 14
assets/script/game/data/module/PigBankData.ts

@@ -16,23 +16,10 @@ export class PigBankData extends Data {
      * 数据初始化
      */
     public init() {
-        // 提现状态
-        this.cash_enable = gData.gameData.gameData.isWithdrawable;
     }
 
     /** 标志位:是否需要刷新数据 */
     public init_data: boolean = true;
-    /** 是否可提现 */
-    private _cash_enable: number = 0;
-    set cash_enable(bool: number) {
-        if (this._cash_enable != bool) {
-            this._cash_enable = bool;
-            this.init_data = true;
-        }
-    }
-    get cash_enable(): number {
-        return this._cash_enable;
-    }
 
     /** 提现最低限制 */
     public cash_min_limit: number = 0.3;
@@ -59,7 +46,7 @@ export class PigBankData extends Data {
         else if (response.CashMode == 1) {//公众号打款
 
         }
-        this.cash_enable = 0;
+        gData.gameData.gameData.isWithdrawable = 0;
         
     }
 }

+ 7 - 0
assets/script/game/data/module/RewardData.ts

@@ -23,6 +23,13 @@ export class RewardData extends Data {
     }
 
     /**
+     * 气泡子红包类型
+     * - 1 主界面气泡、关卡气泡
+     * - 2 关卡消除
+     */
+    subType: number = 1;
+
+    /**
     * 奖励添加
     */
     public addReward() {

+ 20 - 44
assets/script/game/data/module/SignData.ts

@@ -19,9 +19,6 @@ export class SignData extends Data {
             });
             this.c_sign = gData.gameData.configs.SignIn;
         }
-        // 服务端数据
-        this.sign_last_bar = gData.gameData.gameData.signInDay;
-        this.sign_can = gData.gameData.gameData.isSignInToday;
 
         // 客户端测试数据
         // this.sign_last_bar = gData.gameData.getProp(GameProp.sign_last_bar);
@@ -41,25 +38,6 @@ export class SignData extends Data {
         return this._c_sign;
     }
 
-    private _sign_last_bar = 0;
-    /** 上次签到天数 */
-    set sign_last_bar(value: number) {
-        this._sign_last_bar = value;
-        this.init_data = true;
-    }
-    get sign_last_bar(): number {
-        return this._sign_last_bar;
-    }
-
-    private _sign_can = 1;
-    /** 能够签到 */
-    set sign_can(value: number) {
-        this._sign_can = value;
-        this.init_data = true;
-    }
-    get sign_can(): number {
-        return this._sign_can;
-    }
 
     /** 签到列表数据 */
     public list_data: Array<Array<CSignType>> = [];
@@ -102,9 +80,9 @@ export class SignData extends Data {
      */
     public getStateByDay(login_day: number) {
         let _state = 0;
-        if (login_day <= this.sign_last_bar) {
+        if (login_day <= gData.gameData.gameData.signInDay) {
             _state = RewardState.none;
-        } else if (this.sign_can && login_day == (this.sign_last_bar + 1)) {
+        } else if (gData.gameData.gameData.isSignInToday == 0 && login_day == (gData.gameData.gameData.signInDay + 1)) {
             _state = RewardState.unlock;
         } else {
             _state = RewardState.lock;
@@ -117,7 +95,7 @@ export class SignData extends Data {
      * - 签到天数用完后将不可签到
      */
     public haveSignDay() {
-        if (this.sign_last_bar >= this.c_sign.length) {
+        if (gData.gameData.gameData.signInDay >= this.c_sign.length) {
             return false;
         } else {
             return true;
@@ -128,30 +106,28 @@ export class SignData extends Data {
      * 签到完成
      */
     public async signComplete() {
-        this.sign_can = 0;
-        this.sign_last_bar++;
         gData.gameData.gameData.signInDay++;
-        gData.gameData.gameData.isSignInToday = 0;
-        // 自定义状态
-        let new_data = [
-            {
-                key: GameProp.sign_can,
-                value: this.sign_can
-            },
-            {
-                key: GameProp.sign_last_bar,
-                value: this.sign_last_bar
-            }
-        ]
-        gData.gameData.setProps(new_data);
+        gData.gameData.gameData.isSignInToday = 1;
+        // // 自定义状态
+        // let new_data = [
+        //     {
+        //         key: GameProp.sign_can,
+        //         value: gData.gameData.gameData.isSignInToday
+        //     },
+        //     {
+        //         key: GameProp.sign_last_bar,
+        //         value: this.sign_last_bar
+        //     }
+        // ]
+        // gData.gameData.setProps(new_data);
         // 奖励展示
-        let reward_data = this.c_sign[this.sign_last_bar - 1];
+        let reward_data = this.c_sign[gData.gameData.gameData.signInDay - 1];
         if (reward_data.rewardType === RewardType.redBag) {
             // 红包
             gData.reward.data = [reward_data];// 数据列表
             mk.ui.openPanel('module/reward/reward')
         } else if (reward_data.rewardType === RewardType.rmb) {
-            // 陷阱提现
+            // 现金提现
             let data = {};
             let response = await mk.http.sendRequest('readyCash', 'POST', JSON.stringify(data));
             // let response = await mk.http.sendRequest('readyCash', 'POST', JSON.stringify(data));
@@ -159,7 +135,7 @@ export class SignData extends Data {
                 mk.tip.pop('系统异常');
                 return;
             }
-            
+
             if (response.CashMode == 0) {//星云打款
                 gData.receiptNotice.receip_rmb = reward_data.rewardNum;
                 gData.cashNormal.receip_total_rmb += gData.receiptNotice.receip_rmb;
@@ -187,7 +163,7 @@ export class SignData extends Data {
             const i_count = this.list_data[i].length;
             for (let j = 0; j < i_count; j++) {
                 let state = this.getStateByDay(this.list_data[i][j].loginDay);
-                if (this.sign_can) {
+                if (gData.gameData.gameData.isSignInToday == 0) {
                     if (state === RewardState.unlock) {
                         index = i;
                         return index

+ 16 - 1
assets/script/game/game/Game.ts

@@ -36,7 +36,7 @@ export default class Game extends cc.Component {
 
     @property({ type: cc.Node, displayName: "顶部ui组" })
     node_top_ui: cc.Node = null;
- 
+
 
     onLoad() {
         gData.gameData.gameStyle = this;
@@ -53,9 +53,14 @@ export default class Game extends cc.Component {
         if (gData.gameData.init_coin) {
             this.initInfo();
         }
+
+        if (gData.gameData.init_head) {
+            this.initHead();
+        }
     }
     lateUpdate() {
         gData.gameData.init_coin = false;
+        gData.gameData.init_head = false;
     }
 
     private initMusic() {
@@ -86,6 +91,11 @@ export default class Game extends cc.Component {
         this.lbl_rmb.string = gData.gameData.gameData.piggyBank + "";
     }
 
+    private async initHead() {
+        let result = await mk.loader.loadRemote(gData.wechatData.avatar + "?aaa=aa.jpg", null);
+        this.img_head.spriteFrame = new cc.SpriteFrame(result);
+    }
+
     //测试道具获取效果
     private testFly() {
         mk.fly.PlayCoinAnim(1, 20, cc.v2(0, -300), cc.v2(0, 0));
@@ -100,6 +110,11 @@ export default class Game extends cc.Component {
 
     /**点击分享 */
     public onClickShare() {
+        if (!gData.loginData.isAuth) {
+            mk.tip.pop("请先点击头像,在设置界面授权");
+            return;
+        }
+        console.log("=== 分享图片");
         JsbSystem.sharePic();
     }
 }

+ 0 - 1
assets/script/game/module/help/Help.ts

@@ -12,7 +12,6 @@ export default class Help extends cc.Component {
     lbl_desc: cc.Label = null;
 
     start(){
-        mk.audio.playEffect("button");
     }
 
     update() {

+ 19 - 2
assets/script/game/module/login/Login.ts

@@ -21,6 +21,12 @@ export default class Login extends cc.Component {
     }
 
     start() {
+        if (JsbSystem.getWxAppId()) {
+            //获取微信id
+            gData.appData.appId = JsbSystem.getWxAppId();
+        }
+
+        //获取设备信息
         JsbSystem.getDeviceInfo();
     }
 
@@ -37,11 +43,12 @@ export default class Login extends cc.Component {
         }
         if (gData.loginData.loadResCompelete) {
             if (gData.appData.getDeviceInfoCompelete) {
-                gData.loginData.login();
+                this.login();
                 gData.appData.getDeviceInfoCompelete = false;
             }
             else if (gData.gameData.dataFinish) {//登录流程完毕
-                if (!mk.storage.getStorage('notShowAgreementTip')) {//!mk.storage.getStorage('notShowAgreementTip')
+                if (!mk.storage.getStorage('notShowAgreementTip')) {
+                    //!mk.storage.getStorage('notShowAgreementTip')
                     mk.ui.openPanel("module/agreementTip/agreementTip");
                 } else {
                     mk.ui.openPanel("game/prefab/game");
@@ -53,6 +60,16 @@ export default class Login extends cc.Component {
         else {
             gData.loginData.loadLocalRes();
         }
+    }
 
+    public login() {
+        //初始化相关数据
+        mk.pool.init(gData.gameData.pools);
+        gData.appData.init();
+        gData.adData.init();
+        gData.loginData.init();
+        console.log("[FC] gData.appData.appId", gData.appData.appId);
+        //登录
+        gData.loginData.login();
     }
 }

+ 10 - 2
assets/script/game/module/pigBank/PigBank.ts

@@ -23,6 +23,11 @@ export default class PigBank extends cc.Component {
     start() {
         this.initCashDesc();
         mk.audio.playEffect("pigBank", false);
+        // let target_node = gData.gameData.gameStyle.icon_zb;
+        // const end_world_pos = target_node.parent.convertToWorldSpaceAR(target_node.getPosition());
+        // const end_node_pos = gData.gameData.gameStyle.node.parent.convertToNodeSpaceAR(end_world_pos);
+        // let start_node_pos = new cc.Vec2(0, -300);
+        // mk.fly.PlayCoinAnim(3, 10, start_node_pos, end_node_pos);
     }
 
     update(dt) {
@@ -43,7 +48,7 @@ export default class PigBank extends cc.Component {
      * 提现描述展示
      */
     private initCashDesc() {
-        if (gData.pigbank.cash_enable) {
+        if (gData.gameData.gameData.isWithdrawable) {
             this.lbl_get_desc.string = '直接提现';
             this.node_tip_anim.active = false;
             this.anim_btn_cash.play();
@@ -74,7 +79,10 @@ export default class PigBank extends cc.Component {
      */
     private clickCashOP() {
         mk.audio.playEffect("button");
-        if (!gData.pigbank.cash_enable) {
+        if (!gData.gameData.gameData.isWithdrawable) {
+            mk.tip.pop('明日可提现')
+            return;
+        } else if (gData.gameData.gameData.piggyBank < gData.pigbank.cash_min_limit) {
             mk.tip.pop('满' + gData.pigbank.cash_min_limit + '元可提现')
             return;
         }

+ 4 - 6
assets/script/game/module/reward/Reward.ts

@@ -122,8 +122,8 @@ export default class Reward extends cc.Component {
      */
     private clickWatchVideo() {
         cc.log('看广告请求');
-        if (gData.reward.data[0] && gData.reward.data[0].rewardType === RewardType.redBag) {
-            // 关卡结算视频
+        if (this.lid_type === LidType.mission) {
+            // 关卡结算红包
             mk.ad.watchAd((success: boolean) => {
                 mk.console.log("watchAD:" + success);
                 if (success) {
@@ -131,16 +131,14 @@ export default class Reward extends cc.Component {
                 }
             });
         } else {
-            // 气泡视频
             mk.ad.watchAd((success: boolean) => {
                 mk.console.log("watchAD:" + success);
                 if (success) {
-                    gData.adData.watchVideo(AdFun.bubble);
+                    gData.adData.watchVideo(gData.reward.subType === 2 ? AdFun.checkpoint : AdFun.bubble);
+                    gData.reward.subType = null;
                 }
             });
         }
-        // 测试数据
-        // gData.reward.adData = gData.reward.data;
     }
 
     /**

+ 11 - 9
assets/script/game/module/setting/Setting.ts

@@ -29,14 +29,13 @@ export default class Setting extends cc.Component {
         this.initData();
     }
 
-    start()
-    {
+    start() {
 
     }
 
     private async initData() {
-        console.log("=== gData.wechatData.unionid",gData.wechatData.unionid);
-        console.log("=== gData.wechatData.nickName",gData.wechatData.nickName);
+        console.log("=== gData.wechatData.unionid", gData.wechatData.unionid);
+        console.log("=== gData.wechatData.nickName", gData.wechatData.nickName);
         this.lbl_id.string = "ID:" + gData.wechatData.unionid;
         this.lbl_nickname.string = gData.wechatData.nickName;
         let music = "module/setting/texture/" + (mk.audio.getSwitchMusic() ? "on" : "off");
@@ -44,9 +43,10 @@ export default class Setting extends cc.Component {
         this.img_music.spriteFrame = await mk.loader.load(music, cc.SpriteFrame);
         this.img_effect.spriteFrame = await mk.loader.load(effect, cc.SpriteFrame);
 
-
-        let result = await mk.loader.loadRemote(gData.wechatData.avatar, null);
-        console.log("loadHead:", result);
+        console.log("=== gData.wechatData.avatar", gData.wechatData.avatar);
+        let result = await mk.loader.loadRemote(gData.wechatData.avatar+"?aaa=aa.jpg", null);
+        this.img_head.spriteFrame = new cc.SpriteFrame(result);
+        console.log("=== loadHead:", result);
         // this.img_head.spriteFrame = result;
     }
 
@@ -78,8 +78,10 @@ export default class Setting extends cc.Component {
 
     /** 点击微信授权 */
     onClickWxAuth() {
-        mk.ui.closePanel(this.node.name);
-        JsbSystem.WxAuth();
+        if (!gData.loginData.isAuth) {
+            mk.ui.closePanel(this.node.name);
+            JsbSystem.WxAuth();
+        }
     }
 
     async clickRule(data) {

+ 2 - 2
assets/script/game/module/sign/Sign.ts

@@ -65,7 +65,7 @@ export default class Sign extends cc.Component {
      */
     private clickReceiveReward() {
         mk.audio.playEffect("button");
-        if (!gData.sign.sign_can) return;
+        if (gData.gameData.gameData.isSignInToday == 1) return;
         if (!gData.sign.haveSignDay()) return;
 
         // 看广告
@@ -96,7 +96,7 @@ export default class Sign extends cc.Component {
      * 初始化按钮样式
      */
     private initBtnStyle() {
-        if (gData.sign.sign_can && gData.sign.haveSignDay()) {
+        if (gData.gameData.gameData.isSignInToday == 0 && gData.sign.haveSignDay()) {
             this.anim_btn.play();
             this.anim_btn.getComponent('SetGray').setGray(false);
         } else {

+ 9 - 0
assets/script/mk/system/AdSystem.ts

@@ -26,6 +26,15 @@ export default class AdSystem {
 
     /** 初始化广告 */
     public init() {
+
+        //判定下平台
+        if (cc.sys.os == cc.sys.OS_ANDROID) {
+            this.ifShowAd = true;
+        }
+        else {
+            this.ifShowAd = false;
+        }
+
         //初始化Topon广告SDK
         this.adSdk.initSDK();
     }

+ 28 - 8
assets/script/mk/system/FlySystem.ts

@@ -17,14 +17,14 @@ export default class FlySystem extends cc.Component {
      * @param endpos 飞行目标的世界坐标 或目标对象路径
      * @param cb 动画结束回调
     */
-    public async PlayCoinAnim(type: number = 0, num: number, pos: cc.Vec2, endpos: cc.Vec2 | string, cb: Function = null) {
+    public async PlayCoinAnim(type: number = 0, num: number, pos: cc.Vec2, endpos: cc.Vec2 | string, item_cb: Function = null) {
         for (let i = 0; i < num; i++) {
             let copyCoin = await mk.pool.getPrefab('game/prefab/coin');
             let url = 'game/texture/coin/' + type;
             let sf = await mk.loader.load(url, cc.SpriteFrame);
             copyCoin.getComponent(cc.Sprite).spriteFrame = sf;
             copyCoin.setParent(this.node);
-            copyCoin.scale = mk.math.random(0.8, 1.2, false);
+            copyCoin.scale = mk.math.random(0.56, 0.84, false);
             copyCoin.angle = mk.math.random(-45, 45, false);
             let dir = cc.v2(mk.math.random(-1, 1, false), mk.math.random(-1, 1, false));
             dir = dir.normalize();
@@ -32,20 +32,20 @@ export default class FlySystem extends cc.Component {
             let initPos = pos.add(deltaInit);
             copyCoin.setPosition(pos);
 
-            this.FlyIn(copyCoin, initPos, endpos, cb);
+            this.FlyIn(type, copyCoin, initPos, endpos, item_cb);
         }
     }
 
-    private FlyIn(target: cc.Node, end: cc.Vec2, endpos: cc.Vec2 | string = null, cb: Function = null) {
+    private FlyIn(type: number, target: cc.Node, end: cc.Vec2, endpos: cc.Vec2 | string = null, item_cb: Function = null) {
         cc.tween(target)
             .to(mk.math.random(0.3, 0.6, false), { position: cc.v3(end) }, cc.easeSineInOut())
             .call(() => {
-                this.FlyOut(target, endpos, cb);
+                this.FlyOut(type, target, endpos, item_cb);
             })
             .start();
     }
 
-    private FlyOut(target: cc.Node, end: cc.Vec2 | string, cb: Function = null) {
+    private FlyOut(type: number, target: cc.Node, end: cc.Vec2 | string, item_cb: Function = null) {
         let dur = mk.math.random(0.3, 1, false);
         cc.tween(target)
             .to(dur, { scale: 0.8 })
@@ -71,11 +71,31 @@ export default class FlySystem extends cc.Component {
                     cc.tween(end_node).to(0.1, { scale: 1.2 }).to(0.05, { scale: 1 }).start();
                 }
 
-                if (cb != null) {
-                    cb();
+                if (item_cb != null) {
+                    item_cb();
+                    this.iconScale(type);
                 }
             })
             .start();
     }
+
+    /**
+     * icon缩放动画
+     * @param type icon类型
+     * @returns 
+     */
+    private iconScale(type: number) {
+        let node;
+        if (type === 1) {
+            node = gData.gameData.gameStyle.icon_hb;
+        } else if (type === 3) {
+            node = gData.gameData.gameStyle.icon_zb;
+        }
+        if (!node) return;
+        let scale1 = cc.tween().to(0.05, { scale: 0.9 });
+        let scale2 = cc.tween().to(0.05, { scale: 1 });
+        let seque = cc.tween().sequence(scale1, scale2);
+        cc.tween(node).then(seque).repeat(2).start();
+    }
 }
 

+ 7 - 7
assets/script/mk/system/JsbSystem.ts

@@ -1,3 +1,5 @@
+import { StorageKey } from "../../game/data/StorageData";
+
 /**
  * Jsb管理类(与安卓Java类或者IOS交互)
  * @description
@@ -108,10 +110,10 @@ export default class JsbSystem {
     public static getWxAppId() {
         let appid = "";
         if (cc.sys.os == cc.sys.OS_ANDROID) {
-            appid = this.callStaticMethod(this._JSB_ANDROID_PATH, "getWXAppId", "()Ljava/lang/String;");
+            appid = this.callStaticMethod(this._JSB_ANDROID_PATH, "getWxAppId", "()Ljava/lang/String;");
         }
         else if (cc.sys.os == cc.sys.OS_IOS) {
-            appid = this.callStaticMethod("CsjAdReward", "getWXAppId", "",);
+            appid = this.callStaticMethod("CsjAdReward", "getWxAppId", "",);
         }
         return appid;
     }
@@ -300,12 +302,10 @@ export default class JsbSystem {
      * @param code  微信code(Java返回)
      */
     public static onGetWxAccessCode(code) {
-        gData.loginData.sessionKey = "";
-        gData.loginData.uin = "";
         // 暂时注释,需要网络通信
         gData.wechatData.code = code;
         console.log("=== gData.wechatData.code", gData.wechatData.code);
-        gData.loginData.login();
+        gData.loginData.wxLogin();
     }
 
     /**
@@ -333,7 +333,7 @@ export default class JsbSystem {
             this.callStaticMethod("AppController", "WxAuth", "");
         }
     }
-    
+
     /**
      * 分享图片
      * @description 微信SDK功能 CocosToJava
@@ -343,7 +343,7 @@ export default class JsbSystem {
             return
         }
         if (cc.sys.os == cc.sys.OS_ANDROID) {
-            jsb.reflection.callStaticMethod("org/cocos2dx/javascript/config/TTAdManagerHolder", "sharePic", "()V");
+            jsb.reflection.callStaticMethod(this._JSB_ANDROID_PATH, "sharePic", "()V");
         }
         else if (cc.sys.os == cc.sys.OS_IOS) {
             jsb.reflection.callStaticMethod("GameConfig", "sharePic:", "");

+ 3 - 3
build/jsb-link/frameworks/runtime-src/proj.android-studio/.idea/modules/-1746423203/libcocos2dx.iml

@@ -33,16 +33,16 @@
       <sourceFolder url="file://D:/Develop/CocosDashboard_1.0.9/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/java/src" isTestSource="false" />
     </content>
     <content url="file://D:/Develop/CocosDashboard_1.0.9/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx">
-      <sourceFolder url="file://D:/Develop/CocosDashboard_1.0.9/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/source/apt/debug" isTestSource="false" generated="true" />
       <sourceFolder url="file://D:/Develop/CocosDashboard_1.0.9/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/aidl_source_output_dir/debug/compileDebugAidl/out" isTestSource="false" generated="true" />
-      <sourceFolder url="file://D:/Develop/CocosDashboard_1.0.9/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
       <sourceFolder url="file://D:/Develop/CocosDashboard_1.0.9/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/renderscript_source_output_dir/debug/compileDebugRenderscript/out" isTestSource="false" generated="true" />
+      <sourceFolder url="file://D:/Develop/CocosDashboard_1.0.9/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
+      <sourceFolder url="file://D:/Develop/CocosDashboard_1.0.9/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/source/apt/debug" isTestSource="false" generated="true" />
       <sourceFolder url="file://D:/Develop/CocosDashboard_1.0.9/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/res/rs/debug" type="java-resource" generated="true" />
       <sourceFolder url="file://D:/Develop/CocosDashboard_1.0.9/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/res/resValues/debug" type="java-resource" generated="true" />
       <sourceFolder url="file://D:/Develop/CocosDashboard_1.0.9/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/source/apt/androidTest/debug" isTestSource="true" generated="true" />
-      <sourceFolder url="file://D:/Develop/CocosDashboard_1.0.9/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/aidl_source_output_dir/debugAndroidTest/compileDebugAndroidTestAidl/out" isTestSource="true" generated="true" />
       <sourceFolder url="file://D:/Develop/CocosDashboard_1.0.9/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" />
       <sourceFolder url="file://D:/Develop/CocosDashboard_1.0.9/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/renderscript_source_output_dir/debugAndroidTest/compileDebugAndroidTestRenderscript/out" isTestSource="true" generated="true" />
+      <sourceFolder url="file://D:/Develop/CocosDashboard_1.0.9/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/aidl_source_output_dir/debugAndroidTest/compileDebugAndroidTestAidl/out" isTestSource="true" generated="true" />
       <sourceFolder url="file://D:/Develop/CocosDashboard_1.0.9/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/res/rs/androidTest/debug" type="java-test-resource" generated="true" />
       <sourceFolder url="file://D:/Develop/CocosDashboard_1.0.9/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/res/resValues/androidTest/debug" type="java-test-resource" generated="true" />
       <sourceFolder url="file://D:/Develop/CocosDashboard_1.0.9/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/source/apt/test/debug" isTestSource="true" generated="true" />

+ 3 - 3
build/jsb-link/frameworks/runtime-src/proj.android-studio/.idea/modules/app/EasyEliminate.iml

@@ -40,16 +40,16 @@
       <sourceFolder url="file://$MODULE_DIR$/../../../../Classes" isTestSource="false" />
     </content>
     <content url="file://$MODULE_DIR$/../../../app">
-      <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/source/apt/debug" isTestSource="false" generated="true" />
+      <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/renderscript_source_output_dir/debug/compileDebugRenderscript/out" isTestSource="false" generated="true" />
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/aidl_source_output_dir/debug/compileDebugAidl/out" isTestSource="false" generated="true" />
+      <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/source/apt/debug" isTestSource="false" generated="true" />
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/renderscript_source_output_dir/debug/compileDebugRenderscript/out" isTestSource="false" generated="true" />
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/res/rs/debug" type="java-resource" generated="true" />
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/res/resValues/debug" type="java-resource" generated="true" />
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/source/apt/androidTest/debug" isTestSource="true" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/aidl_source_output_dir/debugAndroidTest/compileDebugAndroidTestAidl/out" isTestSource="true" generated="true" />
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" />
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/renderscript_source_output_dir/debugAndroidTest/compileDebugAndroidTestRenderscript/out" isTestSource="true" generated="true" />
+      <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/aidl_source_output_dir/debugAndroidTest/compileDebugAndroidTestAidl/out" isTestSource="true" generated="true" />
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/res/rs/androidTest/debug" type="java-test-resource" generated="true" />
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/res/resValues/androidTest/debug" type="java-test-resource" generated="true" />
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/source/apt/test/debug" isTestSource="true" generated="true" />

BIN
build/jsb-link/frameworks/runtime-src/proj.android-studio/app/release/EasyEliminate-release.apk


+ 71 - 0
build/jsb-link/frameworks/runtime-src/proj.android-studio/app/src/org/cocos2dx/javascript/AppActivity.java

@@ -28,10 +28,13 @@ import org.cocos2dx.javascript.thirdSdk.ThirdSdkMgr;
 import org.cocos2dx.lib.Cocos2dxActivity;
 import org.cocos2dx.lib.Cocos2dxGLSurfaceView;
 
+import android.Manifest;
+import android.content.pm.PackageManager;
 import android.os.Bundle;
 
 import android.content.Intent;
 import android.content.res.Configuration;
+import android.util.Log;
 
 public class AppActivity extends Cocos2dxActivity {
 
@@ -146,4 +149,72 @@ public class AppActivity extends Cocos2dxActivity {
         SDKWrapper.getInstance().onStart();
         super.onStart();
     }
+
+    //用户设备授权-----------------------------------------------------------------------------------
+    /**请求用户权限*/
+    public void requestPermission() {
+//        Log.i(" *************** ", "requestPermission");
+//        // Here, thisActivity is the current activity
+//        if (ContextCompat.checkSelfPermission(this,
+//                Manifest.permission.READ_CONTACTS)
+//                != PackageManager.PERMISSION_GRANTED) {
+//            Log.i("*************** ", "checkSelfPermission");
+//            // Should we show an explanation?
+//            if (ActivityCompat.shouldShowRequestPermissionRationale(this,
+//                    Manifest.permission.READ_CONTACTS)) {
+//                Log.i("*************** ", "shouldShowRequestPermissionRationale");
+//                // Show an expanation to the user *asynchronously* -- don't block
+//                // this thread waiting for the user's response! After the user
+//                // sees the explanation, try again to request the permission.
+//
+//                ActivityCompat.requestPermissions(this,
+//                        new String[]{Manifest.permission.READ_CONTACTS, Manifest.permission.READ_PHONE_STATE, Manifest.permission.WRITE_EXTERNAL_STORAGE},
+//                        1);
+//
+//            } else {
+//                Log.i(" *************** ", "requestPermissions");
+//                // No explanation needed, we can request the permission.
+//                ActivityCompat.requestPermissions(this,
+//                        new String[]{Manifest.permission.READ_CONTACTS, Manifest.permission.READ_PHONE_STATE, Manifest.permission.WRITE_EXTERNAL_STORAGE},
+//                        1);
+//
+//                // MY_PERMISSIONS_REQUEST_READ_CONTACTS is an
+//                // app-defined int constant. The callback method gets the
+//                // result of the request.
+//            }
+//        }
+    }
+
+    @Override
+    public void onRequestPermissionsResult(int requestCode, String permissions[], int[] grantResults) {
+        switch (requestCode) {
+            case 1: {
+                // If request is cancelled, the result arrays are empty.
+                if (grantResults.length > 0
+                        && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
+                    Log.i("***************", "onRequestPermissionsResult granted");
+                    // permission was granted, yay! Do the
+                    // contacts-related task you need to do.
+                } else {
+                    Log.i("***************", "onRequestPermissionsResult denied");
+                    // permission denied, boo! Disable the
+                    // functionality that depends on this permission.
+                }
+
+//                //点击之后获取设备信息
+//                ThirdSdkMgr.getDeviceInfo();
+//                //友盟这个时候统计
+//                UMSDKMgr.getInstance()._UMSDKInit();
+//                //数数统计
+//                TDSDKMgr.getInstance().initSdk(this);
+//                //数数注册
+//                TDSDKMgr.getInstance().setTAEventRegister();
+
+                return;
+            }
+
+            // other 'case' lines to check for other
+            // permissions this app might request
+        }
+    }
 }

+ 10 - 0
build/jsb-link/frameworks/runtime-src/proj.android-studio/app/src/org/cocos2dx/javascript/thirdSdk/ThirdSdkMgr.java

@@ -44,6 +44,7 @@ public class ThirdSdkMgr {
     /** 分享图 */
     public static  void sharePic()
     {
+        Log.d("=== Android","微信分享大图");
         WXEntryActivity.getInstance().sharePic();
     }
 
@@ -109,5 +110,14 @@ public class ThirdSdkMgr {
         return str;
     }
 
+    /**获取微信appid*/
+    public static String getWxAppId(){
+//        Log.d(">>>>> ", "getWXAppId: " + BuildConfig.WX_APP_ID);
+        return BuildConfig.WX_APP_ID;
+    }
+    public static void requestPermission() {
+
+    }
+
     //埋点相关---------------------------------------------------------------------------------------
 }

File diff suppressed because it is too large
+ 392 - 208
build/jsb-link/js backups (useful for debugging)/main.index.js


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