diff --git a/src/pages/users/upgradeVIP2.wpy b/src/pages/users/upgradeVIP2.wpy index 6b8bb19..ffcb685 100644 --- a/src/pages/users/upgradeVIP2.wpy +++ b/src/pages/users/upgradeVIP2.wpy @@ -412,7 +412,7 @@ // } that.$post({url: url, data}).then(({code, data}) => { that.trade_no = data.trade_no - if (data.wx_pay.length == 0) { + if (data.length == 0) { that.$post({url: `${service.host}/order/${that.trade_no}/callback`}).then(({code, data}) => { that.cardCur_1 = 0 that.getUserData() @@ -420,7 +420,7 @@ that.$Toast_success('支付成功') }) } else { - let wxconfig = data.wx_pay.config + let wxconfig = data.config // wx.config(JSON.parse(response.data.data.order.wx_pay.js)); if (wxconfig.payment_debug) { return that.$post({url: `${service.host}/order/${that.trade_no}/callback`}).then(({code, data}) => { @@ -429,7 +429,7 @@ }) } wx.requestPayment({ - timeStamp: wxconfig.timestamp, // 支付签名时间戳,注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符 + timeStamp: wxconfig.timeStamp, // 支付签名时间戳,注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符 nonceStr: wxconfig.nonceStr, // 支付签名随机串,不长于 32 位 package: wxconfig.package, // 统一支付接口返回的prepay_id参数值,提交格式如:prepay_id=***) signType: wxconfig.signType, // 签名方式,默认为'SHA1',使用新版支付需传入'MD5'