Ver Fonte

update ios

zy_1995 há 6 meses atrás
pai
commit
276d5b702b

+ 1 - 1
assets/Scene/Launch.fire

@@ -1415,7 +1415,7 @@
     "_srcBlendFactor": 770,
     "_dstBlendFactor": 771,
     "_spriteFrame": {
-      "__uuid__": "9b5bf54f-e0e2-4e33-9513-9e0e644f136e"
+      "__uuid__": "d2febd18-7212-4ff0-add0-0d8ee575e0ed"
     },
     "_type": 0,
     "_sizeMode": 1,

Diff do ficheiro suprimidas por serem muito extensas
+ 994 - 218
assets/Scene/Lobby.fire


Diff do ficheiro suprimidas por serem muito extensas
+ 8 - 5
assets/Scene/Script/Lobby.js


+ 2 - 1
assets/Scene/Script/Platform.js

@@ -2,7 +2,7 @@
 window.g_bInit = false;
 
 window.APP_BOTTOM_VER_ANDROID = `1.0.0.1`;
-window.APP_BOTTOM_VER_IOS = `1.0.0.1`;
+window.APP_BOTTOM_VER_IOS = `1.0.0.2`;
 window.APP_VERSION_ON_LINE = `1.0.0.0`;
 window.APP_VERSION = `1.0.0.0`;
 window.APP_VERSION_UI = `1.0.0.2`;
