Feat: 折扣对接
This commit is contained in:
@@ -73,6 +73,7 @@
|
|||||||
:style="giftBg ? 'background: url(' + giftBg + ') no-repeat center/cover' : ''"
|
:style="giftBg ? 'background: url(' + giftBg + ') no-repeat center/cover' : ''"
|
||||||
:class="giftBg ? '' : 'v12-primary'"
|
:class="giftBg ? '' : 'v12-primary'"
|
||||||
>
|
>
|
||||||
|
<text v-if="storeInfo.discount > 0" class="v12-font-24 v12-yellow-text ll-text">平台补贴限时{{ storeInfo.discount }}%</text>
|
||||||
<view class="v12-font-28 v12-align-center" style="height: 74rpx; opacity: 0;">
|
<view class="v12-font-28 v12-align-center" style="height: 74rpx; opacity: 0;">
|
||||||
<image class="gift-img" :src="webUrl + '/orderIcon/gift.png'" mode="widthFix" ></image>
|
<image class="gift-img" :src="webUrl + '/orderIcon/gift.png'" mode="widthFix" ></image>
|
||||||
支持礼包赠送
|
支持礼包赠送
|
||||||
@@ -1457,7 +1458,8 @@ export default {
|
|||||||
path: "/pages/order/OrderSubmission/index",
|
path: "/pages/order/OrderSubmission/index",
|
||||||
query: {
|
query: {
|
||||||
id: res.data.cartId,
|
id: res.data.cartId,
|
||||||
couponId: that.couponId // 优惠券ID
|
couponId: that.couponId, // 优惠券ID
|
||||||
|
discount: that.storeInfo.discount,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
@@ -1465,7 +1467,7 @@ export default {
|
|||||||
if(news === 2) {
|
if(news === 2) {
|
||||||
const coupId = that.couponId ? that.couponId : (that.couponList.usable[0] && that.couponList.usable[0].id || '')
|
const coupId = that.couponId ? that.couponId : (that.couponList.usable[0] && that.couponList.usable[0].id || '')
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pkg_user/views/gift/gift?cartId=' + res.data.cartId + '&couponId=' + coupId
|
url: '/pkg_user/views/gift/gift?cartId=' + res.data.cartId + '&couponId=' + coupId + (that.storeInfo.discount ? '&discount=' + that.storeInfo.discount : '')
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if(news === 0) {
|
if(news === 0) {
|
||||||
@@ -2181,4 +2183,8 @@ export default {
|
|||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
.ll-text{
|
||||||
|
margin-left: 280rpx;
|
||||||
|
word-break: keep-all;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -95,6 +95,13 @@
|
|||||||
<u-switch v-model="canTransfer" ></u-switch>
|
<u-switch v-model="canTransfer" ></u-switch>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="price-wrap">
|
||||||
|
<view class="v12-font-28 v12-dark-text v12-font-bold">价格明细</view>
|
||||||
|
<view class="v12-justify-between v12-align-center v12-font-28 v12-mt-1">
|
||||||
|
<view>商品总价:</view>
|
||||||
|
<view>1224</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<button v-if="isPayOk" open-type="share" class="share-btn" >
|
<button v-if="isPayOk" open-type="share" class="share-btn" >
|
||||||
<view class="v12-font-28 v12-primary-text v12-align-center">
|
<view class="v12-font-28 v12-primary-text v12-align-center">
|
||||||
<u-icon :name="webUrl + '/icon/gift-primary.png'" size="18"></u-icon>
|
<u-icon :name="webUrl + '/icon/gift-primary.png'" size="18"></u-icon>
|
||||||
@@ -181,12 +188,14 @@ export default {
|
|||||||
giftKey: '',
|
giftKey: '',
|
||||||
payPrice: 0,
|
payPrice: 0,
|
||||||
orderId: '',
|
orderId: '',
|
||||||
defaultIndex:0
|
defaultIndex:0,
|
||||||
|
discount: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(opts) {
|
onLoad(opts) {
|
||||||
this.cartId = opts.cartId
|
this.cartId = opts.cartId
|
||||||
this.couponId = opts.couponId
|
this.couponId = opts.couponId
|
||||||
|
this.discount = opts.discount
|
||||||
this.getGift()
|
this.getGift()
|
||||||
},
|
},
|
||||||
computed: mapGetters(["userInfo"]),
|
computed: mapGetters(["userInfo"]),
|
||||||
@@ -248,7 +257,10 @@ export default {
|
|||||||
const params = {
|
const params = {
|
||||||
cartId: this.cartId,
|
cartId: this.cartId,
|
||||||
couponId: this.couponId,
|
couponId: this.couponId,
|
||||||
cartNum : num,
|
cartNum : num
|
||||||
|
}
|
||||||
|
if(this.discount) {
|
||||||
|
params.discount = this.discount
|
||||||
}
|
}
|
||||||
getGiftCardSendOrderAmount(this.orderKey, params).then(res => {
|
getGiftCardSendOrderAmount(this.orderKey, params).then(res => {
|
||||||
this.payPrice = res.data.result.payPrice
|
this.payPrice = res.data.result.payPrice
|
||||||
@@ -553,4 +565,13 @@ export default {
|
|||||||
.share-btn::after {
|
.share-btn::after {
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
.price-wrap{
|
||||||
|
width: 100%;
|
||||||
|
height: 320rpx;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
margin-top: 30rpx;
|
||||||
|
padding: 20rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user