1
This commit is contained in:
parent
6e7fde9ff6
commit
2317ff114b
5
app.js
5
app.js
@ -70,6 +70,7 @@ App({
|
||||
},
|
||||
getLogin() {
|
||||
const _this = this;
|
||||
wx.setStorageSync("getIosPay", false);
|
||||
wx.login({
|
||||
success: async function (res) {
|
||||
if (!res.code) {
|
||||
@ -84,6 +85,10 @@ App({
|
||||
const request = await login({ code: res.code });
|
||||
wx.setStorageSync("token", request.uid);
|
||||
const userInfo = await getUser();
|
||||
setTimeout(() => {
|
||||
wx.setStorageSync("getIosPay", true);
|
||||
}, userInfo.time * 60000);
|
||||
console.log(userInfo);
|
||||
_this.globalData.userInfo = userInfo;
|
||||
if (_this.userInfoCallback) {
|
||||
_this.userInfoCallback(userInfo);
|
||||
|
@ -186,7 +186,7 @@ Component({
|
||||
const res = await bs({
|
||||
showLoading: false,
|
||||
});
|
||||
const platform = wx.getDeviceInfo().system;
|
||||
const platform = wx.getDeviceInfo().platform;
|
||||
this.setData({
|
||||
list,
|
||||
backInfo,
|
||||
@ -195,8 +195,11 @@ Component({
|
||||
iosStatus: res.status,
|
||||
payShow: res.status === 1 && platform == "ios" ? false : true,
|
||||
});
|
||||
console.log(platform);
|
||||
if (res.status === 1 && platform === "ios") this.closePay();
|
||||
if (
|
||||
(res.status === 1 || !wx.getStorageSync("getIosPay")) &&
|
||||
platform === "ios"
|
||||
)
|
||||
this.closePay();
|
||||
},
|
||||
|
||||
openAgreement() {
|
||||
@ -216,8 +219,11 @@ Component({
|
||||
async pay(event) {
|
||||
const item = event.currentTarget.dataset.item;
|
||||
const bsPayItem = await iosPayment();
|
||||
const platform = this.platform;
|
||||
if (platform === "ios" && bsPayItem.status === 1) {
|
||||
const platform = this.data.platform;
|
||||
if (
|
||||
platform === "ios" &&
|
||||
(bsPayItem.status === 1 || !wx.getStorageSync("getIosPay"))
|
||||
) {
|
||||
wx.showToast({
|
||||
title: "暂不支持IOS支付",
|
||||
icon: "none",
|
||||
|
@ -47,7 +47,10 @@ Page({
|
||||
const item = event.currentTarget.dataset.item;
|
||||
const bsPayItem = await iosPayment();
|
||||
const platform = wx.getSystemInfoSync().platform;
|
||||
if (platform === "ios" && bsPayItem.status === 1) {
|
||||
if (
|
||||
platform === "ios" &&
|
||||
(bsPayItem.status === 1 || !wx.getStorageSync("getIosPay"))
|
||||
) {
|
||||
wx.showToast({
|
||||
title: "暂不支持IOS支付",
|
||||
icon: "none",
|
||||
|
Loading…
x
Reference in New Issue
Block a user