优惠券相关修改更新

This commit is contained in:
GaoHao
2024-11-18 14:18:10 +08:00
parent 2808dec925
commit c679b60cb7
17 changed files with 760 additions and 109 deletions

View File

@@ -372,8 +372,8 @@
title: '加载中',
mask: true
})
// #ifdef MP-WEIXIN
uni.requestPayment({
// #ifdef MP-WEIXIN
provider: 'wxpay', //支付类型-固定值
partnerid: res.data.appId, // 微信支付商户号
timeStamp: res.data.timeStamp, // 时间戳(单位:秒)
@@ -381,12 +381,18 @@
package: res.data.package, // 固定值
signType: res.data.signType, //固定值
paySign: res.data.paySign, //签名
// #endif
// #ifdef MP-ALIPAY
provider: 'alipay', //支付类型-固定值
orderInfo: res.data.tradeNo, // 微信支付商户号
// #endif
success: (res) => {
uni.showToast({
title: "支付成功"
})
uni.hideLoading()
let pages = getCurrentPages()
// #ifdef MP-WEIXIN
uni.requestSubscribeMessage({
tmplIds:["AV-KybUHaK3KtFVLqpy6PHccHBS7XeX__mOM4RbufnQ"],
complete() {
@@ -406,6 +412,22 @@
},
})
// #endif
// #ifdef MP-ALIPAY
if ( _this.type && _this.type == "topUpActivity") {
uni.pro.navigateBack()
} else {
if ( pages.length > 1) {
_this.shopInfo()
} else {
setTimeout(res => {
uni.switchTab({
url: '/pages/index/index'
})
}, 500)
}
}
// #endif
@@ -415,7 +437,6 @@
}
});
uni.hideLoading()
// #endif
}
},