fix: 修改星巴克下单

This commit is contained in:
whitechiina 2025-04-14 11:50:33 +08:00
parent 72443535cf
commit 1d52f29c89
2 changed files with 63 additions and 46 deletions

View File

@ -45,8 +45,14 @@
<view class="last">{{item['pay_price'] * (item['num']?item['num']:item['amount'])}}</view> <view class="last">{{item['pay_price'] * (item['num']?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">
{{item['adj_pay'] * (item['num']?item['num']:item['amount'])}} <view class="now">
<text v-if="item['add_price']">(+{{item['add_price']}})</text> <text>{{item['bt_price'] * (item['num']?item['num']:item['amount'])}}</text>
<text v-if="item['add_price']">(+{{item['add_price']}})</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>
</view>
</view> </view>
</view> </view>
</view> </view>
@ -88,7 +94,7 @@
height: 120rpx; height: 120rpx;
min-width: 120rpx; min-width: 120rpx;
min-height: 120rpx; min-height: 120rpx;
margin-right: 20rpx;
.img { .img {
width: 100%; width: 100%;
height: 100%; height: 100%;
@ -99,13 +105,12 @@
&-infor { &-infor {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
padding-left: 22rpx; width: 300rpx;
&-name { &-name {
font-size: $FONTSIZE30; font-size: $FONTSIZE30;
max-width: 336rpx; max-width: 300rpx;
min-width: 336rpx; min-width: 300rpx;
word-break: break-all; word-break: break-all;
display: -webkit-box; display: -webkit-box;
-webkit-line-clamp: 1; -webkit-line-clamp: 1;
@ -115,14 +120,21 @@
&-sku { &-sku {
color: #999999; color: #999999;
font-size: $FONTSIZE22; font-size: $FONTSIZE22;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
overflow: hidden;
} }
&-money { &-money {
// max-width: 115rpx; // max-width: 115rpx;
// min-width: 115rpx; // min-width: 115rpx;
text-align: center; text-align: center;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
overflow: hidden;
&-yang { &-yang {
font-size: $FONTSIZE22; font-size: $FONTSIZE22;
} }
@ -138,8 +150,9 @@
} }
.quantity { .quantity {
// display: flex; flex: 1;
// justify-content: space-between; display: flex;
justify-content: space-between;
font-size: 30rpx; font-size: 30rpx;
color: #3A6FE7; color: #3A6FE7;
.num { .num {

View File

@ -69,28 +69,29 @@
<text lines="1" class="quantity">{{shoptotalnum }}</text> <text lines="1" class="quantity">{{shoptotalnum }}</text>
<text lines="1" class="amount">余额{{ _amount(amount)}}</text> <text lines="1" class="amount">余额{{ _amount(amount)}}</text>
</view> --> </view> -->
<view class="Commodity"> <view style="border: 120rpx; overflow: hidden">
<text lines="1" class="quantity">应付</text> <view class="Commodity">
<text lines="1" class="amount">{{ YingPrice }}</text> <text lines="1" class="quantity">应付</text>
</view> <text lines="1" class="amount">{{ YingPrice }}</text>
<!-- 新增计算抵扣逻辑 -->
<view class="Commodity Commodity-Item" style="margin-bottom: 0rpx; padding-bottom: 0rpx; padding-top: 0rpx" @click="isBroker()">
<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.broker_balance }} )</text>
</view>
<view class="Checkbox" :style="{'--aftercolor':Brand()['ThemeColor']}" :class="{'active-Checkbox': use_broker? true : false}"></view>
</view> </view>
</view> <!-- 新增计算抵扣逻辑 -->
<view class="Commodity Commodity-Item" @click="isCoin()"> <view class="Commodity Commodity-Item" style="margin-bottom: 0rpx; padding-bottom: 0rpx; padding-top: 0rpx" @click="isBroker()">
<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.broker_balance }} )</text>
</view>
<view class="Checkbox" :style="{'--aftercolor':Brand()['ThemeColor']}" :class="{'active-Checkbox': use_broker? true : false}"></view>
</view>
</view>
<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>
</view>
<view class="Checkbox" :style="{'--aftercolor':Brand()['ThemeColor']}" :class="{'active-Checkbox': use_coin? true : false}"></view>
</view> </view>
<view class="Checkbox" :style="{'--aftercolor':Brand()['ThemeColor']}" :class="{'active-Checkbox': use_coin? true : false}"></view>
</view> </view>
</view> </view>
@ -347,6 +348,9 @@
// //
item['pay_price'] = item['product_price']; item['pay_price'] = item['product_price'];
//
item['bt_price'] = item['bt_price'];
products.push(item); products.push(item);
this['shoptotalnum'] += item['num']; this['shoptotalnum'] += item['num'];
}; };
@ -771,7 +775,6 @@
.Commodity-Item { .Commodity-Item {
// margin-bottom: 20rpx; // margin-bottom: 20rpx;
padding: 32rpx 0; padding: 32rpx 0;
// //
.discount { .discount {
display: flex; display: flex;
@ -780,9 +783,9 @@
.Checkbox { .Checkbox {
margin-right: 20rpx; margin-right: 20rpx;
width: 24rpx; width: 30rpx;
height: 24rpx; height: 30rpx;
border: 1rpx solid #D3D6DB; border: 2rpx solid #D3D6DB;
border-radius: 50%; border-radius: 50%;
overflow: hidden; overflow: hidden;
} }
@ -795,8 +798,8 @@
&::after { &::after {
content: ''; content: '';
position: absolute; position: absolute;
width: 12rpx; width: 18rpx;
height: 12rpx; height: 18rpx;
border-radius: 50%; border-radius: 50%;
border: 3rpx solid #ffffff; border: 3rpx solid #ffffff;
background-color: var(--aftercolor); background-color: var(--aftercolor);
@ -822,7 +825,8 @@
// / // /
.Commodity { .Commodity {
color: #333333; color: #333333;
font-size: 28rpx; font-size: 30rpx;
font-weight: bold;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
@ -840,7 +844,8 @@
flex-direction: row; flex-direction: row;
display: flex; display: flex;
position: fixed; position: fixed;
bottom: 0; bottom: 0;
font-size: 30rpx !important;
left: 0; left: 0;
z-index: 10; z-index: 10;
padding: 20rpx 10rpx; padding: 20rpx 10rpx;
@ -858,36 +863,35 @@
width: 211rpx; width: 211rpx;
height: 40rpx; height: 40rpx;
overflow-wrap: break-word; overflow-wrap: break-word;
font-size: 0rpx;
font-family: PingFangSC-Semibold; font-family: PingFangSC-Semibold;
text-align: left; text-align: left;
white-space: nowrap; white-space: nowrap;
line-height: $FONTSIZE28; line-height: $FONTSIZE28;
} }
.itemamount{ .itemamount{
margin-bottom: 8rpx; margin-bottom: 10rpx;
} }
.text_24 { .text_24 {
width: 211rpx; width: 211rpx;
height: 27rpx; height: 27rpx;
color: rgba(51, 51, 51, 1); color: rgba(51, 51, 51, 1);
font-size: $FONTSIZE28; font-size: $FONTSIZE30;
font-family: PingFangSC-Semibold; font-family: PingFangSC-Semibold;
text-align: left; text-align: left;
white-space: nowrap; white-space: nowrap;
line-height: $FONTSIZE28; line-height: $FONTSIZE30;
} }
.text_25 { .text_25 {
width: 211rpx; width: 211rpx;
height: 27rpx; height: 27rpx;
color: #00AF66; color: #00AF66;
font-size: $FONTSIZE28; font-size: $FONTSIZE30;
font-family: PingFangSC-Semibold; font-family: PingFangSC-Semibold;
text-align: left; text-align: left;
white-space: nowrap; white-space: nowrap;
line-height: $FONTSIZE28; line-height: $FONTSIZE30;
} }
.text_26 { .text_26 {