更新优化

This commit is contained in:
魏啾
2024-06-14 18:30:19 +08:00
parent 139e4039a5
commit cba4e6065e
20 changed files with 94 additions and 258 deletions

View File

@@ -35,8 +35,6 @@
}
},
onLoad(e) {
console.log(e, '调试2')
this.shopId = e.shopId
if (e.type == 'list') { //从列表进来的
this.paygetShopByMember(e.shopId)
@@ -51,13 +49,13 @@
page: 1,
pageSize: 10,
userId: uni.cache.get('userInfo').id,
shopId: w
shopId: this.shopId
})
this.userInfo = res.data.list[0]
},
async paygetActive(shopid) {
async paygetActive() {
let res = await this.api.paygetActive({
shopId: shopid,
shopId: this.shopId,
page: 1,
pageSize: 10
})
@@ -80,7 +78,11 @@
shopId: this.shopId, // 判断显示哪家的作品,
amount: this.amount // 判断显示哪家的作品,
})
if (res) {
if (res.code == 0) {
uni.showLoading({
title: '加载中',
mask: true
})
// #ifdef MP-WEIXIN
uni.requestPayment({
provider: 'wxpay', //支付类型-固定值
@@ -94,11 +96,16 @@
uni.showToast({
title: "支付成功"
})
uni.hideLoading()
setTimeout(res => {
uni.navigateBack()
}, 500)
},
fail: (res) => {
uni.hideLoading()
}
});
uni.hideLoading()
// #endif
}
},