fix: 修改部分细节

This commit is contained in:
whitechiina 2025-04-17 18:32:53 +08:00
parent 6b835f5162
commit eb97ee0951
11 changed files with 127 additions and 61 deletions

View File

@ -3,6 +3,7 @@ import store from './store';
import prototype from '@/static/js/toolclass/prototype.js'; import prototype from '@/static/js/toolclass/prototype.js';
import H5 from "@/static/js/index.js"; import H5 from "@/static/js/index.js";
import newconfig from "@/static/js/newconfig.js"; import newconfig from "@/static/js/newconfig.js";
Vue.use(newconfig); Vue.use(newconfig);
Vue.prototype.$store = store; Vue.prototype.$store = store;
Vue.prototype.$tst = 1; Vue.prototype.$tst = 1;

View File

@ -768,6 +768,7 @@
/deep/ .u-modal__title { /deep/ .u-modal__title {
display: none !important; display: none !important;
padding-bottom: 20rpx !important;
} }
} }

View File

@ -190,6 +190,7 @@
background: linear-gradient(117deg, #FFFBF7 0%, #FFF5EB 100%); background: linear-gradient(117deg, #FFFBF7 0%, #FFF5EB 100%);
padding-bottom: 26rpx; padding-bottom: 26rpx;
padding-top: 26rpx; padding-top: 26rpx;
padding-bottom: 20rpx !important;
} }
/deep/.u-modal__button-group { /deep/.u-modal__button-group {

View File

@ -5,7 +5,7 @@
box-shadow: 0px 0px 18px 0px rgba(0, 0, 0, 0.1); box-shadow: 0px 0px 18px 0px rgba(0, 0, 0, 0.1);
border-radius: 20rpx 20rpx 0 0; border-radius: 20rpx 20rpx 0 0;
width: 100%; width: 100%;
height: 210rpx; height: 100rpx;
flex-direction: row; flex-direction: row;
display: flex; display: flex;
position: fixed; position: fixed;
@ -66,6 +66,33 @@
// padding-bottom: calc(); // padding-bottom: calc();
height: 642rpx; height: 642rpx;
background-color: #ffffff; background-color: #ffffff;
.KDJ-Cart-Popup-top {
width: 100%;
height: 87rpx;
border-bottom: 1rpx solid rgba(0, 0, 0, 0.1);
padding: 0 32rpx;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 26rpx;
.text {
color: #666666;
}
&-empty {
color: #666666;
display: flex;
align-items: center;
padding: 15rpx 0 15rpx 15rpx;
.img {
width: 29rpx;
height: 31rpx;
margin-right: 15rpx;
}
}
}
&-item { &-item {
width: 100%; width: 100%;

View File

@ -4,7 +4,7 @@
background-color: white; background-color: white;
border-radius: 20rpx 20rpx 0 0; border-radius: 20rpx 20rpx 0 0;
width: 100%; width: 100%;
height: 210rpx; height: 140rpx;
flex-direction: row; flex-direction: row;
display: flex; display: flex;
position: fixed; position: fixed;

View File

@ -4,7 +4,7 @@
background-color: white; background-color: white;
border-radius: 20rpx 20rpx 0 0; border-radius: 20rpx 20rpx 0 0;
width: 100%; width: 100%;
height: 210rpx; height: 140rpx;
flex-direction: row; flex-direction: row;
display: flex; display: flex;
position: fixed; position: fixed;

View File

@ -2,7 +2,7 @@
<view class="shop_home"> <view class="shop_home">
<template v-if="BrandInfor['brand_id'] == 1"> <template v-if="BrandInfor['brand_id'] == 1">
<!-- 购物车 --> <!-- 购物车 -->
<view class="KDJ-Cart"> <view class="KDJ-Cart" :style="deviceOS == 'iOS'? 'height: 200rpx' : ''">
<view class="left"> <view class="left">
<view class="left-img"> <view class="left-img">
<image class="img" @tap="Shoplength > 0?shoppingshow = !shoppingshow:''" <image class="img" @tap="Shoplength > 0?shoppingshow = !shoppingshow:''"
@ -14,7 +14,7 @@
<view class="price"> <view class="price">
<text class="yang"></text> <text class="yang"></text>
<!-- <text class="amount">{{RetainDecimalPoint(totalPrice)}}</text> --> <!-- <text class="amount">{{RetainDecimalPoint(totalPrice)}}</text> -->
<text class="amount">{{totalPrice}}</text> <text class="amount">{{_fixed(totalPrice)}}</text>
</view> </view>
</view> </view>
<view class="right" @tap="create" :class="[Shoplength > 0?'right2':'']"> <view class="right" @tap="create" :class="[Shoplength > 0?'right2':'']">
@ -26,6 +26,15 @@
@close="shoppingshow = false" :show="shoppingshow" mode="bottom"> @close="shoppingshow = false" :show="shoppingshow" mode="bottom">
<view class="KDJ-Cart-Popup"> <view class="KDJ-Cart-Popup">
<scroll-view :scroll-top="0" scroll-y style="height: 642rpx;"> <scroll-view :scroll-top="0" scroll-y style="height: 642rpx;">
<view class="KDJ-Cart-Popup-top">
<view class="text">
已选商品
</view>
<view class="KDJ-Cart-Popup-top-empty" @tap="EMPTY(GetShopInfor['restaurant_id'])">
<image class="img" :src="qnyurl('qingkong.png','rx')" mode=""></image>
<text>清空购物车</text>
</view>
</view>
<template v-for="(item,index) in MealList"> <template v-for="(item,index) in MealList">
<view class="KDJ-Cart-Popup-item" :key='index'> <view class="KDJ-Cart-Popup-item" :key='index'>
<!-- 商品 --> <!-- 商品 -->
@ -36,7 +45,7 @@
<view class="money"> <view class="money">
<view class="price"> <view class="price">
<text class="yang"></text> <text class="yang"></text>
<text class="amount">{{item['adj_pay'] * item['num']}}</text> <text class="amount">{{_fixed(item['adj_pay'] * item['num'])}}</text>
<!-- <text class="amount">{{RetainDecimalPoint(item['pay_price'] * item['num'])}}</text> --> <!-- <text class="amount">{{RetainDecimalPoint(item['pay_price'] * item['num'])}}</text> -->
</view> </view>
</view> </view>
@ -158,9 +167,10 @@
</view> </view>
</u-popup> </u-popup>
</template> </template>
<template v-if="BrandInfor['brand_id'] == 5"> <template v-if="BrandInfor['brand_id'] == 5">
<!-- 购物车 --> <!-- 购物车 -->
<view class="MDL-Cart"> <view class="MDL-Cart" :style="deviceOS == 'iOS'? 'height: 200rpx' : ''">
<view class="MDL-Cart-left" @tap="Shoplength > 0?shoppingshow = !shoppingshow:''"> <view class="MDL-Cart-left" @tap="Shoplength > 0?shoppingshow = !shoppingshow:''">
<view class="MDL-Cart-left-img"> <view class="MDL-Cart-left-img">
<image class="img" :src="qnyurl('gouwuceicon.png','mdl')" mode="heightFix"> <image class="img" :src="qnyurl('gouwuceicon.png','mdl')" mode="heightFix">
@ -240,7 +250,7 @@
</template> </template>
<template v-if="BrandInfor['brand_id'] == 10"> <template v-if="BrandInfor['brand_id'] == 10">
<!-- 购物车 --> <!-- 购物车 -->
<view class="XBK-Cart"> <view class="XBK-Cart" :style="deviceOS == 'iOS'? 'height: 200rpx' : ''">
<view class="XBK-Cart-left" @tap="Shoplength > 0?shoppingshow = !shoppingshow:''"> <view class="XBK-Cart-left" @tap="Shoplength > 0?shoppingshow = !shoppingshow:''">
<view class="XBK-Cart-left-img"> <view class="XBK-Cart-left-img">
<image class="img" :src="qnyurl('shopping.png','xbk')" mode="heightFix"> <image class="img" :src="qnyurl('shopping.png','xbk')" mode="heightFix">
@ -329,7 +339,7 @@
</template> </template>
<template v-if="BrandInfor['brand_id'] == 13"> <template v-if="BrandInfor['brand_id'] == 13">
<!-- 购物车 --> <!-- 购物车 -->
<view class="RX-Cart"> <view class="RX-Cart" :style="deviceOS == 'iOS'? 'height: 200rpx' : ''">
<view class="RX-Cart-left" @tap="Shoplength > 0?shoppingshow = !shoppingshow:''"> <view class="RX-Cart-left" @tap="Shoplength > 0?shoppingshow = !shoppingshow:''">
<view class="RX-Cart-left-img"> <view class="RX-Cart-left-img">
<image class="img" :src="qnyurl('shopping.png','rx')" mode="aspectFill"> <image class="img" :src="qnyurl('shopping.png','rx')" mode="aspectFill">
@ -451,8 +461,21 @@
this['shoppingshow'] = false; this['shoppingshow'] = false;
} }
return this['MealList']['length']; return this['MealList']['length'];
},
deviceOS() {
const userAgent = navigator.userAgent || navigator.vendor || window.opera;
if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) {
return 'iOS';
} else if (/android/i.test(userAgent)) {
return 'Android';
}
return 'Unknown';
} }
}, },
watch: { watch: {
GetCartList: { GetCartList: {
deep: true, deep: true,

View File

@ -4,7 +4,7 @@
background-color: white; background-color: white;
border-radius: 20rpx 20rpx 0 0; border-radius: 20rpx 20rpx 0 0;
width: 100%; width: 100%;
height: 210rpx; height: 140rpx;
flex-direction: row; flex-direction: row;
display: flex; display: flex;
position: fixed; position: fixed;

View File

@ -126,7 +126,7 @@
</view> </view>
<!-- 确认门店信息 --> <!-- 确认门店信息 -->
<u-modal :show="show" title="请确认自取门店" closeOnClickOverlay @close="show = false"> <u-modal :show="show" title="请确认自取门店" closeOnClickOverlay @close="show = false" @confirm="confirmClick()" @cancel="show = false">
<template v-slot:default> <template v-slot:default>
<view class="default-content"> <view class="default-content">
<view class="location-Img"> <view class="location-Img">
@ -148,10 +148,10 @@
<template v-slot:confirmButton> <template v-slot:confirmButton>
<view class="confirmButton"> <view class="confirmButton">
<view class="btn replace" @tap="navigateBack(2, true, 0)" <view class="btn replace" @tap="navigateBack(2, true, 0)"
:style="{border:`1rpx solid ${Brand()['ThemeColor']}`,color:Brand()['ThemeColor']}"> :style="{border:`2rpx solid ${Brand()['ThemeColor']}`,color:Brand()['ThemeColor']}">
更换门店 更换门店
</view> </view>
<view class="btn confirm" @tap="confirmClick" :style="Brand()['customStyle']['BtnStyle'][0]"> <view class="btn confirm" @tap="$u.throttle(confirmClick, 1000)" :style="Brand()['customStyle']['BtnStyle'][0]">
就是这家 就是这家
</view> </view>
</view> </view>
@ -226,6 +226,7 @@
} from 'vuex'; } from 'vuex';
// //
import bRxCommodityItem from '@/components/b-rx-commodity-item/b-rx-commodity-item.vue' import bRxCommodityItem from '@/components/b-rx-commodity-item/b-rx-commodity-item.vue'
let self; let self;
export default { export default {
mixins: [mixin, restaurantmixins, calculationamountmixin], mixins: [mixin, restaurantmixins, calculationamountmixin],
@ -418,11 +419,13 @@
* */ * */
confirmClick() { confirmClick() {
this['show'] = false; this['show'] = false;
let self = this;
uni.showLoading({ uni.showLoading({
title: '支付中...' title: '支付中...',
mask: true
}); });
//
let self = this;
let from = JSON.parse(JSON.stringify(self['FormInfor'])) let from = JSON.parse(JSON.stringify(self['FormInfor']))
if (typeof from['products'] == 'object') { if (typeof from['products'] == 'object') {
from['products'] = JSON.stringify(from['products']) from['products'] = JSON.stringify(from['products'])
@ -467,18 +470,8 @@
shopInfo: from.products, shopInfo: from.products,
return_url:`/pages/restaurant/order/order-details/details?order_sn=${res.data.order_sn}` return_url:`/pages/restaurant/order/order-details/details?order_sn=${res.data.order_sn}`
}); });
uni.hideLoading();
} }
// let redirect_url = '/pages/restaurant/order/order-details/details';
// uni.hideLoading();
// //
// this.payment({
// order_sn: res['data']['order_sn'],
// //
// money:res['data']['money'],
// type: res['data']['type'],
// redirect_url,
// });
}) })
}, },
@ -1031,6 +1024,7 @@
line-height: 86rpx; line-height: 86rpx;
text-align: center; text-align: center;
border-radius: 43rpx; border-radius: 43rpx;
font-weight: 500;
} }
} }

View File

@ -27,7 +27,9 @@
</view> </view>
<text lines="1" class="text_9">×{{item['num']}}</text> <text lines="1" class="text_9">×{{item['num']}}</text>
</view> </view>
<view class="text_4">
{{item.sku}}
</view>
<view class="section_5"> <view class="section_5">
<!-- <view class="text-group_1"> <!-- <view class="text-group_1">
<text lines="1" class="text_14">可用消费补贴卡余额抵扣{{_amount(item['max_deduction'] * item['num'])}}</text> <text lines="1" class="text_14">可用消费补贴卡余额抵扣{{_amount(item['max_deduction'] * item['num'])}}</text>
@ -134,13 +136,13 @@
</view> </view>
</view> </view>
<text lines="1" class="text_28"></text> <text lines="1" class="text_28"></text>
<button class="button_1" :class="`theme-Union-Class-${BrandInfor['brand_id']}-1`" @tap="settlement"> <button class="button_1" :class="`theme-Union-Class-${BrandInfor['brand_id']}-1`" @tap="$u.throttle(settlement, 500)">
<text lines="1" class="text_29">结算</text> <text lines="1" class="text_29">结算</text>
</button> </button>
</view> </view>
<!-- 确认门店信息 --> <!-- 确认门店信息 -->
<u-modal :show="show" title="请确认自取门店" closeOnClickOverlay @close="show = false"> <u-modal :show="show" title="请确认自取门店" closeOnClickOverlay @close="show = false" @confirm="confirmClick()" @cancel="show = false">
<template v-slot:default> <template v-slot:default>
<view class="default-content"> <view class="default-content">
<view class="location-Img"> <view class="location-Img">
@ -162,10 +164,10 @@
<template v-slot:confirmButton> <template v-slot:confirmButton>
<view class="confirmButton"> <view class="confirmButton">
<view class="btn replace" @tap="navigateBack(2, true, 0)" <view class="btn replace" @tap="navigateBack(2, true, 0)"
:style="{border:`1rpx solid ${Brand()['ThemeColor']}`,color:Brand()['ThemeColor']}"> :style="{border:`2rpx solid ${Brand()['ThemeColor']}`,color:Brand()['ThemeColor']}">
更换门店 更换门店
</view> </view>
<view class="btn confirm" @tap="confirmClick" :style="Brand()['customStyle']['BtnStyle'][0]"> <view class="btn confirm" @tap="$u.throttle(confirmClick, 1000)" :style="Brand()['customStyle']['BtnStyle'][0]">
就是这家 就是这家
</view> </view>
</view> </view>
@ -236,6 +238,7 @@
computedOfflineOrder, computedOfflineOrder,
createFoodOrder createFoodOrder
} from '@/request/restaurant/index.js'; } from '@/request/restaurant/index.js';
let self; let self;
export default { export default {
mixins: [mixin, restaurantmixins, calculationamountmixin], mixins: [mixin, restaurantmixins, calculationamountmixin],
@ -416,13 +419,17 @@
}, },
confirmClick() { confirmClick() {
this['show'] = false;
uni.showLoading({
title: '支付中...',
mask: true
});
let FormInfor = JSON.parse(JSON.stringify(self['FormInfor'])) let FormInfor = JSON.parse(JSON.stringify(self['FormInfor']))
if (typeof FormInfor['products'] == 'object') { if (typeof FormInfor['products'] == 'object') {
FormInfor['products'] = JSON.stringify(FormInfor['products']) FormInfor['products'] = JSON.stringify(FormInfor['products'])
} }
uni.showLoading({
title: '支付中...'
});
FormInfor.phone = FormInfor.phone_number; FormInfor.phone = FormInfor.phone_number;
FormInfor.products = JSON.parse(FormInfor.products) FormInfor.products = JSON.parse(FormInfor.products)
@ -458,6 +465,7 @@
shopInfo: FormInfor.products, shopInfo: FormInfor.products,
return_url:`/pages/restaurant/order/order-details/details?order_sn=${res.data.order_sn}` return_url:`/pages/restaurant/order/order-details/details?order_sn=${res.data.order_sn}`
}); });
uni.hideLoading();
} }
}) })
}, },
@ -614,6 +622,7 @@
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
margin-bottom: 10rpx;
} }
.section_5 { .section_5 {
@ -920,22 +929,22 @@
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: rgba(198, 56, 54, 1); color: rgba(198, 56, 54, 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_26 { .text_26 {
@ -1005,9 +1014,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;
} }
@ -1020,8 +1029,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: #FFBC0D; background-color: #FFBC0D;
@ -1045,12 +1054,13 @@
// / // /
.Commodity { .Commodity {
color: #333333; color: #333333;
font-size: 28rpx; font-size: 30rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
background-color: #ffffff; background-color: #ffffff;
padding: 32rpx; padding: 32rpx;
font-weight: bold;
} }
.confirmButton { .confirmButton {
@ -1075,6 +1085,7 @@
line-height: 86rpx; line-height: 86rpx;
text-align: center; text-align: center;
border-radius: 43rpx; border-radius: 43rpx;
font-weight: 500;
} }
} }
@ -1156,4 +1167,8 @@
} }
} }
.itemamount {
margin-bottom: 10rpx;
}
</style> </style>

View File

@ -191,6 +191,10 @@ computed: {},
}) })
}, },
_fixed(num) {
return num.toFixed(2)
},
// 金额格式化(iscarrytrue) // 金额格式化(iscarrytrue)
_amount(num) { _amount(num) {
return this.RetainDecimalPoints({ return this.RetainDecimalPoints({