Fix:3268 【礼品功能】进入送礼页面,商品价格会变成0
This commit is contained in:
@@ -43,9 +43,10 @@
|
||||
<view class="v12-justify-between">
|
||||
<view>
|
||||
<text class="v12-primary-text v12-font-bold v12-font-22">¥</text>
|
||||
<text class="v12-primary-text v12-font-bold v12-font-30">{{ goodsInfo.productInfo.otPrice }}</text>
|
||||
<text class="v12-primary-text v12-font-bold v12-font-30">{{ payPrice }}</text>
|
||||
</view>
|
||||
<view>
|
||||
|
||||
<u-number-box
|
||||
v-if="!isPayOk"
|
||||
v-model="goodsInfo.cartNum"
|
||||
@@ -54,6 +55,7 @@
|
||||
disabledInput
|
||||
iconStyle="color: #fff"
|
||||
class="num-step"
|
||||
@change="numberChange"
|
||||
>
|
||||
<template v-slot:minus>
|
||||
<view class="v12-minus-btn v12-font-bold flex jc-center ai-center">
|
||||
@@ -69,6 +71,7 @@
|
||||
</view>
|
||||
</template>
|
||||
</u-number-box>
|
||||
<view v-else> x{{ goodsInfo['cartNum'] }} </view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -113,7 +116,7 @@
|
||||
<passkeyborad
|
||||
ref='payPwdPop'
|
||||
showMoney
|
||||
:money="goodsInfo.productInfo.otPrice"
|
||||
:money="payPrice"
|
||||
:show="isShowPayPwdPop"
|
||||
@close="isShowPayPwdPop = false"
|
||||
@finish="pwdPopFinish"
|
||||
@@ -128,7 +131,7 @@
|
||||
|
||||
<script>
|
||||
import passkeyborad from '@/components/yzc-paykeyboard/yzc-paykeyboard'
|
||||
import { getGiftCardSendOrderConfirm, getGiftCardSendOrder } from '@/api/gift'
|
||||
import { getGiftCardSendOrderConfirm, getGiftCardSendOrder, getGiftCardSendOrderAmount } from '@/api/gift'
|
||||
import {mapGetters} from "vuex";
|
||||
import giftTips from './components/giftTips.vue'
|
||||
import CoverPicker from './components/CoverPicker.vue'
|
||||
@@ -165,6 +168,7 @@ export default {
|
||||
payType: '',
|
||||
isPayOk: false,
|
||||
giftKey: '',
|
||||
payPrice: 0
|
||||
}
|
||||
},
|
||||
onLoad(opts) {
|
||||
@@ -181,6 +185,20 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
numberChange(e) {
|
||||
this.computedPrice(e.value)
|
||||
},
|
||||
computedPrice(num) {
|
||||
const params = {
|
||||
cartId: this.cartId,
|
||||
couponId: this.couponId,
|
||||
cartNum : num,
|
||||
}
|
||||
getGiftCardSendOrderAmount(this.orderKey, params).then(res => {
|
||||
this.payPrice = res.data.result.payPrice
|
||||
this.$forceUpdate()
|
||||
})
|
||||
},
|
||||
pwdPopFinish(payPwd) {
|
||||
this.payPassword = payPwd;
|
||||
this.confirmGift(true);
|
||||
@@ -207,6 +225,10 @@ export default {
|
||||
this.giftNotice = res.data.giftCardGiftNotice
|
||||
this.orderKey = res.data.orderKey
|
||||
this.goodsInfo = res.data.cartInfo[0]
|
||||
this.templateId = res.data.specialGiftCardTemplate.id
|
||||
this.selectedCover = res.data.specialGiftCardTemplate.cover
|
||||
this.giftImage = res.data.specialGiftCardTemplate.image
|
||||
this.computedPrice(this.goodsInfo.cartNum)
|
||||
})
|
||||
},
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user