@@ -77,6 +77,7 @@ window.Key_ActivityPop = `${window.clientName}_${window.LOGIN_SERVER_IP}_Activit
 window.PLATFORM_WX = 1;
 window.PLATFORM_PHONE = 2;
 window.PLATFORM_TEST = 3;
+window.PAY_CURRENCY_SYMBOL = "NT$";
 
 window.g_CntGameGPS = 0;
 

+ 1 - 1
assets/Script/CustomClass/PreLoader.js

@@ -14,7 +14,7 @@ var PreLoader = cc.Class({
         this.m_sBundles = new Array("21201", "Chat_2", "GamePublic_3", "GameSetting_2", "Jetton_2",
             "PublicMJ_2", "Activity", "AgreeMent", "Alert_6", "BindPhone", "Club", "ClubAndroid", "Com_6", "CSY", "DLG_7", "FilterNode",
             "GameRecord_2", "InviteCode", "Login", "MailInfo", "PublicAudio", "Room", "SelfInfo", "Service",
-            "Setting_3", "Share", "Sign", "TurnTable", "UpdateManager_7");
+            "Setting_3", "Share", "Sign", "TurnTable", "Store", "UpdateManager_7");
     },
 
     Init: function (CallFunc) {

+ 24 - 1
assets/Script/CustomClass/WebDataCenter.js

@@ -103,6 +103,29 @@ WebDataCenter = cc.Class({
         xhr.timeout = 5000;// 5 seconds for timeout
         xhr.open("POST", Url, true);
         xhr.send();
-    }
+    },
+
+    httpPOST(url, data, callback) {
+        let dataStr = '';
+        Object.keys(data).forEach(key => {
+            dataStr += key + '=' + encodeURIComponent(data[key]) + '&';
+        })
+        if (dataStr !== '') {
+            dataStr = dataStr.substring(0, dataStr.lastIndexOf('&'));
+        }
+
+        var xhr = cc.loader.getXMLHttpRequest();
+        xhr.open("POST", url, true);
+        xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=UTF-8");
+        xhr.onreadystatechange = function () {
+            if (xhr.readyState === 4 && (xhr.status >= 200 && xhr.status < 300)) {
+                let response = xhr.responseText.replace(/\s+/g, '');
+                cc.log("post data return responseText: ", response);
+                callback(JSON.parse(response));
+            }
+        };
+        xhr.send(dataStr);
+    },
+
 });
 WebCenter = new WebDataCenter();

+ 36 - 4
assets/Script/Define/ThirdParty.js

@@ -70,6 +70,15 @@ function onPickImageResult(base64) {
     image.src = "data:image/png;base64," + base64;
 }
 
+//#region 购买商品回调
+function CallBoughtGoodFunc(payData) {
+    if (window.LOG_NET_DATA) console.log("CallBoughtGoodFunc ", payData);
+    const callbackName = "onBuyGoodCallback"
+    if (g_Lobby != null && g_Lobby[callbackName]) {
+        g_Lobby[callbackName](payData);
+    }
+}
+
 //原生功能
 function ThirdPartyGetBattery() {
     var pLv = 1;
@@ -188,7 +197,7 @@ function ThirdPartyUpdateGame(url,apkName,ver) {
     }
 }
 
-//#region google相关
+//#region google登录
 function ThirdPartyGoogleLogin() {
     if (cc.sys.isNative) {
         if (cc.sys.OS_IOS == cc.sys.os) {
@@ -201,7 +210,7 @@ function ThirdPartyGoogleLogin() {
 
 //#endregion
 
-//#region line相关
+//#region line登录
 function ThirdPartyLINELogin() {
     if (cc.sys.isNative) {
         if (cc.sys.OS_IOS == cc.sys.os) {
@@ -214,7 +223,7 @@ function ThirdPartyLINELogin() {
 
 //#endregion
 
-//#region apple相关
+//#region apple登录
 function ThirdPartyIOSLogin() {
     if (cc.sys.isNative) {
         if (cc.sys.OS_IOS == cc.sys.os) {
@@ -225,7 +234,7 @@ function ThirdPartyIOSLogin() {
 
 //#endregion
 
-//微信相关
+//#region 微信登录
 function ThirdPartyWXLogin() {
     if (cc.sys.isNative) {
         if (cc.sys.OS_IOS == cc.sys.os) {
@@ -235,7 +244,30 @@ function ThirdPartyWXLogin() {
         }
     }
 }
+//#endregion
+
+//#region 商品购买
+//goodInfo { itemID }
+function ThirdPartyBuyGood(goodInfo) {
+    if (cc.sys.isNative) {
+        if (cc.sys.OS_IOS == cc.sys.os) {
+            jsb.reflection.callStaticMethod("AppController", "sendBuyGood:", goodInfo);
+        } else if (cc.sys.OS_ANDROID == cc.sys.os) {
+            jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "sendBuyGood", "(Ljava/lang/String;)V", goodInfo);
+        }
+    }
+}
 
+function ThirdPartyReturnPayReceiptVerification(info) {
+    if (cc.sys.isNative) {
+        if (cc.sys.OS_IOS == cc.sys.os) {
+            jsb.reflection.callStaticMethod("AppController", "sendReceiptVerification:", info);
+        } else if (cc.sys.OS_ANDROID == cc.sys.os) {
+            jsb.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "sendReceiptVerification", "(Ljava/lang/String;)V", goodInfo);
+        }
+    }
+}
+//#endregion
 
 function ThirdPartyShareMessage(ShareInfo, isLine) {
     if (window.LOG_NET_DATA) console.log("WXShare ", isLine, " ", ShareInfo)

+ 1 - 1
assets/resources/Image/Common.meta

@@ -1,6 +1,6 @@
 {
   "ver": "1.1.3",
-  "uuid": "0aab3f46-6768-4e9a-93cb-a6e6cdff41cf",
+  "uuid": "90bb72dd-8558-4784-b5ef-75545d83617c",
   "importer": "folder",
   "isBundle": false,
   "bundleName": "",

+ 3 - 3
assets/resources/Image/Common/btn-confirm-y.png.meta

@@ -1,6 +1,6 @@
 {
   "ver": "2.3.7",
-  "uuid": "a7a61083-30d3-443f-a05a-fd60db2413cc",
+  "uuid": "b33d26b7-8c82-422a-9a08-9106f589b962",
   "importer": "texture",
   "type": "sprite",
   "wrapMode": "clamp",
@@ -14,9 +14,9 @@
   "subMetas": {
     "btn-confirm-y": {
       "ver": "1.0.6",
-      "uuid": "b94f2628-b91a-4619-b76f-0f2113ccaed3",
+      "uuid": "227027f3-17b1-4444-9b63-40b6a6ed7a12",
       "importer": "sprite-frame",
-      "rawTextureUuid": "a7a61083-30d3-443f-a05a-fd60db2413cc",
+      "rawTextureUuid": "b33d26b7-8c82-422a-9a08-9106f589b962",
       "trimType": "auto",
       "trimThreshold": 1,
       "rotated": false,

+ 3 - 3
assets/resources/Image/Common/dialog-bg.png.meta

@@ -1,6 +1,6 @@
 {
   "ver": "2.3.7",
-  "uuid": "3e20142b-b35c-43dc-aaa9-196fcc6de8fe",
+  "uuid": "5f308bc1-2beb-488a-8963-67dd14901ae7",
   "importer": "texture",
   "type": "sprite",
   "wrapMode": "clamp",
@@ -14,9 +14,9 @@
   "subMetas": {
     "dialog-bg": {
       "ver": "1.0.6",
-      "uuid": "9b5bf54f-e0e2-4e33-9513-9e0e644f136e",
+      "uuid": "d2febd18-7212-4ff0-add0-0d8ee575e0ed",
       "importer": "sprite-frame",
-      "rawTextureUuid": "3e20142b-b35c-43dc-aaa9-196fcc6de8fe",
+      "rawTextureUuid": "5f308bc1-2beb-488a-8963-67dd14901ae7",
       "trimType": "auto",
       "trimThreshold": 1,
       "rotated": false,

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff