Fix:5397 【商城小程序】商品链接,连续快速点击“送给朋友”,重复弹出多个送礼页面
(cherry picked from commit 6d963a5bc0)
This commit is contained in:
@@ -51,6 +51,7 @@ export const chatMixinsV2 = {
|
||||
audioPlayId: '',
|
||||
showGiftBtn: false,
|
||||
buyLoading: false,
|
||||
buyActionLock: false,
|
||||
exceptionConfig: {
|
||||
model_exception: '您提的问题未能理解,云灵思想跑偏啦,重新整理一下问题或者重新提问,让云灵再试试!',
|
||||
voice_exception: ''
|
||||
@@ -533,6 +534,10 @@ export const chatMixinsV2 = {
|
||||
this.productItemBuyNowOrGiftBuy(item, 2)
|
||||
},
|
||||
productItemBuyNowOrGiftBuy(item, BuyNowOrGiftBuyType) {
|
||||
if (this.buyActionLock) {
|
||||
return
|
||||
}
|
||||
this.buyActionLock = true
|
||||
this.audioStopHandle()
|
||||
this.cart_num = 1
|
||||
this.m_id = item.id
|
||||
@@ -540,6 +545,7 @@ export const chatMixinsV2 = {
|
||||
const { data } = res
|
||||
this.storeInfo = {...data.storeInfo}
|
||||
if(data.storeInfo.stock === 0) {
|
||||
this.buyActionLock = false
|
||||
uni.showToast({
|
||||
title: "产品库存不足,请选择其他商品",
|
||||
icon: "none",
|
||||
@@ -577,6 +583,14 @@ export const chatMixinsV2 = {
|
||||
return
|
||||
}
|
||||
this.attr.cartAttr = !this.isOpen ? true : false
|
||||
this.buyActionLock = false
|
||||
}).catch(error => {
|
||||
this.buyActionLock = false
|
||||
uni.showToast({
|
||||
title: error.msg || '操作失败,请稍后重试',
|
||||
icon: "none",
|
||||
duration: 3000
|
||||
})
|
||||
})
|
||||
},
|
||||
buyNowOrGiftBuyReq(type) {
|
||||
@@ -617,6 +631,7 @@ export const chatMixinsV2 = {
|
||||
})
|
||||
}).finally(() => {
|
||||
_this.buyLoading = false
|
||||
_this.buyActionLock = false
|
||||
})
|
||||
},
|
||||
closeAttrWindow() {
|
||||
|
||||
Reference in New Issue
Block a user