拼团修复
This commit is contained in:
@@ -182,6 +182,16 @@
|
||||
return
|
||||
}
|
||||
if (step === '+') {
|
||||
if(item.limitBuyNum==-10086){
|
||||
number.value++
|
||||
return
|
||||
}
|
||||
if(number.value>=item.limitBuyNum){
|
||||
return uni.showToast({
|
||||
title:'最多可购买'+item.limitBuyNum+'份',
|
||||
icon:'none'
|
||||
})
|
||||
}
|
||||
number.value++
|
||||
return
|
||||
}
|
||||
@@ -234,6 +244,15 @@
|
||||
}
|
||||
|
||||
async function payExchange() {
|
||||
uni.setStorageSync('group_buying_order', {
|
||||
...item,
|
||||
number: number.value,
|
||||
groupOrderNo: popupData.item ? popupData.item.groupOrderNo : '',
|
||||
})
|
||||
uni.navigateTo({
|
||||
url: '/groupBuying/confirm-order/confirm-order'
|
||||
})
|
||||
return
|
||||
await dingyue();
|
||||
uni.showLoading({
|
||||
title: '支付中……'
|
||||
@@ -244,8 +263,7 @@
|
||||
Api.exchange({
|
||||
paramId: item.id,
|
||||
shopId: item.shopId,
|
||||
number: 1,
|
||||
price: item.extraPrice,
|
||||
number: number.value,
|
||||
groupOrderNo: popupData.item ? popupData.item.groupOrderNo : '',
|
||||
openId
|
||||
}).then(orderRes => {
|
||||
@@ -255,7 +273,7 @@
|
||||
|
||||
if (res) {
|
||||
uni.redirectTo({
|
||||
url: '/groupBuying/success/index?detailId=' + orderRes.goodsRecord
|
||||
url: '/groupBuying/success/index?detailId=' + orderRes.record
|
||||
.id
|
||||
})
|
||||
} else {
|
||||
@@ -400,6 +418,19 @@
|
||||
|
||||
|
||||
onLoad(init)
|
||||
// #ifdef MP-WEIXIN
|
||||
uni.showShareMenu()
|
||||
// #endif
|
||||
onShareAppMessage(() => {
|
||||
|
||||
const query = `wareId=${item.wareId}&shopId=${item.shopId}`
|
||||
return wxShare({
|
||||
title: item.wareJson.wareName,
|
||||
imageUrl: item.goodsImg,
|
||||
path: '/groupBuying/detail/index' + '?' + query,
|
||||
query,
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
Reference in New Issue
Block a user