From 6e7fde9ff638f7f5f209f945a1a51658647bdb0a Mon Sep 17 00:00:00 2001
From: Phoenix <1141988085@qq.com>
Date: Wed, 15 Jan 2025 15:51:20 +0800
Subject: [PATCH] hot-fix
---
components/charge-dialog/index.js | 13 ++++++++-----
components/charge-dialog/index.wxml | 22 +++++++++++++++-------
2 files changed, 23 insertions(+), 12 deletions(-)
diff --git a/components/charge-dialog/index.js b/components/charge-dialog/index.js
index 0d29121..00b11d7 100644
--- a/components/charge-dialog/index.js
+++ b/components/charge-dialog/index.js
@@ -60,6 +60,7 @@ Component({
countdownInterval: null,
payShow: false,
backInfo: null,
+ platform: null,
},
lifetimes: {
attached() {
@@ -185,14 +186,17 @@ Component({
const res = await bs({
showLoading: false,
});
+ const platform = wx.getDeviceInfo().system;
this.setData({
list,
backInfo,
userInfo,
- platform: wx.getSystemInfoSync().platform,
+ platform,
iosStatus: res.status,
- payShow: true,
+ payShow: res.status === 1 && platform == "ios" ? false : true,
});
+ console.log(platform);
+ if (res.status === 1 && platform === "ios") this.closePay();
},
openAgreement() {
@@ -210,10 +214,9 @@ Component({
// 支付功能
async pay(event) {
- console.log(1);
const item = event.currentTarget.dataset.item;
const bsPayItem = await iosPayment();
- const platform = wx.getSystemInfoSync().platform;
+ const platform = this.platform;
if (platform === "ios" && bsPayItem.status === 1) {
wx.showToast({
title: "暂不支持IOS支付",
@@ -267,7 +270,7 @@ Component({
});
return;
} else if (payResult.Paymentplan === 3) {
- const SDKVersion = wx.getSystemInfoSync().SDKVersion;
+ const SDKVersion = wx.getAppBaseInfo().SDKVersion;
if (
this.compareVersion(SDKVersion, "2.19.2") >= 0 ||
wx.canIUse("requestVirtualPayment")
diff --git a/components/charge-dialog/index.wxml b/components/charge-dialog/index.wxml
index e594219..1ac3595 100644
--- a/components/charge-dialog/index.wxml
+++ b/components/charge-dialog/index.wxml
@@ -8,7 +8,8 @@
{{countdown}}s后自动广告解锁
-
+
@@ -30,7 +31,7 @@
-
+
我的K币:
@@ -66,8 +67,12 @@
-->
-
-
+
+
{{item.poster}}
@@ -79,10 +84,13 @@
-
-
+
+
- {{item.type===1?(item.giveegold?(item.egold+'+'+item.giveegold + 'K币'):item.egold + 'K币'):item.type===2?item.title:item.description}}
+ {{item.type===1?(item.giveegold?(item.egold+'+'+item.giveegold + 'K币'):item.egold +
+ 'K币'):item.type===2?item.title:item.description}}