Fix:5290 【商城小程序】商品设置为抽奖活动商品后,隐藏商品增减数量按钮,若是礼品,送礼界面隐藏一人领取所有礼品开关
This commit is contained in:
@@ -52,7 +52,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="cart v12-justify-between v12-align-center">
|
<view class="cart v12-justify-between v12-align-center">
|
||||||
<view class="titlev12-dark-text f12-font-32">购买数量</view>
|
<view class="titlev12-dark-text f12-font-32">购买数量</view>
|
||||||
<view class="carnum acea-row row-left">
|
<view v-if="!hideQuantityControls" class="carnum acea-row row-left">
|
||||||
<view style="border-radius: 40rpx 0rpx 0rpx 40rpx" class="cart-btn item reduce v12-font-36 v12-font-bold v12-white-text v12-dark1 v12-dark1-border" :class="cartNum <= 1 ? 'on' : ''" @click="CartNumDes">-</view>
|
<view style="border-radius: 40rpx 0rpx 0rpx 40rpx" class="cart-btn item reduce v12-font-36 v12-font-bold v12-white-text v12-dark1 v12-dark1-border" :class="cartNum <= 1 ? 'on' : ''" @click="CartNumDes">-</view>
|
||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
@@ -73,6 +73,7 @@
|
|||||||
@click="CartNumAdd"
|
@click="CartNumAdd"
|
||||||
>+</view>
|
>+</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view v-else class="v12-font-28 v12-dark-text">x1</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="v12-px-2 v12-mt-3" v-if="showOk">
|
<view class="v12-px-2 v12-mt-3" v-if="showOk">
|
||||||
<u-button
|
<u-button
|
||||||
@@ -139,6 +140,10 @@ export default {
|
|||||||
className: {
|
className: {
|
||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: ''
|
||||||
|
},
|
||||||
|
hideQuantityControls: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
|||||||
@@ -121,6 +121,7 @@
|
|||||||
ref="attrWindow"
|
ref="attrWindow"
|
||||||
:attr="attr"
|
:attr="attr"
|
||||||
:cartNum="cart_num"
|
:cartNum="cart_num"
|
||||||
|
:hideQuantityControls="true"
|
||||||
:showOk="true"
|
:showOk="true"
|
||||||
:okText="currentGoodsItem && Number(currentGoodsItem.isGiftCard) === 1 ? '送给朋友' : '立即下单'"
|
:okText="currentGoodsItem && Number(currentGoodsItem.isGiftCard) === 1 ? '送给朋友' : '立即下单'"
|
||||||
@changeFun="changeFun"
|
@changeFun="changeFun"
|
||||||
@@ -356,6 +357,10 @@ export default {
|
|||||||
openGoodsSku(item) {
|
openGoodsSku(item) {
|
||||||
if (!item.id) return
|
if (!item.id) return
|
||||||
this.currentGoodsItem = item
|
this.currentGoodsItem = item
|
||||||
|
this.cart_num = 1
|
||||||
|
if (this.attr && this.attr.productSelect) {
|
||||||
|
this.$set(this.attr.productSelect, 'cart_num', 1)
|
||||||
|
}
|
||||||
this.addToCart(item)
|
this.addToCart(item)
|
||||||
},
|
},
|
||||||
submitFromSku() {
|
submitFromSku() {
|
||||||
@@ -377,7 +382,7 @@ export default {
|
|||||||
}
|
}
|
||||||
const q = {
|
const q = {
|
||||||
productId: this.m_id,
|
productId: this.m_id,
|
||||||
cartNum: Number((this.attr.productSelect && this.attr.productSelect.cart_num) || currentSelect.cart_num || 1),
|
cartNum: 1,
|
||||||
new: 1,
|
new: 1,
|
||||||
uniqueId: currentSelect.unique || ''
|
uniqueId: currentSelect.unique || ''
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view v-if="!isGroupBuy">
|
<view v-if="!isGroupBuy">
|
||||||
<u-number-box
|
<u-number-box
|
||||||
v-if="showInput"
|
v-if="showInput && !isCountyLotteryGift"
|
||||||
v-model="goodsInfo.cartNum"
|
v-model="goodsInfo.cartNum"
|
||||||
:max="goodsInfo['productInfo']['attrInfo']['stock']"
|
:max="goodsInfo['productInfo']['attrInfo']['stock']"
|
||||||
integer
|
integer
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</u-number-box>
|
</u-number-box>
|
||||||
<view v-else> x{{ goodsInfo['cartNum'] }} </view>
|
<view v-else> x{{ isCountyLotteryGift ? 1 : goodsInfo['cartNum'] }} </view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
<u-switch v-model="isBlind" activeColor="#c52733"></u-switch>
|
<u-switch v-model="isBlind" activeColor="#c52733"></u-switch>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="swich-btn" v-if="!isPayOk && !isGroupBuy">
|
<view class="swich-btn" v-if="!isPayOk && !isGroupBuy && !isCountyLotteryGift">
|
||||||
<view class="v12-font-28 v12-dark-text">一人领取所有礼品</view>
|
<view class="v12-font-28 v12-dark-text">一人领取所有礼品</view>
|
||||||
<view>
|
<view>
|
||||||
<u-switch v-model="isOneRecipient" activeColor="#c52733"></u-switch>
|
<u-switch v-model="isOneRecipient" activeColor="#c52733"></u-switch>
|
||||||
@@ -417,6 +417,9 @@ export default {
|
|||||||
this.giftNotice = res.data.giftCardGiftNotice
|
this.giftNotice = res.data.giftCardGiftNotice
|
||||||
this.orderKey = res.data.orderKey
|
this.orderKey = res.data.orderKey
|
||||||
this.goodsInfo = goodsInfo
|
this.goodsInfo = goodsInfo
|
||||||
|
if (this.isCountyLotteryGift) {
|
||||||
|
this.$set(this.goodsInfo, 'cartNum', 1)
|
||||||
|
}
|
||||||
this.templateId = template.id
|
this.templateId = template.id
|
||||||
this.defaultIndex = this.coverList.findIndex(item => item.id === this.templateId)
|
this.defaultIndex = this.coverList.findIndex(item => item.id === this.templateId)
|
||||||
console.log(this.defaultIndex, 'defaultIndex');
|
console.log(this.defaultIndex, 'defaultIndex');
|
||||||
@@ -498,6 +501,9 @@ export default {
|
|||||||
this.giftNotice = res.data.giftCardGiftNotice
|
this.giftNotice = res.data.giftCardGiftNotice
|
||||||
this.orderKey = res.data.orderKey
|
this.orderKey = res.data.orderKey
|
||||||
this.goodsInfo = goodsInfo
|
this.goodsInfo = goodsInfo
|
||||||
|
if (this.isCountyLotteryGift) {
|
||||||
|
this.$set(this.goodsInfo, 'cartNum', 1)
|
||||||
|
}
|
||||||
this.templateId = template.id
|
this.templateId = template.id
|
||||||
this.selectedCover = template.cover
|
this.selectedCover = template.cover
|
||||||
this.giftImage = template.image
|
this.giftImage = template.image
|
||||||
@@ -506,7 +512,7 @@ export default {
|
|||||||
// if(!this.couponId) {
|
// if(!this.couponId) {
|
||||||
// this.couponId = res.data.couponList.usable[0] && res.data.couponList.usable[0].id || ''
|
// this.couponId = res.data.couponList.usable[0] && res.data.couponList.usable[0].id || ''
|
||||||
// }
|
// }
|
||||||
this.computedPrice(this.goodsInfo.cartNum)
|
this.computedPrice(this.isCountyLotteryGift ? 1 : this.goodsInfo.cartNum)
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
})
|
})
|
||||||
@@ -571,7 +577,7 @@ export default {
|
|||||||
from: 'routine',
|
from: 'routine',
|
||||||
cartId: this.cartId,
|
cartId: this.cartId,
|
||||||
couponId: this.couponId,
|
couponId: this.couponId,
|
||||||
recipientsNum: this.goodsInfo.cartNum,
|
recipientsNum: this.isCountyLotteryGift ? 1 : this.goodsInfo.cartNum,
|
||||||
templateId: this.templateId,
|
templateId: this.templateId,
|
||||||
message : this.message || '礼笺轻启,礼藏心意',
|
message : this.message || '礼笺轻启,礼藏心意',
|
||||||
cover: this.selectedCover,
|
cover: this.selectedCover,
|
||||||
|
|||||||
Reference in New Issue
Block a user