Bladeren bron

增加H5测试

zouyong 5 jaren geleden
bovenliggende
commit
7b7d0649aa

+ 12 - 2
assets/scripts/Loader.ts

@@ -255,8 +255,18 @@ export default class Loader extends cc.Component {
                         GameM.commonData.mateTalentCfg = cc.loader.getRes('configs/mateTalentCfg').json
                         GameM.commonData.mainBgCfg = cc.loader.getRes('configs/mainBgCfg').json
 
-
-                        AdM.getWxAppId();
+                        if (CC_JSB) {
+                            AdM.getWxAppId();
+                        }
+                        else {
+                            if (GameM.commonData.session_key != '' && GameM.commonData.uin != '') {
+                                console.log(">>>>>5uin:" + GameM.commonData.uin);
+                                GameM.httpM.getAccountInfo()
+                            }
+                            else {
+                                GameM.httpM.init();
+                            }
+                        }
 
                         this.isLoaded = true;
 

+ 10 - 5
assets/scripts/manager/HttpM.ts

@@ -17,9 +17,9 @@ const { ccclass, property } = cc._decorator;
 @ccclass
 export default class HttpM {
     //正式服
-    private serverUrl = 'https://tcsg.duiweize.com/'
+    // private serverUrl = 'https://tcsg.duiweize.com/'
     //三国战戟预发服
-    // private serverUrl = 'https://tcsg-test.duiweize.com/'
+    private serverUrl = 'https://tcsg-test.duiweize.com/'
     //老梅
     // private serverUrl = 'http://172.16.15.45:3942/'
     //老代
@@ -277,11 +277,16 @@ export default class HttpM {
     connectTest() {
         // console.log('mac  ', GameM.commonData.machineInfo.mac)
         let mac = ''
-        if (GameM.commonData.machineInfo.mac.indexOf(',')) {
-            mac = GameM.commonData.machineInfo.mac.split(',')[0];
+        if (CC_JSB) {
+            if (GameM.commonData.machineInfo.mac.indexOf(',')) {
+                mac = GameM.commonData.machineInfo.mac.split(',')[0];
+            }
+            else {
+                mac = GameM.commonData.machineInfo.mac;
+            }
         }
         else {
-            mac = GameM.commonData.machineInfo.mac;
+            mac = "dg:34:67:35:90:32"
         }
 
         GameM.commonData.ranKey = Utils.randomString()

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


+ 13 - 3
build/jsb-link/js backups (useful for debugging)/project.js

@@ -18676,7 +18676,7 @@ value: !0
 var s = t("./GameM"), r = t("../utils/Utils"), c = t("../datas/CommonData"), l = t("./AdM"), d = t("./UiM"), u = t("../ui/CashOut"), h = t("../datas/GlobalStorage"), f = t("../Main"), p = t("../ui/Setting"), m = t("../utils/LogUtil"), y = t("../prefabs/NetDetaileNode"), g = t("../ui/CashPro"), v = t("./SwitchM"), b = cc._decorator, D = b.ccclass, C = (b.property, 
 function() {
 function t() {
-this.serverUrl = "https://tcsg.duiweize.com/";
+this.serverUrl = "https://tcsg-test.duiweize.com/";
 this.isTry = "";
 this.netDetaileNode = null;
 }
@@ -20245,7 +20245,7 @@ case 2:
 console.error(e);
 }
 };
-t.openLog = !1;
+t.openLog = !0;
 t.Tag = "TCSG ";
 return t;
 }();
@@ -41741,12 +41741,16 @@ this.loadInter(this.interType);
 e.prototype.loadNative = function(t, e) {
 void 0 === t && (t = 0);
 void 0 === e && (e = !1);
+console.log("AnyThinkNativeDemo  loadNative  ");
 cc.thirdVideo.loadNative(t, e);
 var a = r.Utils.randomString(32);
 c.default.sendUROIEvent(a, "", l.default.commonData.nativePlaceId, "ad_request", "flow", "other", "");
 };
 e.prototype.showNative = function(t) {
-l.default.commonData.toponLoaded && cc.thirdVideo.showNative(t);
+if (l.default.commonData.toponLoaded) {
+console.log("AnyThinkNativeDemo  showNative  ");
+cc.thirdVideo.showNative(t);
+}
 };
 e.prototype.onNativeAdLoaded = function(t) {
 var e = r.Utils.randomString(32);
@@ -41999,10 +42003,13 @@ this.nativeIsShow = !1;
 this.nativeShow = !1;
 },
 showNative: function(t) {
+console.log("AnyThinkNativeDemo  111111111 ");
 if (!this.nativeIsShow) if (this.nativeIsLoading) {
 this.nativeType = t;
 this.nativeShow = !0;
 } else if (this.nativeIsLoad) {
+console.log("AnyThinkNativeDemo  2222222222 ");
+console.log("AnyThinkNativeDemo  333333333333 ");
 this.nativeIsShow = !0;
 var e = this.frameWidth / 750, a = 656 * e, o = 440 * e, n = 12, i = new ATNativeJSSDK.AdViewProperty(), s = 0;
 if (0 == t) {
@@ -42027,13 +42034,16 @@ ATNativeJSSDK.showAd(this.curNativeId, i);
 onNativeAdLoaded: function(t) {
 this.nativeIsLoad = !0;
 this.nativeIsLoading = !1;
+console.log("AnyThinkNativeDemo::onNativeAdLoaded(" + t + ")");
 if (this.nativeShow) {
+console.log("AnyThinkNativeDemo  aaaaaaaaaa ");
 this.nativeIsShow = !1;
 this.showNative(this.nativeType);
 }
 null != this.proxy && this.proxy.onNativeAdLoaded(t);
 },
 onNativeAdLoadFail: function(t, e) {
+console.log("AnyThinkNativeDemo::onNativeAdLoadFail(" + t + ", " + e + ")");
 this.nativeIsLoading = !1;
 this.nativeIsLoad = !1;
 null != this.proxy && this.proxy.onNativeAdLoadFail(t, e);

BIN
build/jsb-link/src/project.jsc


File diff suppressed because it is too large
+ 1253 - 1253
creator.d.ts


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