Fix:5397 【商城小程序】商品链接,连续快速点击“送给朋友”,重复弹出多个送礼页面
(cherry picked from commit 6d963a5bc0)
This commit is contained in:
@@ -655,7 +655,8 @@ export default {
|
||||
pageKeyId: '',
|
||||
couponListLimit2ToShow: [],
|
||||
qualifications: [],
|
||||
couponId: null
|
||||
couponId: null,
|
||||
submitActionLock: false
|
||||
}
|
||||
},
|
||||
computed: mapGetters(['isLogin', 'location', 'userInfo']),
|
||||
@@ -821,6 +822,7 @@ export default {
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.submitActionLock = false
|
||||
this.getMapData()
|
||||
getGiftCardSendBackground().then(res => {
|
||||
if (res.status === 200) {
|
||||
@@ -1500,6 +1502,10 @@ export default {
|
||||
q.drawActivityId = Number(this.activityId || 0)
|
||||
break
|
||||
}
|
||||
if (that.submitActionLock) {
|
||||
return
|
||||
}
|
||||
that.submitActionLock = true
|
||||
postCartAdd(q).then(function (res) {
|
||||
that.isOpen = false
|
||||
that.attr.cartAttr = false
|
||||
@@ -1511,6 +1517,9 @@ export default {
|
||||
discount: that.storeInfo.discount,
|
||||
}
|
||||
})
|
||||
setTimeout(() => {
|
||||
that.submitActionLock = false
|
||||
}, 1500)
|
||||
return
|
||||
}
|
||||
if(news === 2) {
|
||||
@@ -1527,8 +1536,12 @@ export default {
|
||||
// + '&couponId=' + coupId
|
||||
url: giftUrl
|
||||
})
|
||||
setTimeout(() => {
|
||||
that.submitActionLock = false
|
||||
}, 1500)
|
||||
}
|
||||
if(news === 0) {
|
||||
that.submitActionLock = false
|
||||
uni.showToast({
|
||||
title: "添加购物车成功",
|
||||
icon: "success",
|
||||
@@ -1541,6 +1554,7 @@ export default {
|
||||
}
|
||||
}).catch(error => {
|
||||
that.isOpen = false;
|
||||
that.submitActionLock = false
|
||||
uni.showToast({
|
||||
title: error.msg,
|
||||
icon: "none",
|
||||
|
||||
Reference in New Issue
Block a user