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