fix: 跳转参数修改
This commit is contained in:
parent
1d52f29c89
commit
567b1e9d81
|
|
@ -37,21 +37,19 @@
|
||||||
<view class="num" v-else-if="!item['original_price'] && BrandInfor['brand_id'] == 10">
|
<view class="num" v-else-if="!item['original_price'] && BrandInfor['brand_id'] == 10">
|
||||||
¥{{RetainDecimalPoint(item['adj_pay'] * (item['num']?item['num']:item['amount']))}}
|
¥{{RetainDecimalPoint(item['adj_pay'] * (item['num']?item['num']:item['amount']))}}
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="num" v-if="item['original_price']">
|
<view class="num" v-if="item.original_price">
|
||||||
¥{{item['pay_price']}}
|
¥{{item.pay_price}}
|
||||||
</view>
|
</view>
|
||||||
<view class="num" v-else-if="!item['original_price'] && (BrandInfor['brand_id'] == 13 || BrandInfor['brand_id'] == 1)">
|
<view class="num" v-else-if="!item.original_price && (BrandInfor.brand_id == 13 || BrandInfor.brand_id == 1)" :style="{'color':Brand()['ThemeColor']}">
|
||||||
<view class="now">¥{{item['bt_price'] * (item['num']?item['num']:item['amount'])}}</view>
|
<view class="now">¥{{(item.bt_price * (item.num || item.amount))}}</view>
|
||||||
<view class="last">¥{{item['pay_price'] * (item['num']?item['num']:item['amount'])}}</view>
|
<view class="last">¥{{(item.pay_price * (item.num || item.amount))}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="num" v-else-if="!item['original_price'] && BrandInfor['brand_id'] == 10">
|
<view class="num" v-else-if="!item.original_price && BrandInfor.brand_id == 10" :style="{'color':Brand()['ThemeColor']}">
|
||||||
<view class="now">
|
<view class="now">
|
||||||
<text>¥{{item['bt_price'] * (item['num']?item['num']:item['amount'])}}</text>
|
<text>¥{{ toFixed((item.bt_price + item.add_price) * (item.num || item.amount)) }}</text>
|
||||||
<text v-if="item['add_price']">(+{{item['add_price']}})</text>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="last">
|
<view class="last">
|
||||||
<text>¥{{item['adj_pay'] * (item['num']?item['num']:item['amount'])}}</text>
|
<text>¥{{item.adj_pay * (item.num ? item.num : item.amount).toFixed(2)}}</text>
|
||||||
<text v-if="item['add_price']">(+{{item['add_price']}})</text>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -75,6 +73,12 @@
|
||||||
return {
|
return {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
toFixed(value) {
|
||||||
|
if (!value) return '0.00'
|
||||||
|
return parseFloat(value).toFixed(2)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -152,7 +156,7 @@
|
||||||
.quantity {
|
.quantity {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: end;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
color: #3A6FE7;
|
color: #3A6FE7;
|
||||||
.num {
|
.num {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"name" : "消费补贴卡",
|
"name" : "在线点餐",
|
||||||
"appid" : "__UNI__A669A40",
|
"appid" : "__UNI__A669A40",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.0.1",
|
"versionName" : "1.0.1",
|
||||||
|
|
|
||||||
|
|
@ -87,8 +87,8 @@
|
||||||
<view class="Commodity Commodity-Item" @click="isCoin()">
|
<view class="Commodity Commodity-Item" @click="isCoin()">
|
||||||
<view class="discount" style="width: 100%; display: flex; justify-content: space-between">
|
<view class="discount" style="width: 100%; display: flex; justify-content: space-between">
|
||||||
<view>
|
<view>
|
||||||
<text lines="1" class="quantity">抵用券</text>
|
<text lines="1" class="quantity">抵用券:</text>
|
||||||
<text lines="1" class="amount">(¥{{ computedTotal.coin_balance }} )</text>
|
<text lines="1" class="amount">(¥{{ computedTotal.coin_balance? computedTotal.coin_balance:'0.00' }} )</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="Checkbox" :style="{'--aftercolor':Brand()['ThemeColor']}" :class="{'active-Checkbox': use_coin? true : false}"></view>
|
<view class="Checkbox" :style="{'--aftercolor':Brand()['ThemeColor']}" :class="{'active-Checkbox': use_coin? true : false}"></view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -166,15 +166,15 @@
|
||||||
<view class="item flex">
|
<view class="item flex">
|
||||||
<text>抵用券抵扣</text>
|
<text>抵用券抵扣</text>
|
||||||
<text class="blod">
|
<text class="blod">
|
||||||
<text v-if="computedTotal.used_coin">-</text>
|
<text v-if="ZeroData.used_coin">-</text>
|
||||||
<text>{{computedTotal.used_coin}}</text>
|
<text>{{ZeroData.used_coin}}</text>
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="item flex">
|
<view class="item flex">
|
||||||
<text>余额抵扣</text>
|
<text>余额抵扣</text>
|
||||||
<text class="blod">
|
<text class="blod">
|
||||||
<text v-if="computedTotal.used_broker">-</text>
|
<text v-if="ZeroData.used_broker">-</text>
|
||||||
<text>{{computedTotal.used_broker}}</text>
|
<text>{{ZeroData.used_broker}}</text>
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="know">
|
<view class="know">
|
||||||
|
|
@ -182,12 +182,12 @@
|
||||||
<view class="blod">
|
<view class="blod">
|
||||||
实付
|
实付
|
||||||
</view>
|
</view>
|
||||||
<view class="point" v-if="computedTotal.integral > 0">
|
<view class="point" v-if="ZeroData.integral > 0">
|
||||||
获得:{{computedTotal.integral}} 积分
|
获得:{{ZeroData.integral}} 积分
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="right blod">
|
<view class="right blod">
|
||||||
¥{{computedTotal.real_pay_price}}
|
¥{{realPayment}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -348,8 +348,10 @@
|
||||||
// 修改数据格式
|
// 修改数据格式
|
||||||
item['pay_price'] = item['product_price'];
|
item['pay_price'] = item['product_price'];
|
||||||
|
|
||||||
// 星巴克计算补贴
|
// if (this['BrandInfor']['brand_id'] == 10) {
|
||||||
item['bt_price'] = item['bt_price'];
|
// // 星巴克计算补贴
|
||||||
|
// }
|
||||||
|
item['bt_price'] = Number(item['bt_price']);
|
||||||
|
|
||||||
products.push(item);
|
products.push(item);
|
||||||
this['shoptotalnum'] += item['num'];
|
this['shoptotalnum'] += item['num'];
|
||||||
|
|
@ -397,7 +399,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// 判断如果是0元购提示弹窗
|
// 判断如果是0元购提示弹窗
|
||||||
if (this.computedTotal.real_pay_price == 0) {
|
if (this.realPayment == 0) {
|
||||||
this['zeroshow'] = true
|
this['zeroshow'] = true
|
||||||
} else {
|
} else {
|
||||||
this['show'] = true;
|
this['show'] = true;
|
||||||
|
|
@ -452,6 +454,13 @@
|
||||||
shop: this.BrandInfor.brand_name,
|
shop: this.BrandInfor.brand_name,
|
||||||
id: this.BrandInfor.brand_id,
|
id: this.BrandInfor.brand_id,
|
||||||
},
|
},
|
||||||
|
amountInfo: {
|
||||||
|
actualpayment: this.YingPrice, // 支付总额
|
||||||
|
paymoney: this.realPayment, // 实际支付
|
||||||
|
coin_balance: this.ZeroData.used_coin, // 抵用券抵扣
|
||||||
|
broker_balance: this.ZeroData.used_broker // 余额抵扣
|
||||||
|
},
|
||||||
|
|
||||||
payData: from,
|
payData: from,
|
||||||
HeadersData: this.GetShopInfor,
|
HeadersData: this.GetShopInfor,
|
||||||
shopInfo: from.products,
|
shopInfo: from.products,
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@ class Payment {
|
||||||
shopInfo,
|
shopInfo,
|
||||||
computedTotal,
|
computedTotal,
|
||||||
GetShopInfor,
|
GetShopInfor,
|
||||||
|
amountInfo,
|
||||||
return_url,
|
return_url,
|
||||||
payData,
|
payData,
|
||||||
HeadersData,
|
HeadersData,
|
||||||
|
|
@ -56,6 +57,7 @@ class Payment {
|
||||||
data: OrderData,
|
data: OrderData,
|
||||||
shopInfo: shopInfo,
|
shopInfo: shopInfo,
|
||||||
GetShopInfor: GetShopInfor,
|
GetShopInfor: GetShopInfor,
|
||||||
|
amountInfo: amountInfo,
|
||||||
token: store.getters.GetToken,
|
token: store.getters.GetToken,
|
||||||
payData: data.payData,
|
payData: data.payData,
|
||||||
HeadersData: data.HeadersData
|
HeadersData: data.HeadersData
|
||||||
|
|
|
||||||
|
|
@ -311,7 +311,10 @@ const restaurantmixins = {
|
||||||
// 佣金计算
|
// 佣金计算
|
||||||
computedOfflineOrder(this.FormInfor).then(res => {
|
computedOfflineOrder(this.FormInfor).then(res => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
|
||||||
|
// 0元购弹窗数据
|
||||||
this.realPayment = res.data.real_pay_price;
|
this.realPayment = res.data.real_pay_price;
|
||||||
|
this.ZeroData = res.data;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 仅赋值一次
|
* 仅赋值一次
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue