diff --git a/assets/Script/JiaZai.ts b/assets/Script/JiaZai.ts index a08ce10..8662491 100644 --- a/assets/Script/JiaZai.ts +++ b/assets/Script/JiaZai.ts @@ -4251,8 +4251,10 @@ export default class JiaZai extends cc.Component { // ============================================ update(dt) { if (this.newbieGift && this.monthlyCardNode) { - if (this.monthlyCardNode.active == true) { - this.monthlyCardNode.active = false; + if (this.actionpNode) { + if (this.monthlyCardNode.active == true && this.actionpNode.active == true) { + this.monthlyCardNode.active = false; + } } } } diff --git a/assets/Script/Revive.ts b/assets/Script/Revive.ts index e053ae7..b2887bd 100644 --- a/assets/Script/Revive.ts +++ b/assets/Script/Revive.ts @@ -224,23 +224,8 @@ export default class Revive extends cc.Component { // this.btn_Touch = true; this.openLoad(); this.btn_Touch = true; - let iosPayInfo = { - price: price, - payment_name: productId, - payment_count: 1, - } - this.iosPrice = price; - this.iosProductId = productId; - this.iosCount = 1; - Utils.GoKEFu(iosPayInfo, (res) => { - if (res == "success") { - console.log("客服回话成功"); - } - else { - console.log("客服回话失败"); - this.closeLoad(); - } - }); + + this.iosOldPay(price, productId); } else { // MiniGameSdk.API.showToast("充值成功"); @@ -276,6 +261,12 @@ export default class Revive extends cc.Component { return; } else if (res.err) { + console.log("错误原因:", res.errMsg); + if (res.errMsg && res.errMsg.indexOf("fail App Store") !== -1) { + console.log("走ios旧支付"); + this.iosOldPay(price, productId); + return; + } MiniGameSdk.API.showToast("充值失败"); //console.log(res); this.btn_Touch = true; @@ -436,4 +427,27 @@ export default class Revive extends cc.Component { onDestroy() { } + + iosOldPay(price, productId) { + // 旧版本ios支付 + let iosPayInfo = { + price: price, + payment_name: productId, + payment_count: 1, + } + this.iosPrice = price; + this.iosProductId = productId; + this.iosCount = 1; + console.log("准备跳客服回话:"); + console.log(this.iosProductId); + Utils.GoKEFu(iosPayInfo, (res) => { + if (res == "success") { + console.log("客服回话成功"); + } + else { + console.log("客服回话失败"); + this.closeLoad(); + } + }); + } } diff --git a/assets/Script/module/Config/GameConfig.ts b/assets/Script/module/Config/GameConfig.ts index 7ffc8b5..6fcff5a 100644 --- a/assets/Script/module/Config/GameConfig.ts +++ b/assets/Script/module/Config/GameConfig.ts @@ -302,7 +302,7 @@ export class GameConfig { vibrateOpen: true, //震动 coinnum: 0, //每局的金币数 paid_user: false, //是否是付费用户 - version: "1.9.89", //版本号 + version: "1.9.90", //版本号 shushu_DistinctId: "", //数数访客ID shushu_AccountId: "", //数数账号ID uid: "", //用户和后端唯一id diff --git a/assets/Script/module/Pay/Utils.ts b/assets/Script/module/Pay/Utils.ts index 6708778..c835ae4 100644 --- a/assets/Script/module/Pay/Utils.ts +++ b/assets/Script/module/Pay/Utils.ts @@ -126,6 +126,7 @@ export default class Utils { errCode: errCode, err: "请求支付失败", } + console.log("请求支付失败"); callBack(data); } }) diff --git a/assets/Script/monthlyCard.ts b/assets/Script/monthlyCard.ts index 3951a6f..b513451 100644 --- a/assets/Script/monthlyCard.ts +++ b/assets/Script/monthlyCard.ts @@ -305,23 +305,8 @@ export default class NewClass extends cc.Component { // this.btn_Touch = true; this.openLoad(); this.btn_Touch = true; - let iosPayInfo = { - price: price, - payment_name: productId, - payment_count: 1, - } - this.iosPrice = price; - this.iosProductId = productId; - this.iosCount = 1; - Utils.GoKEFu(iosPayInfo, (res) => { - if (res == "success") { - console.log("客服回话成功"); - } - else { - console.log("客服回话失败"); - this.closeLoad(); - } - }); + + this.iosOldPay(price, productId); } else { // MiniGameSdk.API.showToast("充值成功"); @@ -357,6 +342,12 @@ export default class NewClass extends cc.Component { return; } else if (res.err) { + console.log("错误原因:", res.errMsg); + if (res.errMsg && res.errMsg.indexOf("fail App Store") !== -1) { + console.log("走ios旧支付"); + this.iosOldPay(price, productId); + return; + } MiniGameSdk.API.showToast("充值失败"); //console.log(res); this.btn_Touch = true; @@ -488,4 +479,27 @@ export default class NewClass extends cc.Component { onDestroy() { } + + iosOldPay(price, productId) { + // 旧版本ios支付 + let iosPayInfo = { + price: price, + payment_name: productId, + payment_count: 1, + } + this.iosPrice = price; + this.iosProductId = productId; + this.iosCount = 1; + console.log("准备跳客服回话:"); + console.log(this.iosProductId); + Utils.GoKEFu(iosPayInfo, (res) => { + if (res == "success") { + console.log("客服回话成功"); + } + else { + console.log("客服回话失败"); + this.closeLoad(); + } + }); + } } diff --git a/assets/action_bundle/script/NewbieGift.ts b/assets/action_bundle/script/NewbieGift.ts index 9326ad5..7943170 100644 --- a/assets/action_bundle/script/NewbieGift.ts +++ b/assets/action_bundle/script/NewbieGift.ts @@ -385,23 +385,9 @@ export default class NewbieGift extends cc.Component { // this.btn_Touch = true; this.openLoad(); this.btn_Touch = true; - let iosPayInfo = { - price: price, - payment_name: productId, - payment_count: 1, - } - this.iosPrice = price; - this.iosProductId = productId; - this.iosCount = 1; - Utils.GoKEFu(iosPayInfo, (res) => { - if (res == "success") { - console.log("客服回话成功"); - } - else { - console.log("客服回话失败"); - this.closeLoad(); - } - }); + + this.iosOldPay(price, productId); + } else { // MiniGameSdk.API.showToast("充值成功"); @@ -437,6 +423,12 @@ export default class NewbieGift extends cc.Component { return; } else if (res.err) { + console.log("错误原因:", res.errMsg); + if (res.errMsg && res.errMsg.indexOf("fail App Store") !== -1) { + console.log("走ios旧支付"); + this.iosOldPay(price, productId); + return; + } MiniGameSdk.API.showToast("充值失败"); //console.log(res); this.btn_Touch = true; @@ -574,5 +566,26 @@ export default class NewbieGift extends cc.Component { } + iosOldPay(price, productId) { + // 旧版本ios支付 + let iosPayInfo = { + price: price, + payment_name: productId, + payment_count: 1, + } + this.iosPrice = price; + this.iosProductId = productId; + this.iosCount = 1; + Utils.GoKEFu(iosPayInfo, (res) => { + if (res == "success") { + console.log("客服回话成功"); + } + else { + console.log("客服回话失败"); + this.closeLoad(); + } + }); + } + } diff --git a/assets/shop/script/passCheck.ts b/assets/shop/script/passCheck.ts index 677e022..1239cea 100644 --- a/assets/shop/script/passCheck.ts +++ b/assets/shop/script/passCheck.ts @@ -575,25 +575,7 @@ export default class passCheck extends cc.Component { // this.btn_Touch = true; this.openLoad(); this.btn_Touch = true; - let iosPayInfo = { - price: price, - payment_name: productId, - payment_count: 1, - } - this.iosPrice = price; - this.iosProductId = productId; - this.iosCount = 1; - console.log("准备跳客服回话:"); - console.log(this.iosProductId); - Utils.GoKEFu(iosPayInfo, (res) => { - if (res == "success") { - console.log("客服回话成功"); - } - else { - console.log("客服回话失败"); - this.closeLoad(); - } - }); + this.iosOldPay(price, productId); } else { this.openLoad(); @@ -615,6 +597,12 @@ export default class passCheck extends cc.Component { return; } else if (res.err) { + console.log("错误原因:", res.errMsg); + if (res.errMsg && res.errMsg.indexOf("fail App Store") !== -1) { + console.log("走ios旧支付"); + this.iosOldPay(price, productId); + return; + } MiniGameSdk.API.showToast("充值失败"); //console.log(res); this.btn_Touch = true; @@ -792,4 +780,27 @@ export default class passCheck extends cc.Component { } + iosOldPay(price, productId) { + // 旧版本ios支付 + let iosPayInfo = { + price: price, + payment_name: productId, + payment_count: 1, + } + this.iosPrice = price; + this.iosProductId = productId; + this.iosCount = 1; + console.log("准备跳客服回话:"); + console.log(this.iosProductId); + Utils.GoKEFu(iosPayInfo, (res) => { + if (res == "success") { + console.log("客服回话成功"); + } + else { + console.log("客服回话失败"); + this.closeLoad(); + } + }); + } + } diff --git a/assets/shop/script/shop.ts b/assets/shop/script/shop.ts index e0cf188..80d34cd 100644 --- a/assets/shop/script/shop.ts +++ b/assets/shop/script/shop.ts @@ -576,26 +576,8 @@ export default class NewClass extends cc.Component { this.openLoad(); this.btn_Touch = true; - // 旧版本ios支付 - let iosPayInfo = { - price: price, - payment_name: productId, - payment_count: 1, - } - this.iosPrice = price; - this.iosProductId = productId; - this.iosCount = 1; - console.log("准备跳客服回话:"); - console.log(this.iosProductId); - Utils.GoKEFu(iosPayInfo, (res) => { - if (res == "success") { - console.log("客服回话成功"); - } - else { - console.log("客服回话失败"); - this.closeLoad(); - } - }); + this.iosOldPay(price, productId); + } else { // MiniGameSdk.API.showToast("充值成功"); @@ -612,9 +594,9 @@ export default class NewClass extends cc.Component { this.openLoad(); this.btn_Touch = true; - // console.log("7.14_____________________", "调用充值接口", systemType); + console.log("6.26_____________________", "调用充值接口", systemType); Utils.buyProp(id, count, price, systemType, productId, (res) => { - //console.log("获得充值结果", res); + console.log("获得充值结果_____", res); if (res == null) { MiniGameSdk.API.showToast("充值失败"); this.btn_Touch = true; @@ -631,8 +613,14 @@ export default class NewClass extends cc.Component { return; } else if (res.err) { + console.log("错误原因:", res.errMsg); + if (res.errMsg && res.errMsg.indexOf("fail App Store") !== -1) { + console.log("走ios旧支付"); + this.iosOldPay(price, productId); + return; + } MiniGameSdk.API.showToast("充值失败"); - //console.log(res); + console.log(res); this.btn_Touch = true; let name = "支付拉起失败"; if (res.errCode == -2) { @@ -880,5 +868,28 @@ export default class NewClass extends cc.Component { this.node.getChildByName("ConfirmBox").active = false; } + iosOldPay(price, productId) { + // 旧版本ios支付 + let iosPayInfo = { + price: price, + payment_name: productId, + payment_count: 1, + } + this.iosPrice = price; + this.iosProductId = productId; + this.iosCount = 1; + console.log("准备跳客服回话:"); + console.log(this.iosProductId); + Utils.GoKEFu(iosPayInfo, (res) => { + if (res == "success") { + console.log("客服回话成功"); + } + else { + console.log("客服回话失败"); + this.closeLoad(); + } + }); + } + // update (dt) {} }