Kaynağa Gözat

替换图片,修改接口url

lgh 8 ay önce
ebeveyn
işleme
da97ea3a8d

BIN
assets/res/texture/fight/btnjilu.png


+ 1 - 1
assets/resources/prefab/ui/game/gamePanel.prefab

@@ -3604,7 +3604,7 @@
       "b": 0,
       "a": 255
     },
-    "_string": "游戏币",
+    "_string": "游戏币",
     "_horizontalAlign": 1,
     "_verticalAlign": 1,
     "_actualFontSize": 19,

+ 2 - 2
assets/scene/main.scene

@@ -904,8 +904,8 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": -0.403684139251709,
-      "z": 1.02034425735474
+      "y": -0.403,
+      "z": 1.02
     },
     "_lrot": {
       "__type__": "cc.Quat",

+ 2 - 2
assets/scripts/game/HttpHelp.ts

@@ -17,7 +17,7 @@ export class HttpHelp {
     static HttpsUrlRelpse: string = "http://testapi.mstardance.com/api/"; //屏蔽掉,正式的也是测试//"http://star.mstardance.com/api/";
 
     static httpGet(url: string, callback: Function, token: string = null!, bind: any = null) {
-        url = gameManager.Instance.golabMemory.isReplse?HttpHelp.HttpsUrlRelpse:HttpHelp.HttpsUrlTest + url;
+        url = (gameManager.Instance.golabMemory.isReplse?HttpHelp.HttpsUrlRelpse:HttpHelp.HttpsUrlTest) + url;
         console.log('请求地址是:', url);
         let xhr = new XMLHttpRequest();
         xhr.onreadystatechange = function () {
@@ -52,7 +52,7 @@ export class HttpHelp {
      * @param {function} callback 
      */
     static httpPost(url: string, params: any, callback: Function, token: string = null!, bind: any = null) {
-        url = gameManager.Instance.golabMemory.isReplse?HttpHelp.HttpsUrlRelpse:HttpHelp.HttpsUrlTest  + url;
+        url = (gameManager.Instance.golabMemory.isReplse?HttpHelp.HttpsUrlRelpse:HttpHelp.HttpsUrlTest)  + url;
         let xhr = new XMLHttpRequest();
         xhr.onreadystatechange = function () {
             //  console.log('xhr.readyState=' + xhr.readyState + '  xhr.status=' + xhr.status);

+ 7 - 2
assets/scripts/game/gameManager.ts

@@ -133,7 +133,7 @@ export class gameManager extends Component {
         console.log("获取指定浏览器参数:", token);
         if (token && token.length > 20) { //正式环境
             console.log("正式环境");
-            this.golabMemory.isReplse = true;
+            this.golabMemory.isReplse = false;
             this.golabMemory.Token = token;
         } else {
             console.log("测试环境");
@@ -172,13 +172,18 @@ export class gameManager extends Component {
 
             playerData.instance.createPlayerInfo({ gold: this.golabMemory.Chagnci?.gameCurrcy });
         }
-        if (this.golabMemory.Chagnci?.gameCurrcy) {
+        if (this.golabMemory.Chagnci?.gameCurrcy) {            
             playerData.instance.setPlayMoney(this.golabMemory.Chagnci?.gameCurrcy);
             if (this.scriptGoldNumFont) {
 
                 this.scriptGoldNumFont.updateShow(playerData.instance.playerInfo['gold']);
             }
 
+        }else{
+            if (this.scriptGoldNumFont) {
+
+                this.scriptGoldNumFont.updateShow(playerData.instance.playerInfo['gold']);
+            }
         }
 
         this._initGame();

BIN
~$推币说明.docx