fix: 跳转参数修改

This commit is contained in:
whitechiina 2025-04-15 14:41:08 +08:00
parent 1d52f29c89
commit 567b1e9d81
5 changed files with 42 additions and 24 deletions

View File

@ -37,21 +37,19 @@
<view class="num" v-else-if="!item['original_price'] && BrandInfor['brand_id'] == 10">
{{RetainDecimalPoint(item['adj_pay'] * (item['num']?item['num']:item['amount']))}}
</view> -->
<view class="num" v-if="item['original_price']">
{{item['pay_price']}}
<view class="num" v-if="item.original_price">
{{item.pay_price}}
</view>
<view class="num" v-else-if="!item['original_price'] && (BrandInfor['brand_id'] == 13 || BrandInfor['brand_id'] == 1)">
<view class="now">{{item['bt_price'] * (item['num']?item['num']:item['amount'])}}</view>
<view class="last">{{item['pay_price'] * (item['num']?item['num']:item['amount'])}}</view>
<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.amount))}}</view>
<view class="last">{{(item.pay_price * (item.num || item.amount))}}</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">
<text>{{item['bt_price'] * (item['num']?item['num']:item['amount'])}}</text>
<text v-if="item['add_price']">(+{{item['add_price']}})</text>
<text>{{ toFixed((item.bt_price + item.add_price) * (item.num || item.amount)) }}</text>
</view>
<view class="last">
<text>{{item['adj_pay'] * (item['num']?item['num']:item['amount'])}}</text>
<text v-if="item['add_price']">(+{{item['add_price']}})</text>
<text>{{item.adj_pay * (item.num ? item.num : item.amount).toFixed(2)}}</text>
</view>
</view>
</view>
@ -75,6 +73,12 @@
return {
};
},
methods: {
toFixed(value) {
if (!value) return '0.00'
return parseFloat(value).toFixed(2)
}
}
}
</script>
@ -152,7 +156,7 @@
.quantity {
flex: 1;
display: flex;
justify-content: space-between;
justify-content: end;
font-size: 30rpx;
color: #3A6FE7;
.num {

View File

@ -1,5 +1,5 @@
{
"name" : "消费补贴卡",
"name" : "在线点餐",
"appid" : "__UNI__A669A40",
"description" : "",
"versionName" : "1.0.1",

View File

@ -87,8 +87,8 @@
<view class="Commodity Commodity-Item" @click="isCoin()">
<view class="discount" style="width: 100%; display: flex; justify-content: space-between">
<view>
<text lines="1" class="quantity">抵用券</text>
<text lines="1" class="amount">({{ computedTotal.coin_balance }} )</text>
<text lines="1" class="quantity">抵用券</text>
<text lines="1" class="amount">({{ computedTotal.coin_balance? computedTotal.coin_balance:'0.00' }} )</text>
</view>
<view class="Checkbox" :style="{'--aftercolor':Brand()['ThemeColor']}" :class="{'active-Checkbox': use_coin? true : false}"></view>
</view>
@ -166,15 +166,15 @@
<view class="item flex">
<text>抵用券抵扣</text>
<text class="blod">
<text v-if="computedTotal.used_coin">-</text>
<text>{{computedTotal.used_coin}}</text>
<text v-if="ZeroData.used_coin">-</text>
<text>{{ZeroData.used_coin}}</text>
</text>
</view>
<view class="item flex">
<text>余额抵扣</text>
<text class="blod">
<text v-if="computedTotal.used_broker">-</text>
<text>{{computedTotal.used_broker}}</text>
<text v-if="ZeroData.used_broker">-</text>
<text>{{ZeroData.used_broker}}</text>
</text>
</view>
<view class="know">
@ -182,12 +182,12 @@
<view class="blod">
实付
</view>
<view class="point" v-if="computedTotal.integral > 0">
获得{{computedTotal.integral}} 积分
<view class="point" v-if="ZeroData.integral > 0">
获得{{ZeroData.integral}} 积分
</view>
</view>
<view class="right blod">
{{computedTotal.real_pay_price}}
{{realPayment}}
</view>
</view>
</view>
@ -348,8 +348,10 @@
//
item['pay_price'] = item['product_price'];
//
item['bt_price'] = item['bt_price'];
// if (this['BrandInfor']['brand_id'] == 10) {
// //
// }
item['bt_price'] = Number(item['bt_price']);
products.push(item);
this['shoptotalnum'] += item['num'];
@ -397,7 +399,7 @@
}
// 0
if (this.computedTotal.real_pay_price == 0) {
if (this.realPayment == 0) {
this['zeroshow'] = true
} else {
this['show'] = true;
@ -452,6 +454,13 @@
shop: this.BrandInfor.brand_name,
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,
HeadersData: this.GetShopInfor,
shopInfo: from.products,

View File

@ -28,6 +28,7 @@ class Payment {
shopInfo,
computedTotal,
GetShopInfor,
amountInfo,
return_url,
payData,
HeadersData,
@ -56,6 +57,7 @@ class Payment {
data: OrderData,
shopInfo: shopInfo,
GetShopInfor: GetShopInfor,
amountInfo: amountInfo,
token: store.getters.GetToken,
payData: data.payData,
HeadersData: data.HeadersData

View File

@ -311,7 +311,10 @@ const restaurantmixins = {
// 佣金计算
computedOfflineOrder(this.FormInfor).then(res => {
this.loading = false;
// 0元购弹窗数据
this.realPayment = res.data.real_pay_price;
this.ZeroData = res.data;
/*
* 仅赋值一次