WIN-2CJ8FMUT9OF\Administrator 7 bulan lalu
induk
melakukan
ffa93c10aa

+ 10 - 5
api/order.js

@@ -1,19 +1,24 @@
 import {request} from '../service/ajax.js'
 
-const newsUrl = '/api/order/'
+const newsUrl = 'api/order/'
+// 创建订单
+export const orderCreate = (data) => request(newsUrl + 'create', 'post', { ...data },false)
+// 创建订单_购物车数组
+export const orderCreateVtwo = (data) => request(newsUrl + 'create_v2', 'post', { ...data },false)
+// 支付订单
+export const orderPay = (data) => request(newsUrl + 'pay', 'post', { ...data },false)
 // 获取订单列表
 export const orderList = (data) => request(newsUrl + 'list', 'post', { ...data },false)
 // 获取订单详情
 export const orderInfo = (data) => request(newsUrl + 'info', 'post', { ...data },false)
 // 取消订单
 export const orderCancel = (data) => request(newsUrl + 'cancel', 'post', { ...data },false)
+
+///////////
 // 获取订单状态
 export const orderStatus = (data) => request(newsUrl + 'status', 'post', { ...data },false)
-// 支付订单
-export const orderPay = (data) => request(newsUrl + 'pay', 'post', { ...data },false)
+
 // 获取预约送达时间
 export const orderTime = (data) => request(newsUrl + 'time', 'post', { ...data },false)
-// 外卖订单创建
-export const orderCreate = (data) => request(newsUrl + 'create', 'post', { ...data },false)
 // 支付页详情
 export const orderPayInfo = (data) => request(newsUrl + 'pay_info', 'post', { ...data },false)

+ 6 - 0
common/css/common.css

@@ -962,6 +962,9 @@ text {
 .ml-16 {
 	margin-left: 16rpx;
 }
+.ml-20 {
+	margin-left: 20rpx;
+}
 .ml-30 {
 	margin-left: 30rpx;
 }
@@ -1156,6 +1159,9 @@ text {
 .b-FF3333 {
 	border: 1rpx solid #FF3333;
 }
+.b-FFF3F3 {
+	border: 1rpx solid #FFF3F3;
+}
 .b-b-d {
 	border: 1rpx solid #ddd;
 }

+ 149 - 51
pages-takeout/goods-order.vue

@@ -9,15 +9,15 @@
 				</view>
 				<view class="align-items-center">
 					<view class="pl-32 pr-24 box-border-box align-items-center flex-justify-space flex-1 mr-18 b-rad-16"
-						:class="wayType === 1?'bgc-FFF3F3 b-FF3333':'b-b-d'" @click="wayTypeStyle(1)">
-						<view class="fw-600 fs-32" :class="wayType === 1?'fc-FF3333':'fc-3'">
+						:class="cartData.order_type === 1?'bgc-FFF3F3 b-FF3333':'b-b-d'" @click="wayTypeStyle(1)">
+						<view class="fw-600 fs-32" :class="cartData.order_type === 1?'fc-FF3333':'fc-3'">
 							堂食
 						</view>
 						<image class="ts-img" src="/static/img/order-food/ts-img.png" mode="aspectFill"></image>
 					</view>
 					<view class="pl-32 pr-24 box-border-box align-items-center flex-justify-space flex-1 b-rad-16"
-						:class="wayType === 2?'bgc-FFF3F3 b-FF3333':'b-b-d'" @click="wayTypeStyle(2)">
-						<view class="fw-600 fs-32" :class="wayType === 2?'fc-FF3333':'fc-3'">
+						:class="cartData.order_type === 2?'bgc-FFF3F3 b-FF3333':'b-b-d'" @click="wayTypeStyle(2)">
+						<view class="fw-600 fs-32" :class="cartData.order_type === 2?'fc-FF3333':'fc-3'">
 							打包
 						</view>
 						<image class="ts-img" src="/static/img/order-food/db-img.png" mode="aspectFill"></image>
@@ -39,34 +39,39 @@
 					<view class="align-items-center">
 						<image class="zz-icon mr-4" src="@/static/img/order-food/zz-icon.png" mode=""></image>
 						<view class="fs-28 fc-6">
-							桌号:17
+							桌号:{{cartData.table_number}}
 						</view>
 					</view>
 				</view>
 				<view class="mb-24 b-b-F9F9F9">
-					<view class="flex-justify-space mb-28" v-for="(item,i) in cardData.goods_list" :key="i">
+					<view class="flex-justify-space mb-28" v-for="(item,i) in cartData.shopping_cart.goods_list"
+						:key="i">
 						<image class="goods-img" :src="item.goods_image" mode="aspectFill"></image>
 						<view class="w376">
-							<view class="fs-28 fw-600 mb-2">
+							<view class="fs-28 fw-600 mb-2 text-overflow-ellipsis-one">
 								{{item.goods_name}}
 							</view>
-							<view class="fs-24 fc-9 mb-2">{{item.goods_desc}}</view>
+							<view class="fs-24 fc-9 mb-2">{{item.goods_attr}}</view>
 							<view class="fs-24 fc-9">x{{item.goods_number}}</view>
 						</view>
-						<view class="fs-32 fw-600 fc-3">¥{{item.goods_money}}</view>
+						<view class="fs-32 fw-600 fc-3">¥{{item.price}}</view>
 					</view>
 				</view>
-				<view class="flex-justify-space mb-30">
+				<view class="flex-justify-space mb-30" v-if="cartData.order_type === 2">
+					<view class="fs-28 fw-400">打包费</view>
+					<view class="fs-32 fw-600 fc-3">¥{{cartData.shopping_cart.pack_price}}</view>
+				</view>
+				<view class="flex-justify-space mb-30" v-if="cartData.order_type === 1">
 					<view class="fs-28 fw-400">就餐人数</view>
 					<view class="align-items-center" @click="openPop">
-						<view class="fs-32 fw-600 fc-3 mr-4">2人</view>
+						<view class="fs-32 fw-600 fc-3 mr-4">{{cartData.diner_number}}人</view>
 						<image class="right-b" src="@/static/img/order-food/right-b.png" mode=""></image>
 					</view>
 				</view>
-				<view class="flex-justify-space mb-30">
+				<!-- 				<view class="flex-justify-space mb-30">
 					<view class="fs-28 fw-400">餐位费</view>
 					<view class="fs-32 fw-600 fc-3">¥4</view>
-				</view>
+				</view> -->
 				<!-- 				<view class="flex-justify-space mb-30">
 					<view class="fs-28 fw-400">店铺优惠</view>
 					<view class="fs-32 fw-600">¥{{cardData.pack_price}}</view>
@@ -77,14 +82,13 @@
 					</view>
 					<span class="fw-600 fc-0 fs-28">¥</span>
 					<span
-						class="fw-600 fc-0 fs-44">{{(total_price - quanMoney) < 0?'0':(total_price - quanMoney).toFixed(2)||0}}</span>
+						class="fw-600 fc-0 fs-44">{{cartData.order_type === 1 ?cartData.shopping_cart.total_goods_money:cartData.shopping_cart.total_price}}</span>
 				</view>
 			</view>
 
 			<view class="p-24 box-border-box bgc-f mb-20 b-rad-20 flex-justify-space">
-					<view class="fs-28 fw-600">备注</view>
-					<input v-model="fromData.note" class="flex-1 text-align-right fs-28" type="text"
-						placeholder="请填写你的需求">
+				<view class="fs-28 fw-600">备注</view>
+				<input v-model="fromData.note" class="flex-1 text-align-right fs-28" type="text" placeholder="请填写你的需求">
 			</view>
 			<view class="p-24 box-border-box bgc-f mb-20 b-rad-20 flex-justify-space">
 				<view class="fs-28 fw-600">备注</view>
@@ -101,16 +105,35 @@
 			<view class="bottom-box flex-justify-space align-items-center pl-24 box-border-box pr-8 b-rad-200 bgc-f">
 				<view class="align-items-baseline">
 					<view class="fs-28 fc-3 fw-600">¥</view>
-					<view
-						class="fs-44 fc-3 fw-600">{{(total_price - quanMoney) < 0?'0':(total_price - quanMoney).toFixed(2)||0}}</view>
+					<view class="fs-44 fc-3 fw-600">
+						{{cartData.order_type === 1 ?cartData.shopping_cart.total_goods_money:cartData.shopping_cart.total_price}}
+					</view>
 				</view>
 				<view class="box-2 text-align-center fc-f fs-32 fw-600 b-rad-200" @click="toSave()">立即支付</view>
 			</view>
 		</view>
-		
+
 		<uni-popup ref="popup" type="bottom" background-color="transparent" borderRadius='10px 10px 0 0'>
-			<view class="b-rad-20-20-0-0 bgc-f">
-				
+			<view class="b-rad-20-20-0-0 bgc-f popup_diner_number p-32 box-border-box">
+				<view class="fc-3 fw-600 fs-36 mb-32">
+					请选择用餐人数
+				</view>
+				<view class="align-items-center flex-justify-space flex-wrap-wrap mb-50">
+					<view @click="dinerNumber(index+1)"
+						class="w-25-100 b-rad-12 text-align-center flex-justify-center fs-36 fc-3 fw-500 mb-20"
+						:class="cartData.diner_number === index+1 && !customizeType?'b-FF3333 bgc-FFF3F3':'b-FFF3F3 bgc-F2F2F2'"
+						v-for="(item,index) in 10">
+						{{index + 1}}
+					</view>
+					<view class="bgc-F2F2F2 b-rad-12 customize-box mb-20"
+						:class="customizeType?'b-FF3333 bgc-FFF3F3':'b-FFF3F3 bgc-F2F2F2'">
+						<input class="customize-input fs-32" type="number" v-model="customize_num" @focus='focusInput'
+							@input='input' placeholder="请输入数量" placeholder-class="fc-9 fs-32" />
+					</view>
+				</view>
+				<view class="pop-but fs-32 fc-f fw-500 text-align-center b-rad-200" @click="okPop">
+					确认选择
+				</view>
 			</view>
 		</uni-popup>
 	</view>
@@ -124,15 +147,20 @@
 		getDeliveryMoney
 	} from '@/api/common.js'
 	import {
+		orderCreateVtwo,
 		orderCreate,
 		orderPay
 	} from '@/api/order.js'
+	import cartStore from '@/utils/cartStore.js';
 	import tools from "@/service/tools";
 	export default {
 		components: {},
 		data() {
 			return {
-				wayType: 1, //1堂食 2打包
+				customize_num: '',
+				customizeType: false,
+				shop_id: '',
+				wayType: 1,
 				fromData: {
 					school_id: '',
 					shop_id: '',
@@ -142,34 +170,81 @@
 					address_id: '',
 					coupon_id: '',
 					note: '',
-					// is_default:0,
-					// pickup_code:[],
 				},
 				addressData: {},
 				deliverText: '',
-				cardData: {
-					goods_list: [],
-				},
 				delivery_money: '',
 				quanMoney: "",
 				total_price: '',
 				isAJAX: false,
+				cartData: {
+					shopping_cart: {},
+					order_type: 1, //1堂食 2打包
+					table_number: 1,
+					diner_number: 1,
+					note: ''
+				},
 				CouponLength: 0, // 可用优惠券数量
 				receiveLength: 0 // 可领优惠券数量
 			}
 		},
-		onLoad(e) {},
+		onLoad(e) {
+			this.cartData.table_number = uni.getStorageSync('table_number')
+			this.getCartData()
+		},
 		onShow() {},
 		onUnload() {},
 		methods: {
-			openPop(){
+			okPop() {
+				if (this.cartData.diner_number === 0) {
+					tools.error("选择就餐人数")
+					return
+				}
+				this.$refs.popup.close()
+				// if(this.customizeType) {
+				// 	this.cartData.diner_number = this.customize_diner_number
+				// }
+			},
+			input(e) {
+				this.cartData.diner_number = e.detail.value
+			},
+			focusInput() {
+				this.customizeType = true
+				this.cartData.diner_number = 0
+			},
+			dinerNumber(num) {
+				if (this.cartData.diner_number === num) {
+					return
+				} else {
+					this.cartData.diner_number = num
+				}
+				this.customizeType = false
+				this.customize_num = ''
+			},
+			getCartData() {
+				cartStore.setShopId();
+				const shopCart = cartStore.getShopCart();
+				this.cartData.shopping_cart = shopCart
+				console.log(this.cartData, '11111111');
+			},
+			orderCreateVtwo() {
+				orderCreateVtwo(shopCart).then((res) => {
+					if (res.code === 1) {
+						console.log(res, '11111');
+					}
+				})
+			},
+			openPop() {
+				if (this.cartData.diner_number > 10) {
+					this.customize_num = this.cartData.diner_number
+				}
 				this.$refs.popup.open()
 			},
 			wayTypeStyle(type) {
-				if (type === this.wayType) {
+				if (type === this.cartData.order_type) {
 					return
 				} else {
-					this.wayType = type
+					this.cartData.order_type = type
 				}
 			},
 			getDeliveryMoney(shop_id) {
@@ -185,18 +260,6 @@
 					}
 				})
 			},
-			// 获取购物车
-			getCard(shop_id) {
-				getShopIngList({
-					shop_id: shop_id
-				}).then((res) => {
-					if (res.code === 1) {
-						this.cardData = res.data;
-						this.total_price = res.data.total_price
-						this.getDeliveryMoney(shop_id)
-					}
-				})
-			},
 			giveCouPon(e) {
 				if (e.id) {
 					this.quanMoney = Number(e.money);
@@ -207,16 +270,17 @@
 				}
 			},
 			toSave() {
+				console.log(this.cartData, "111111");
 				if (this.isAJAX) {
 					return
 				}
 				this.isAJAX = true;
-				this.fromData.school_id = uni.getStorageSync('school_id');
-				orderCreate(this.fromData).then((res) => {
+				orderCreateVtwo(this.cartData).then((res) => {
 					if (res.code === 1) {
-						uni.redirectTo({
-							url: `/pages-takeout/pay-page?orderId=${res.data.order_id}`
-						});
+						// uni.redirectTo({
+						// 	url: `/pages-takeout/pay-page?orderId=${res.data.order_id}`
+						// });
+
 					} else {
 						this.isAJAX = false;
 						tools.error(res.msg);
@@ -228,10 +292,43 @@
 </script>
 
 <style scoped lang="scss">
-	.wx-zf{
+	.pop-but {
+		width: 100%;
+		height: 96rpx;
+		line-height: 96rpx;
+		background: linear-gradient(270deg, #FF3333 0%, #FE6122 100%);
+	}
+
+	.customize-input {
+		width: 100%;
+		height: 100%;
+		text-align: center;
+	}
+
+	.customize-box {
+		width: 48%;
+		height: 92rpx;
+	}
+
+	.w-25-100 {
+		width: 22%;
+		height: 92rpx;
+		line-height: 92rpx;
+	}
+
+	.popup_diner_number {
+		width: 100%;
+		height: 42vh;
+		position: fixed;
+		left: 0;
+		bottom: 0;
+	}
+
+	.wx-zf {
 		width: 40rpx;
 		height: 40rpx;
 	}
+
 	.zz-icon {
 		width: 32rpx;
 		height: 32rpx;
@@ -298,7 +395,8 @@
 		line-height: 80rpx;
 		background: linear-gradient(270deg, #FF3333 0%, #FE6122 100%);
 	}
-	.bottom-box{
+
+	.bottom-box {
 		width: 100%;
 		height: 96rpx;
 	}

+ 1170 - 1138
pages-takeout/new-shop.vue

@@ -1,1145 +1,1177 @@
 <template>
-  <view class="shop-index iPhone-bottom flex-direction box-border-box">
-
-    <image v-show="!navBgType" class="bg-img" src="@/static/img/order-food/shop-top.png" mode="aspectFill"
-      :class="scrollTop > newNavHeight?'z-4':'z-3'"></image>
-    <image v-show="navBgType" class="bg-img-type z-4" src="@/static/img/order-food/shop-top.png" mode="aspectFill"
-      :style="{height:newNavHeight+'rpx',opacity:opacity}"></image>
-
-    <newNav :leftShow="false" :textType='false' class="z-4 mb-32" @navHeight='navHeight'>
-      <view slot="textContentSlot" class="align-items-center flex-justify-end">
-        <view class="ss-box b-rad-50 mr-24 align-items-center flex-justify-center z-4" @click.stop="goSearch">
-          <image class="shop-search" src="@/static/img/order-food/shop-search.png" mode=""></image>
-        </view>
-        <view class="dd-box align-items-center flex-justify-center b-rad-200 mr-24 z-4" @click="goToOrder">
-          <image class="shp-list-img mr-8" src="@/static/img/order-food/shp-list.png" mode=""></image>
-          <view class="fs-28 fc-f">
-            订单
-          </view>
-        </view>
-      </view>
-    </newNav>
-
-    <view class="bgc-f box-border-box plr-32 mb-32 shop-info">
-      <view class="shop-info-box bgc-f box-border-box p-24 z-3 b-rad-20">
-        <view class="fs-40 fw-600 text-overflow-ellipsis">
-          {{shopsInfo.shop_name}}
-        </view>
-        <view class="fs-24 fw-400 fc-9 text-overflow-ellipsis-one pt-15" v-if="shopsInfo.notice">
-          公告:{{shopsInfo.notice || '暂无公告'}}
-        </view>
-      </view>
-    </view>
-
-    <view class="b-b-eee bgc-f box-border-box p-0-32-12 align-items-center flex-justify-space z-3 shop-type-box">
-      <view class="align-items-center shop-type-list">
-        <view class="shop-item fs-36 mb-8 mr-64" @click="seletShopType(item)"
-          :class="shopType === item.id?'fc-3 fw-600':'fc-6'" v-for="(item,i) in shopTypeList" :key="i">
-          {{item.name}}
-        </view>
-        <view class="shop-item-bs bgc-FF3333" :style="{left:shopTypeBsLeft+'rpx'}"></view>
-      </view>
-      <view class="align-items-center">
-        <image class="zh-icon mr-8" src="@/static/img/order-food/zh-icon.png" mode="aspectFill"></image>
-        <view class="fw-600 fs-32 fc-3">
-          桌号:{{table_number}}
-        </view>
-      </view>
-    </view>
-
-    <!-- <view class="bgc-f sticky-nav" :style="{ height: navBgType?`calc(100vh - ${newNavHeight}rpx - ${48}rpx)`:'auto'}"> -->
-    <view class="bgc-F7F8FA">
-      <view class="menu-box box-border-box align-items-flex-start" v-if="shopType === 1">
-
-        <view class="menu-box-left" :style="{top: newNavHeight + 'rpx'}">
-          <view class="menu-box-left-box pb-130 box-border-box"
-            :style="{height: menuLeftType?`calc(100vh - ${newNavHeight}rpx - ${68}rpx)`:''}">
-            <view class="menu-type-list fs-26 box-border-box align-items-center flex-justify-center"
-              v-for="(item,i) in categoryList" :key="i" @click="selectType(item)"
-              :class="type ===  item.category_id?'bgc-f fc-3 fw-600':'fc-6 fw-400'"
-              :id="'left-scroll'+ item.category_id">
-              {{item.name}}
-              <view class="menu-type-num fc-f" v-show="item.num > 0">{{item.num > 99?'99+':item.num}}
-              </view>
-            </view>
-          </view>
-        </view>
-
-        <view class="menu-box-only bgc-f pb-130 box-border-box">
-          <view class="" v-for="(item,i) in goodsList" :key="i" :id="'scroll'+ item.type">
-            <view class="fs-28 fw-600 fc-3 sticky-nav bgc-f p-20 box-border-box" :style="{top: newNavHeight + 'rpx'}">
-              {{item.name}}
-            </view>
-            <view class="menu-list flex-justify-space box-border-box" v-for="(info,k) in item.list" :key="k"
-              :id="'goods_id'+ info.goods_id">
-              <image class="flex-shrink0 goods_img" :src="info.goods_image" mode="scaleToFill"></image>
-              <view class="menu-list-right flex-direction flex-justify-space">
-                <view class="mb-8">
-                  <view class="mb-4 goods-name text-overflow-ellipsis fs-32 fw-600">
-                    {{info.goods_name}}
-                  </view>
-                  <view class="text-overflow-ellipsis-one fw-400 fc-9 fs-24 mb-2 goods-name" v-if="info.spec_type == 1">
-                    {{info.goods_desc?info.goods_desc:''}}
-                  </view>
-                </view>
-                <view class="flex-justify-space align-items-flex-end">
-                  <view class="">
-                    <span class="fs-24 fw-400 fc-FB3D03">¥</span>
-                    <span class="fs-40 fw-b fc-FB3D03">{{info.seckill_money>0?info.seckill_money:info.price}}</span>
-                  </view>
-                  <view class="display-flex align-items-center" v-if="info.spec_type == 1">
-                    <image v-show="info.num > 0" class="wh-44" @click="addred(1,info)"
-                      src="@/static/img/order-food/reduce-img.png" mode=""></image>
-                    <view v-show="info.num > 0" class="right-only-right-2 text-align-center fs-28 fw-400">{{info.num}}
-                    </view>
-                    <image class="wh-44" src="@/static/img/order-food/add-img.png" @click="addred(2,info)" mode="">
-                    </image>
-                  </view>
-                  <view v-else class="right-only-right text-align-center b-rad-200" @click="addred(3,info)">
-                    <view class="fw-600 fs-28 fc-f">
-                      选规格
-                    </view>
-                    <view class="selectedNum" v-if="info.num>0">
-                      {{info.num}}
-                    </view>
-                  </view>
-                </view>
-              </view>
-            </view>
-          </view>
-        </view>
-      </view>
-
-      <ShopInfo style="height: 100%;" v-else-if="shopType === 2"></ShopInfo>
-
-    </view>
-
-    <view v-if="shopType === 1" class="shop-buttom-money box-border-box" @click="openBuyCrad()">
-      <view class="shop-buttom-money-1 bgc-f flex-justify-space align-items-center pl-24 box-border-box pr-8 b-rad-200">
-        <view class="align-items-center">
-          <image class="gwc-img mr-36" src="@/static/img/order-food/gwc-img.png" mode="scaleToFill"></image>
-          <view class="shop-buttom-num bgc-FE6B2C fs-24 fc-f text-align-center">{{cartData.total_num}}</view>
-          <view class="align-items-baseline">
-            <view class="fw-600 fs-28 fc-3 mr-4">¥</view>
-            <view class="fw-600 fs-48 fc-3">{{cartData.total_price}}</view>
-          </view>
-        </view>
-
-        <view class="shop-buttom-money-2 text-align-center fc-f fs-32 fw-600 b-rad-200"
-          :class="cartData.total_num>0?'':'opacity-4'" @click.stop="toConfirmOrder()">去结算
-        </view>
-      </view>
-    </view>
-
-    <uni-popup ref="popupBuy" type="bottom" background-color="transparent" borderRadius='20px 20rpx 0 0'>
-      <view class="buy-card flex-index-css">
-        <view class="buy-card-top box-border-box plr-32 flex-justify-space align-items-center b-rad-20-20-0-0">
-          <view class="">
-            <span class="fs-32 fc-3 mr-12">已选商品</span>
-          </view>
-          <view class="fs-28 fw-400 fc-9 align-items-center" @click.stop="setShopIngDel">
-            <view class="">
-              <uni-icons type="trash" size="18" color="#999"></uni-icons>
-            </view>
-            <view class="fs-28 fw-400 fc-9">清空</view>
-          </view>
-        </view>
-        <view class="scroll-view-css bgc-ECECEC box-border-box car-scroll-box">
-          <view class="buy-card-item bgc-f b-rad-20 display-flex p-20 box-border-box"
-            v-for="(goods,i) in cartData.goods_list" :key="i">
-            <image class="goods_img" :src="goods.goods_image" mode="scaleToFill"></image>
-            <view class="flex-1 flex-direction flex-justify-space">
-              <view class="">
-                <view class="w-514 text-overflow-ellipsis-one fs-34 fw-600 mb-8">
-                  {{goods.goods_name}}
-                </view>
-                <view class="fc-6">
-                  {{goods.goods_attr}}
-                </view>
-              </view>
-              <view class="flex-justify-space">
-                <view class="">
-                  <span class="fs-24 fc-FB3D03 fw-400">¥</span>
-                  <span class="fs-40 fc-FB3D03 fw-b">{{goods.price}}</span>
-                </view>
-                <view class="display-flex align-items-center">
-                  <image class="wh-44" @click.stop="setShoppingSave(goods,2)"
-                    src="@/static/img/order-food/reduce-img.png" mode="">
-                  </image>
-                  <view class="right-only-right-2 text-align-center fs-28 fw-400">
-                    {{goods.goods_number}}
-                  </view>
-                  <image class="wh-44" src="/static/img/order-food/add-img.png" @click.stop="setShoppingSave(goods,1)"
-                    mode=""></image>
-                </view>
-              </view>
-            </view>
-          </view>
-          <en-blank navBackgroundColor='#ECECEC' v-if="cartData.goods_list.length<=0" message="快去选购商品吧!~"></en-blank>
-        </view>
-        <view class="pop-shop-buttom-money box-border-box" @click="openBuyCrad()">
-          <view
-            class="shop-buttom-money-1 bgc-f flex-justify-space align-items-center pl-24 box-border-box pr-8 b-rad-200">
-            <view class="align-items-center">
-              <image class="gwc-img mr-36" src="@/static/img/order-food/gwc-img.png" mode="scaleToFill">
-              </image>
-              <view class="shop-buttom-num bgc-FE6B2C fs-24 fc-f text-align-center">{{cartData.total_num}}
-              </view>
-              <view class="align-items-baseline">
-                <view class="fw-600 fs-28 fc-3 mr-4">¥</view>
-                <view class="fw-600 fs-48 fc-3">{{cartData.total_price}}</view>
-              </view>
-            </view>
-
-            <view class="shop-buttom-money-2 text-align-center fc-f fs-32 fw-600 b-rad-200"
-              :class="cartData.total_num>0?'':'opacity-4'" @click.stop="toConfirmOrder()">去结算
-            </view>
-          </view>
-        </view>
-      </view>
-    </uni-popup>
-  </view>
+	<view class="shop-index iPhone-bottom flex-direction box-border-box">
+
+		<image v-show="!navBgType" class="bg-img" src="@/static/img/order-food/shop-top.png" mode="aspectFill"
+			:class="scrollTop > newNavHeight?'z-4':'z-3'"></image>
+		<image v-show="navBgType" class="bg-img-type z-4" src="@/static/img/order-food/shop-top.png" mode="aspectFill"
+			:style="{height:newNavHeight+'rpx',opacity:opacity}"></image>
+
+		<newNav :leftShow="false" :textType='false' class="z-4 mb-32" @navHeight='navHeight'>
+			<view slot="textContentSlot" class="align-items-center flex-justify-end">
+				<view class="ss-box b-rad-50 mr-24 align-items-center flex-justify-center z-4" @click.stop="goSearch">
+					<image class="shop-search" src="@/static/img/order-food/shop-search.png" mode=""></image>
+				</view>
+				<view class="dd-box align-items-center flex-justify-center b-rad-200 mr-24 z-4" @click="goToOrder">
+					<image class="shp-list-img mr-8" src="@/static/img/order-food/shp-list.png" mode=""></image>
+					<view class="fs-28 fc-f">
+						订单
+					</view>
+				</view>
+			</view>
+		</newNav>
+
+		<view class="bgc-f box-border-box plr-32 mb-32 shop-info">
+			<view class="shop-info-box bgc-f box-border-box p-24 z-3 b-rad-20">
+				<view class="fs-40 fw-600 text-overflow-ellipsis">
+					{{shopsInfo.shop_name}}
+				</view>
+				<view class="fs-24 fw-400 fc-9 text-overflow-ellipsis-one pt-15" v-if="shopsInfo.notice">
+					公告:{{shopsInfo.notice || '暂无公告'}}
+				</view>
+			</view>
+		</view>
+
+		<view class="b-b-eee bgc-f box-border-box p-0-32-12 align-items-center flex-justify-space z-3 shop-type-box">
+			<view class="align-items-center shop-type-list">
+				<view class="shop-item fs-36 mb-8 mr-64" @click="seletShopType(item)"
+					:class="shopType === item.id?'fc-3 fw-600':'fc-6'" v-for="(item,i) in shopTypeList" :key="i">
+					{{item.name}}
+				</view>
+				<view class="shop-item-bs bgc-FF3333" :style="{left:shopTypeBsLeft+'rpx'}"></view>
+			</view>
+			<view class="align-items-center">
+				<image class="zh-icon mr-8" src="@/static/img/order-food/zh-icon.png" mode="aspectFill"></image>
+				<view class="fw-600 fs-32 fc-3">
+					桌号:{{table_number}}
+				</view>
+			</view>
+		</view>
+
+		<!-- <view class="bgc-f sticky-nav" :style="{ height: navBgType?`calc(100vh - ${newNavHeight}rpx - ${48}rpx)`:'auto'}"> -->
+		<view class="bgc-F7F8FA">
+			<view class="menu-box box-border-box align-items-flex-start" v-if="shopType === 1">
+
+				<view class="menu-box-left" :style="{top: newNavHeight + 'rpx'}">
+					<view class="menu-box-left-box pb-130 box-border-box"
+						:style="{height: menuLeftType?`calc(100vh - ${newNavHeight}rpx - ${68}rpx)`:''}">
+						<view class="menu-type-list fs-26 box-border-box align-items-center flex-justify-center"
+							v-for="(item,i) in categoryList" :key="i" @click="selectType(item)"
+							:class="type ===  item.category_id?'bgc-f fc-3 fw-600':'fc-6 fw-400'"
+							:id="'left-scroll'+ item.category_id">
+							{{item.name}}
+							<view class="menu-type-num fc-f" v-show="item.num > 0">{{item.num > 99?'99+':item.num}}
+							</view>
+						</view>
+					</view>
+				</view>
+
+				<view class="menu-box-only bgc-f pb-130 box-border-box">
+					<view class="" v-for="(item,i) in goodsList" :key="i" :id="'scroll'+ item.type">
+						<view class="fs-28 fw-600 fc-3 sticky-nav bgc-f p-20 box-border-box"
+							:style="{top: newNavHeight + 'rpx'}">
+							{{item.name}}
+						</view>
+						<view class="menu-list flex-justify-space box-border-box" v-for="(info,k) in item.list" :key="k"
+							:id="'goods_id'+ info.goods_id">
+							<image class="flex-shrink0 goods_img" :src="info.goods_image" mode="scaleToFill"></image>
+							<view class="menu-list-right flex-direction flex-justify-space">
+								<view class="mb-8">
+									<view class="mb-4 goods-name text-overflow-ellipsis fs-32 fw-600">
+										{{info.goods_name}}
+									</view>
+									<view class="text-overflow-ellipsis-one fw-400 fc-9 fs-24 mb-2 goods-name"
+										v-if="info.spec_type == 1">
+										{{info.goods_desc?info.goods_desc:''}}
+									</view>
+								</view>
+								<view class="flex-justify-space align-items-flex-end">
+									<view class="">
+										<span class="fs-24 fw-400 fc-FB3D03">¥</span>
+										<span
+											class="fs-40 fw-b fc-FB3D03">{{info.seckill_money>0?info.seckill_money:info.price}}</span>
+									</view>
+									<view class="display-flex align-items-center" v-if="info.spec_type == 1">
+										<image v-show="info.num > 0" class="wh-44" @click="addred(1,info)"
+											src="@/static/img/order-food/reduce-img.png" mode=""></image>
+										<view v-show="info.num > 0"
+											class="right-only-right-2 text-align-center fs-28 fw-400">{{info.num}}
+										</view>
+										<image class="wh-44" src="@/static/img/order-food/add-img.png"
+											@click="addred(2,info)" mode="">
+										</image>
+									</view>
+									<view v-else class="right-only-right text-align-center b-rad-200"
+										@click="addred(3,info)">
+										<view class="fw-600 fs-28 fc-f">
+											选规格
+										</view>
+										<view class="selectedNum" v-if="info.num>0">
+											{{info.num}}
+										</view>
+									</view>
+								</view>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+
+			<ShopInfo style="height: 100%;" v-else-if="shopType === 2"></ShopInfo>
+
+		</view>
+
+		<view v-if="shopType === 1" class="shop-buttom-money box-border-box" @click="openBuyCrad()">
+			<view
+				class="shop-buttom-money-1 bgc-f flex-justify-space align-items-center pl-24 box-border-box pr-8 b-rad-200">
+				<view class="align-items-center">
+					<image class="gwc-img mr-36" src="@/static/img/order-food/gwc-img.png" mode="scaleToFill"></image>
+					<view class="shop-buttom-num bgc-FE6B2C fs-24 fc-f text-align-center">{{cartData.total_num}}</view>
+					<view class="align-items-baseline">
+						<view class="fw-600 fs-28 fc-3 mr-4">¥</view>
+						<view class="fw-600 fs-48 fc-3">{{cartData.total_goods_money}}</view>
+					</view>
+				</view>
+
+				<view class="shop-buttom-money-2 text-align-center fc-f fs-32 fw-600 b-rad-200"
+					:class="cartData.total_num>0?'':'opacity-4'" @click.stop="toConfirmOrder()">去结算
+				</view>
+			</view>
+		</view>
+
+		<uni-popup ref="popupBuy" type="bottom" background-color="transparent" borderRadius='20px 20rpx 0 0'>
+			<view class="buy-card flex-index-css">
+				<view class="buy-card-top box-border-box plr-32 flex-justify-space align-items-center b-rad-20-20-0-0">
+					<view class="">
+						<span class="fs-32 fc-3 mr-12">已选商品</span>
+					</view>
+					<view class="fs-28 fw-400 fc-9 align-items-center" @click.stop="setShopIngDel">
+						<view class="">
+							<uni-icons type="trash" size="18" color="#999"></uni-icons>
+						</view>
+						<view class="fs-28 fw-400 fc-9">清空</view>
+					</view>
+				</view>
+				<view class="scroll-view-css bgc-ECECEC box-border-box car-scroll-box">
+					<view class="buy-card-item bgc-f b-rad-20 display-flex p-20 box-border-box"
+						v-for="(goods,i) in cartData.goods_list" :key="i">
+						<image class="goods_img" :src="goods.goods_image" mode="scaleToFill"></image>
+						<view class="flex-1 flex-direction flex-justify-space">
+							<view class="">
+								<view class="w-514 text-overflow-ellipsis-one fs-34 fw-600 mb-8">
+									{{goods.goods_name}}
+								</view>
+								<view class="fc-6">
+									{{goods.goods_attr}}
+								</view>
+							</view>
+							<view class="flex-justify-space">
+								<view class="">
+									<span class="fs-24 fc-FB3D03 fw-400">¥</span>
+									<span class="fs-40 fc-FB3D03 fw-b">{{goods.price}}</span>
+								</view>
+								<view class="display-flex align-items-center">
+									<image class="wh-44" @click.stop="setShoppingSave(goods,2)"
+										src="@/static/img/order-food/reduce-img.png" mode="">
+									</image>
+									<view class="right-only-right-2 text-align-center fs-28 fw-400">
+										{{goods.goods_number}}
+									</view>
+									<image class="wh-44" src="/static/img/order-food/add-img.png"
+										@click.stop="setShoppingSave(goods,1)" mode=""></image>
+								</view>
+							</view>
+						</view>
+					</view>
+					<en-blank navBackgroundColor='#ECECEC' v-if="cartData.goods_list.length<=0"
+						message="快去选购商品吧!~"></en-blank>
+				</view>
+				<view class="pop-shop-buttom-money box-border-box" @click="openBuyCrad()">
+					<view
+						class="shop-buttom-money-1 bgc-f flex-justify-space align-items-center pl-24 box-border-box pr-8 b-rad-200">
+						<view class="align-items-center">
+							<image class="gwc-img mr-36" src="@/static/img/order-food/gwc-img.png" mode="scaleToFill">
+							</image>
+							<view class="shop-buttom-num bgc-FE6B2C fs-24 fc-f text-align-center">{{cartData.total_num}}
+							</view>
+							<view class="align-items-baseline">
+								<view class="fw-600 fs-28 fc-3 mr-4">¥</view>
+								<view class="fw-600 fs-48 fc-3">{{cartData.total_goods_money}}</view>
+							</view>
+						</view>
+
+						<view class="shop-buttom-money-2 text-align-center fc-f fs-32 fw-600 b-rad-200"
+							:class="cartData.total_num>0?'':'opacity-4'" @click.stop="toConfirmOrder()">去结算
+						</view>
+					</view>
+				</view>
+			</view>
+		</uni-popup>
+	</view>
 </template>
 
 <script>
-  import newMenu from './shop-mod/new-menu.vue';
-  import ShopInfo from './shop-mod/info.vue';
-  import tools from "@/service/tools";
-  import EnBlank from "@/components/en-utils/en-blank/en-blank";
-  import cartStore from '@/utils/cartStore.js';
-  import {
-    getGoodsCategory,
-    getGoodsGoods
-  } from '@/api/goods.js'
-  import {
-    receiveCoupon
-  } from "@/api/coupon.js"
-  import {
-    shopInfo
-  } from "@/api/shop.js"
-  import {
-    getDeliveryMoney
-  } from "@/api/common";
-  import {
-    getShopIngList,
-    setShopIngDel,
-    shoppingSave
-  } from "@/api/shopping";
-  export default {
-    components: {
-      newMenu,
-      ShopInfo,
-      EnBlank
-    },
-    data() {
-      return {
-        domHeigjt: 0,
-        shopTypeList: [{
-          name: "点单",
-          id: 1
-        }, {
-          name: "商家",
-          id: 2
-        }],
-        table_number: '',
-        shopType: 1, //组件类型
-        shopTypeBsLeft: 12,
-        shop_id: '',
-        operate_id: '',
-        shopsInfo: {},
-        cartData: {
-          total_price: 0,
-          total_num: 0,
-          total_goods_money: 0,
-          pack_price: 0,
-          must_category: 0,
-          is_place_order: 0,
-          err_msg: 0,
-          goods_list: [],
-        },
-        isAjax: false,
-        newNavHeight: '',
-        navBgType: false,
-        menuLeftType: false,
-        scrollTop: 0,
-        opacity: 0,
-        heightOne: '',
-        heightTwo: '',
-        topHeight: '',
-        idMark: '', //滚动自适应参数
-        idMarkTwo: '', //滚动自适应参数
-        type: '', //默认分类标识
-        categoryList: [],
-        goodsList: [],
-        cartData: {
-          total_price: 0,
-          total_num: 0,
-          goods_list: [],
-        }
-      }
-    },
-    onShow() {
-      this.getShopIngList();
-    },
-    onLoad(e) {
-      cartStore.setShopId();
-      this.getshopInfo();
-    },
-    mounted() {},
-    onReachBottom(e) {},
-    // 监听页面滚动
-    onPageScroll(e) {
-      // e.scrollTop 获取滚动条距离页面顶部的距离
-      this.scrollTop = e.scrollTop
-      this.opacity = (Number(this.scrollTop) - 30)
-      // 可以根据滚动位置执行相应逻辑
-      if (e.scrollTop > 25) {
-        this.navBgType = true
-      } else {
-        this.navBgType = false
-      }
-      if (e.scrollTop > (Number(this.newNavHeight) - 4)) {
-        this.menuLeftType = true
-      } else {
-        this.menuLeftType = false
-      }
-    },
-    methods: {
-      shopInfo() {
-        // 获取商家详情
-        shopInfo().then((res) => {
-          if (res.code === 1) {
-            this.shopsInfo = res.data
-          }
-        })
-      },
-      getGoodsCategory() {
-        //获取商家分类
-        getGoodsCategory().then((res) => {
-          if (res.code === 1) {
-            this.categoryList = res.data
-            this.type = res.data[0].category_id
-          }
-        })
-      },
-      getGoodsGoods() {
-        //获取商家商品列表
-        getGoodsGoods().then((res) => {
-          if (res.code === 1) {
-            // 初始化商品列表
-            this.goodsList = res.data
-            // 从购物车数据中回显每个商品的数量
-            this.updateGoodsNumFromCart()
-          }
-        })
-      },
-      getShopIngList() {
-        // 获取购物车列表
-        const shopCart = cartStore.getShopCart(this.shop_id);
-        if (shopCart) {
-          this.cartData = {
-            ...this.cartData,
-            total_price: shopCart.total_price,
-            total_num: shopCart.total_num,
-            goods_list: shopCart.goods_list
-          };
-          // 同步更新商品列表中的数量
-          this.updateGoodsNumFromCart();
-        }
-      },
-      getshopInfo() {
-        this.table_number = uni.getStorageSync('table_number')
-        this.shopInfo()
-        this.getGoodsCategory()
-        this.getGoodsGoods()
-      },
-      updateGoodsNumFromCart() {
-        // 从购物车数据同步商品数量
-        if (!this.goodsList) return;
-
-        const shopCart = cartStore.getShopCart(this.shop_id);
-        if (!shopCart) return;
-
-        // 创建商品数量映射
-        const goodsQuantityMap = {};
-        shopCart.goods_list.forEach(item => {
-          if (!goodsQuantityMap[item.goods_id]) {
-            goodsQuantityMap[item.goods_id] = 0;
-          }
-          goodsQuantityMap[item.goods_id] += item.goods_number;
-        });
-
-        // 更新商品列表数量
-        this.goodsList.forEach(category => {
-          if (category.list && category.list.length > 0) {
-            category.list.forEach(goods => {
-              goods.num = goodsQuantityMap[goods.goods_id] || 0;
-            });
-          }
-        });
-
-        // 更新分类列表中的商品数量
-        this.updateCategoryNum()
-      },
-      updateCategoryNum() {
-        // 更新分类的商品总数
-        if (!this.categoryList || !this.goodsList) {
-          return
-        }
-
-        this.categoryList.forEach(categoryItem => {
-          // 找到对应的商品分类
-          const goodsCategory = this.goodsList.find(
-            category => category.type === categoryItem.category_id
-          )
-
-          if (goodsCategory && goodsCategory.list) {
-            // 计算该分类下所有商品的总数量
-            const totalNum = goodsCategory.list.reduce((sum, goods) => {
-              return sum + (goods.num || 0)
-            }, 0)
-            categoryItem.num = totalNum
-          } else {
-            categoryItem.num = 0
-          }
-        })
-      },
-      goToOrder() {
-        uni.navigateTo({
-          url: 'pages/order/index'
-        })
-      },
-      goSearch() {
-        uni.navigateTo({
-          url: 'pages/index/search-record'
-        })
-      },
-      selectType(item, itemTwo) {
-        if (this.type != item.category_id) {
-          this.type = item.category_id;
-          this.idMark = 'scroll' + item.category_id
-
-          // 立即更新
-          this.$forceUpdate();
-
-          // 延迟执行滚动
-          setTimeout(() => {
-            this.scrollToCategorySimple(item.category_id);
-          }, 100);
-        }
-      },
-
-      // 滚动方法
-      scrollToCategorySimple(type) {
-        const query = uni.createSelectorQuery();
-        const selector = `#scroll${type}`;
-        uni.pageScrollTo({
-          selector: selector,
-          duration: 300,
-        });
-        return
-        let targetScrollTop = 0
-        query.select('.shop-info').boundingClientRect(rect => {
-          console.log('商家详情', rect);
-          targetScrollTop += rect.height
-        })
-        query.select('.shop-type-box').boundingClientRect(rect => {
-          console.log('详情切换', rect);
-          targetScrollTop += rect.height + this.newNavHeight
-          console.log('固定上部分位置', targetScrollTop);
-        })
-        query.select(selector).boundingClientRect(rect => {
-          console.log('id找到元素,top:', rect);
-          uni.pageScrollTo({
-            scrollTop: targetScrollTop,
-            duration: 300,
-            success: () => {
-              console.log('滚动完成');
-            }
-          });
-        }).exec();
-      },
-      addred(type, item) {
-        if (type === 1) {
-          // 减
-          --item.num;
-          if (item.num >= 0) {
-            this.shoppingSave(item, item.num)
-          }
-        } else if (type === 2) {
-          // 加
-          ++item.num;
-          this.shoppingSave(item, item.num)
-        } else if (type === 3) {
-          // 选规格
-          uni.navigateTo({
-            url: `pages-takeout/new-specs-info?goods_id=${item.goods_id}&category_id=${item.category_id}&shop_id=${this.shop_id}`
-          })
-        }
-      },
-      shoppingSave(item, num) {
-        // 前端处理购物车
-        if (num <= 0) {
-          // 数量为0,移除商品
-          cartStore.removeFromCart(item.goods_id, item.goods_spec || []);
-        } else {
-          // 更新商品数量
-          const success = cartStore.updateQuantity(
-            item.goods_id,
-            item.goods_spec || [],
-            num
-          );
-          if (!success) {
-            // 如果更新失败,尝试添加新商品
-            cartStore.addToCart(item, item.goods_spec || [], num);
-          }
-        }
-        // 更新页面数据
-        this.getShopIngList();
-        this.$forceUpdate();
-      },
-      findGoodsInList(goodsId) {
-        // 在商品列表中查找指定商品
-        for (let category of this.goodsList) {
-          if (category.list) {
-            const goods = category.list.find(item => item.goods_id === goodsId)
-            if (goods) {
-              return goods
-            }
-          }
-        }
-        return null
-      },
-      navHeight(e) {
-        this.newNavHeight = e
-      },
-      mustBut() {
-        // 未点必选品
-        const item = {
-          type: this.cartData.must_category
-        }
-        this.$refs.goodsMenu.selectType(item)
-      },
-      setShopIngDel() {
-        uni.showModal({
-          title: '提示',
-          content: '是否清除购物车商品?',
-          success: (res) => {
-            if (res.confirm) {
-              cartStore.clearCurrentShopCart();
-              this.getShopIngList();
-              this.$refs.popupBuy.close();
-              uni.showToast({
-                title: '已清空购物车',
-                icon: 'success'
-              });
-            }
-          }
-        });
-      },
-      setShoppingSave(item, type) {
-        if (type === 1) {
-          // 加
-          item.goods_number = item.goods_number + 1
-        } else {
-          // 减
-          item.goods_number = item.goods_number - 1
-        }
-
-        if (item.goods_number <= 0) {
-          // 数量为0,移除商品
-          cartStore.removeFromCart(item.goods_id, item.goods_spec || []);
-        } else {
-          // 更新商品数量
-          cartStore.updateQuantity(
-            item.goods_id,
-            item.goods_spec || [],
-            item.goods_number
-          );
-        }
-        // 更新页面数据
-        this.getShopIngList();
-      },
-      setCartData(cartData) {
-        this.cartData = cartData
-        this.getDeliveryMoney()
-      },
-      getDeliveryMoney() {
-        getDeliveryMoney({
-          'school_id': this.operate_id,
-          'shop_id': this.shop_id,
-        }).then(res => {
-          if (res.code === 1) {
-            this.delivery_money = res.data.delivery_money * 1
-          }
-        })
-      },
-      toBack() {
-        tools.leftClick()
-      },
-      getDomH(num) {
-        this.$nextTick(() => {
-          let info = uni.createSelectorQuery().select('#shopInfoBox');
-          info.boundingClientRect((data) => {
-            if (num === 1) {
-              this.domHeigjt = data.height + 72
-            } else {
-              this.domHeigjt = data.height + 72 + 48
-            }
-          }).exec()
-        })
-        // setTimeout(() => {
-
-        // }, 500)
-      },
-      seletShopType(item) {
-        if (this.shopType != item.id) {
-          this.shopType = item.id;
-          if (this.shopType == 1) {
-            this.shopTypeBsLeft = 12
-          } else if (this.shopType == 2) {
-            this.shopTypeBsLeft = 150
-          } else {
-            this.shopTypeBsLeft = 160 * 2
-          }
-        }
-      },
-      openBuyCrad() {
-        this.$refs.popupBuy.open()
-      },
-      createOrder() {
-        this.$refs.popupBuy.close()
-      },
-      openCoupon() {
-        this.$refs.popupCoupon.open()
-      },
-      closeCoupon() {
-        this.$refs.popupCoupon.close()
-      },
-      toConfirmOrder() {
-        console.log(this.cartData,'11111111111');
-        return
-        uni.navigateTo({
-          url: '/pages-takeout/goods-order?shop_id=' + this.shop_id
-        })
-      },
-      shopInfo() {
-        const operate_id = uni.getStorageSync('operate_id')
-        shopInfo({
-          operate_id: operate_id,
-          shop_id: this.shop_id
-        }).then((res) => {
-          if (res.code == 1) {
-            this.shopsInfo = res.data
-          } else {
-            tools.error(res.msg)
-            setTimeout(() => {
-              uni.navigateBack({
-                delta: 1
-              })
-            }, 1500)
-          }
-        })
-      }
-    },
-  }
+	import newMenu from './shop-mod/new-menu.vue';
+	import ShopInfo from './shop-mod/info.vue';
+	import tools from "@/service/tools";
+	import EnBlank from "@/components/en-utils/en-blank/en-blank";
+	import cartStore from '@/utils/cartStore.js';
+	import {
+		getGoodsCategory,
+		getGoodsGoods
+	} from '@/api/goods.js'
+	import {
+		receiveCoupon
+	} from "@/api/coupon.js"
+	import {
+		shopInfo
+	} from "@/api/shop.js"
+	import {
+		getDeliveryMoney
+	} from "@/api/common";
+	import {
+		getShopIngList,
+		setShopIngDel,
+		shoppingSave
+	} from "@/api/shopping";
+	export default {
+		components: {
+			newMenu,
+			ShopInfo,
+			EnBlank
+		},
+		data() {
+			return {
+				domHeigjt: 0,
+				shopTypeList: [{
+					name: "点单",
+					id: 1
+				}, {
+					name: "商家",
+					id: 2
+				}],
+				table_number: '',
+				shopType: 1, //组件类型
+				shopTypeBsLeft: 12,
+				shop_id: '',
+				operate_id: '',
+				shopsInfo: {},
+				// cartData: {
+				// 	total_price: 0,
+				// 	total_num: 0,
+				// 	total_goods_money: 0,
+				// 	pack_price: 0,
+				// 	must_category: 0,
+				// 	is_place_order: 0,
+				// 	err_msg: 0,
+				// 	goods_list: [],
+				// },
+				isAjax: false,
+				newNavHeight: '',
+				navBgType: false,
+				menuLeftType: false,
+				scrollTop: 0,
+				opacity: 0,
+				heightOne: '',
+				heightTwo: '',
+				topHeight: '',
+				idMark: '', //滚动自适应参数
+				idMarkTwo: '', //滚动自适应参数
+				type: '', //默认分类标识
+				categoryList: [],
+				goodsList: [],
+				cartData: {
+					total_price: 0,
+					total_num: 0,
+					pack_price: 0,
+					total_goods_money: 0,
+					goods_list: [],
+				}
+			}
+		},
+		onShow() {
+			this.getShopIngList();
+		},
+		onLoad(e) {
+			cartStore.setShopId();
+			this.getshopInfo();
+		},
+		mounted() {},
+		onReachBottom(e) {},
+		// 监听页面滚动
+		onPageScroll(e) {
+			// e.scrollTop 获取滚动条距离页面顶部的距离
+			this.scrollTop = e.scrollTop
+			this.opacity = (Number(this.scrollTop) - 30)
+			// 可以根据滚动位置执行相应逻辑
+			if (e.scrollTop > 25) {
+				this.navBgType = true
+			} else {
+				this.navBgType = false
+			}
+			if (e.scrollTop > (Number(this.newNavHeight) - 4)) {
+				this.menuLeftType = true
+			} else {
+				this.menuLeftType = false
+			}
+		},
+		methods: {
+			shopInfo() {
+				// 获取商家详情
+				shopInfo().then((res) => {
+					if (res.code === 1) {
+						this.shopsInfo = res.data
+					}
+				})
+			},
+			getGoodsCategory() {
+				//获取商家分类
+				getGoodsCategory().then((res) => {
+					if (res.code === 1) {
+						this.categoryList = res.data
+						this.type = res.data[0].category_id
+					}
+				})
+			},
+			getGoodsGoods() {
+				//获取商家商品列表
+				getGoodsGoods().then((res) => {
+					if (res.code === 1) {
+						// 初始化商品列表
+						this.goodsList = res.data
+						// 从购物车数据中回显每个商品的数量
+						this.updateGoodsNumFromCart()
+					}
+				})
+			},
+			getShopIngList() {
+				// 获取购物车列表
+				const shopCart = cartStore.getShopCart(this.shop_id);
+				if (shopCart) {
+					this.cartData = {
+						...this.cartData,
+						total_price: shopCart.total_price,
+						total_num: shopCart.total_num,
+						pack_price: shopCart.pack_price, //配送费总额
+						total_goods_money: shopCart.total_goods_money, //商品价格总额
+						goods_list: shopCart.goods_list
+					};
+					// 同步更新商品列表中的数量
+					this.updateGoodsNumFromCart();
+				}
+			},
+			getshopInfo() {
+				this.table_number = uni.getStorageSync('table_number')
+				this.shopInfo()
+				this.getGoodsCategory()
+				this.getGoodsGoods()
+			},
+			updateGoodsNumFromCart() {
+				// 从购物车数据同步商品数量
+				if (!this.goodsList) return;
+
+				const shopCart = cartStore.getShopCart(this.shop_id);
+				if (!shopCart) return;
+
+				// 创建商品数量映射
+				const goodsQuantityMap = {};
+				const cartGoodsPackPriceMap = {}; // 存储商品配送费信息
+
+				shopCart.goods_list.forEach(item => {
+					if (!goodsQuantityMap[item.goods_id]) {
+						goodsQuantityMap[item.goods_id] = 0;
+						cartGoodsPackPriceMap[item.goods_id] = 0;
+					}
+					// 累加同一个商品不同规格的数量
+					goodsQuantityMap[item.goods_id] += item.goods_number;
+					// 累加同一个商品不同规格的配送费(按数量计算)
+					cartGoodsPackPriceMap[item.goods_id] += parseFloat(item.pack_price || 0) * (item
+						.goods_number || 0);
+				});
+
+				// 更新商品列表数量
+				this.goodsList.forEach(category => {
+					if (category.list && category.list.length > 0) {
+						category.list.forEach(goods => {
+							goods.num = goodsQuantityMap[goods.goods_id] || 0;
+						});
+					}
+				});
+
+				// 更新分类列表中的商品数量
+				this.updateCategoryNum()
+			},
+			updateCategoryNum() {
+				// 更新分类的商品总数
+				if (!this.categoryList || !this.goodsList) {
+					return
+				}
+
+				this.categoryList.forEach(categoryItem => {
+					// 找到对应的商品分类
+					const goodsCategory = this.goodsList.find(
+						category => category.type === categoryItem.category_id
+					)
+
+					if (goodsCategory && goodsCategory.list) {
+						// 计算该分类下所有商品的总数量
+						const totalNum = goodsCategory.list.reduce((sum, goods) => {
+							return sum + (goods.num || 0)
+						}, 0)
+						categoryItem.num = totalNum
+					} else {
+						categoryItem.num = 0
+					}
+				})
+			},
+			goToOrder() {
+				uni.navigateTo({
+					url: 'pages/order/index'
+				})
+			},
+			goSearch() {
+				uni.navigateTo({
+					url: 'pages/index/search-record'
+				})
+			},
+			selectType(item, itemTwo) {
+				if (this.type != item.category_id) {
+					this.type = item.category_id;
+					this.idMark = 'scroll' + item.category_id
+
+					// 立即更新
+					this.$forceUpdate();
+
+					// 延迟执行滚动
+					setTimeout(() => {
+						this.scrollToCategorySimple(item.category_id);
+					}, 100);
+				}
+			},
+
+			// 滚动方法
+			scrollToCategorySimple(type) {
+				const query = uni.createSelectorQuery();
+				const selector = `#scroll${type}`;
+				uni.pageScrollTo({
+					selector: selector,
+					duration: 300,
+				});
+				return
+				let targetScrollTop = 0
+				query.select('.shop-info').boundingClientRect(rect => {
+					console.log('商家详情', rect);
+					targetScrollTop += rect.height
+				})
+				query.select('.shop-type-box').boundingClientRect(rect => {
+					console.log('详情切换', rect);
+					targetScrollTop += rect.height + this.newNavHeight
+					console.log('固定上部分位置', targetScrollTop);
+				})
+				query.select(selector).boundingClientRect(rect => {
+					console.log('id找到元素,top:', rect);
+					uni.pageScrollTo({
+						scrollTop: targetScrollTop,
+						duration: 300,
+						success: () => {
+							console.log('滚动完成');
+						}
+					});
+				}).exec();
+			},
+			addred(type, item) {
+				if (type === 1) {
+					// 减
+					--item.num;
+					if (item.num >= 0) {
+						this.shoppingSave(item, item.num)
+					}
+				} else if (type === 2) {
+					// 加
+					++item.num;
+					this.shoppingSave(item, item.num)
+				} else if (type === 3) {
+					// 选规格
+					uni.navigateTo({
+						url: `pages-takeout/new-specs-info?goods_id=${item.goods_id}&category_id=${item.category_id}&shop_id=${this.shop_id}`
+					})
+				}
+			},
+			shoppingSave(item, num) {
+				// 前端处理购物车
+				// const goodsData = {
+				// 	goods_id: item.goods_id,
+				// 	goods_name: item.goods_name,
+				// 	goods_image: item.goods_image,
+				// 	category_id: item.category_id,
+				// 	seckill_money: item.seckill_money || 0,
+				// 	price: item.price || 0,
+				// 	pack_price: item.pack_price || 0, // 添加配送费
+				// 	spec_type: item.spec_type || 1,
+				// 	goods_desc: item.goods_desc || '',
+				// 	line_price: item.line_price || '',
+				// 	sales: item.sales || 0
+				// };
+				if (num <= 0) {
+					// 数量为0,移除商品
+					cartStore.removeFromCart(item.goods_id, item.goods_spec || []);
+				} else {
+					// 更新商品数量
+					const success = cartStore.updateQuantity(
+						item.goods_id,
+						item.goods_spec || [],
+						num
+					);
+					if (!success) {
+						// 如果更新失败,尝试添加新商品
+						cartStore.addToCart(item, item.goods_spec || [], num);
+					}
+				}
+				// 更新页面数据
+				this.getShopIngList();
+				this.$forceUpdate();
+			},
+			findGoodsInList(goodsId) {
+				// 在商品列表中查找指定商品
+				for (let category of this.goodsList) {
+					if (category.list) {
+						const goods = category.list.find(item => item.goods_id === goodsId)
+						if (goods) {
+							return goods
+						}
+					}
+				}
+				return null
+			},
+			navHeight(e) {
+				this.newNavHeight = e
+			},
+			mustBut() {
+				// 未点必选品
+				const item = {
+					type: this.cartData.must_category
+				}
+				this.$refs.goodsMenu.selectType(item)
+			},
+			setShopIngDel() {
+				uni.showModal({
+					title: '提示',
+					content: '是否清除购物车商品?',
+					success: (res) => {
+						if (res.confirm) {
+							cartStore.clearCurrentShopCart();
+							this.getShopIngList();
+							this.$refs.popupBuy.close();
+							uni.showToast({
+								title: '已清空购物车',
+								icon: 'success'
+							});
+						}
+					}
+				});
+			},
+			setShoppingSave(item, type) {
+				if (type === 1) {
+					// 加
+					item.goods_number = item.goods_number + 1
+				} else {
+					// 减
+					item.goods_number = item.goods_number - 1
+				}
+
+				if (item.goods_number <= 0) {
+					// 数量为0,移除商品
+					cartStore.removeFromCart(item.goods_id, item.goods_spec || []);
+				} else {
+					// 更新商品数量
+					cartStore.updateQuantity(
+						item.goods_id,
+						item.goods_spec || [],
+						item.goods_number
+					);
+				}
+				// 更新页面数据
+				this.getShopIngList();
+			},
+			setCartData(cartData) {
+				this.cartData = cartData
+				this.getDeliveryMoney()
+			},
+			getDeliveryMoney() {
+				getDeliveryMoney({
+					'school_id': this.operate_id,
+					'shop_id': this.shop_id,
+				}).then(res => {
+					if (res.code === 1) {
+						this.delivery_money = res.data.delivery_money * 1
+					}
+				})
+			},
+			toBack() {
+				tools.leftClick()
+			},
+			getDomH(num) {
+				this.$nextTick(() => {
+					let info = uni.createSelectorQuery().select('#shopInfoBox');
+					info.boundingClientRect((data) => {
+						if (num === 1) {
+							this.domHeigjt = data.height + 72
+						} else {
+							this.domHeigjt = data.height + 72 + 48
+						}
+					}).exec()
+				})
+				// setTimeout(() => {
+
+				// }, 500)
+			},
+			seletShopType(item) {
+				if (this.shopType != item.id) {
+					this.shopType = item.id;
+					if (this.shopType == 1) {
+						this.shopTypeBsLeft = 12
+					} else if (this.shopType == 2) {
+						this.shopTypeBsLeft = 150
+					} else {
+						this.shopTypeBsLeft = 160 * 2
+					}
+				}
+			},
+			openBuyCrad() {
+				this.$refs.popupBuy.open()
+			},
+			createOrder() {
+				this.$refs.popupBuy.close()
+			},
+			openCoupon() {
+				this.$refs.popupCoupon.open()
+			},
+			closeCoupon() {
+				this.$refs.popupCoupon.close()
+			},
+			toConfirmOrder() {
+				// console.log(this.cartData, '11111111111');
+				// return
+				uni.navigateTo({
+					url: '/pages-takeout/goods-order'
+				})
+			},
+			shopInfo() {
+				const operate_id = uni.getStorageSync('operate_id')
+				shopInfo({
+					operate_id: operate_id,
+					shop_id: this.shop_id
+				}).then((res) => {
+					if (res.code == 1) {
+						this.shopsInfo = res.data
+					} else {
+						tools.error(res.msg)
+						setTimeout(() => {
+							uni.navigateBack({
+								delta: 1
+							})
+						}, 1500)
+					}
+				})
+			}
+		},
+	}
 </script>
 
 <style scoped lang="scss">
-  .car-scroll-box {
-    padding: 12rpx 24rpx calc(env(safe-area-inset-bottom) + 48rpx);
-  }
-
-  .zh-icon {
-    width: 32rpx;
-    height: 32rpx;
-  }
-
-  .shp-list-img {
-    width: 40rpx;
-    height: 40rpx;
-  }
-
-  .dd-box {
-    width: 144rpx;
-    padding: 12rpx 0;
-    background: rgba(0, 0, 0, 0.14);
-  }
-
-  .ss-box {
-    width: 64rpx;
-    height: 64rpx;
-    background: rgba(0, 0, 0, 0.14);
-  }
-
-  .shop-search {
-    width: 40rpx;
-    height: 40rpx;
-  }
-
-  .wh-44 {
-    width: 44rpx;
-    height: 44rpx;
-  }
-
-  .blank-text {
-    line-height: 32vh;
-  }
-
-  .box-title {
-    position: relative;
-  }
-
-  .box-close {
-    position: absolute;
-    right: 22rpx;
-  }
-
-  .pop-coupon {
-    width: 100%;
-    height: 42vh;
-    background-color: #F5F4F9;
-    border-radius: 24rpx 24rpx 0rpx 0rpx;
-    padding-top: 32rpx !important;
-    display: flex;
-    flex-direction: column;
-  }
-
-  .item-right {
-    padding: 24rpx;
-    box-sizing: border-box;
-    border-radius: 20rpx 0 0 20rpx;
-    position: relative;
-  }
-
-  .item-hr {
-    width: 0px;
-    height: auto;
-    border-right: 1rpx dashed #FB7850;
-  }
-
-  .item-hr-two {
-    width: 0px;
-    height: auto;
-    border-right: 1rpx dashed #999;
-  }
-
-  .item-left {
-    width: 220rpx;
-    height: auto;
-    padding: 20rpx 24rpx;
-    box-sizing: border-box;
-    position: relative;
-    border-radius: 0 20rpx 20rpx 0;
-  }
-
-  .but-box {
-    width: 152rpx;
-    height: 52rpx;
-    line-height: 52rpx;
-    text-align: center;
-    background: linear-gradient(225deg, #FB3D03 0%, #FF6901 100%);
-    border-radius: 200rpx;
-  }
-
-  .ball {
-    width: 24rpx;
-    height: 24rpx;
-    border-radius: 50%;
-    position: absolute;
-    top: -12rpx;
-    left: -12rpx;
-    background: #F5F5F5;
-    z-index: 2;
-  }
-
-  .ball-two {
-    width: 24rpx;
-    height: 24rpx;
-    border-radius: 50%;
-    position: absolute;
-    background: #F5F5F5;
-    z-index: 10;
-    bottom: -12rpx;
-    left: -12rpx;
-  }
-
-  .shop-index {
-    width: 100%;
-    min-height: 100vh;
-    height: auto;
-    position: relative;
-  }
-
-  .right-only-right-red {
-    width: 44rpx;
-    height: 44rpx;
-    line-height: 40rpx;
-    border-radius: 12rpx;
-    border: 1rpx solid #41ABF5;
-    color: #41ABF5;
-  }
-
-  .right-only-right-add {
-    width: 44rpx;
-    height: 44rpx;
-    line-height: 40rpx;
-    background: linear-gradient(117deg, #57CAFF 0%, #41ABF5 100%);
-    border-radius: 12rpx;
-  }
-
-  .right-only-right-2 {
-    min-width: 50rpx;
-  }
-
-  .w-514 {
-    width: 514rpx;
-  }
-
-  .bg-img {
-    position: fixed;
-    top: 0;
-    left: 0;
-    width: 100%;
-    height: 300rpx;
-    transition: linear .3s all;
-    // height: 300rpx;
-  }
-
-  .bg-img-type {
-    position: fixed;
-    top: 0;
-    left: 0;
-    width: 100%;
-    // opacity: 100;
-    transition: linear .3s all;
-  }
-
-  .mb-box {
-    position: absolute;
-    top: 0;
-    left: 0;
-    width: 100%;
-    height: 300rpx;
-    z-index: -1;
-  }
-
-
-  .nav-img {
-    width: 56rpx;
-    height: 56rpx;
-  }
-
-  .shop-buttom-money {
-    width: 100%;
-    // height: 140rpx;
-    background: rgba(255, 255, 255, 0.8);
-    padding-left: 24rpx;
-    padding-right: 24rpx;
-    padding-bottom: calc(env(safe-area-inset-bottom) + 12rpx);
-    padding-top: 22rpx;
-    // padding: 20rpx 24rpx;
-    position: fixed;
-    left: 0;
-    bottom: 0;
-    z-index: 5;
-  }
-
-  .pop-shop-buttom-money {
-    width: 100%;
-    // height: 140rpx;
-    background: #ECECEC;
-    padding-left: 24rpx;
-    padding-right: 24rpx;
-    padding-bottom: calc(env(safe-area-inset-bottom) + 12rpx);
-    padding-top: 22rpx;
-    position: fixed;
-    left: 0;
-    bottom: 0;
-    z-index: 5;
-  }
-
-  .shop-buttom-num {
-    width: 32rpx;
-    height: 32rpx;
-    line-height: 32rpx;
-    border-radius: 50%;
-    position: absolute;
-    top: 0rpx;
-    left: 85rpx;
-    border: 1rpx solid #FFFFFF;
-  }
-
-  .shop-buttom-money-2 {
-    width: 200rpx;
-    height: 80rpx;
-    line-height: 80rpx;
-    background: linear-gradient(270deg, #FF3333 0%, #FE6122 100%);
-  }
-
-  .info-box-top {}
-
-  .box-top-right {
-    width: 100rpx;
-    height: 100rpx;
-    border-radius: 12rpx;
-  }
-
-  .box-top-left {}
-
-  .top-left-1 {
-    width: 480rpx;
-    margin-bottom: 8rpx;
-  }
-
-  .img-x {
-    width: 24rpx;
-    height: 24rpx;
-  }
-
-  .buy-card {
-    height: 60vh;
-    border-radius: 24rpx 24rpx 0rpx 0rpx;
-  }
-
-  .buy-card-top {
-    width: 100%;
-    height: 92rpx;
-    background: #FCF5DB;
-    border-radius: 24rpx 24rpx 0rpx 0rpx;
-  }
-
-  .buy-card-item {
-    width: 100%;
-    // height: 176rpx;
-    margin-bottom: 32rpx;
-  }
-
-  .goods_img {
-    width: 152rpx;
-    height: 152rpx;
-    border-radius: 12rpx;
-    margin-right: 20rpx;
-  }
-
-  .shop-buttom-money-1 {
-    width: 100%;
-    height: 96rpx;
-    position: relative;
-  }
-
-  .gwc-img {
-    width: 88rpx;
-    height: 88rpx;
-  }
-
-  .head-box {
-    width: 100%;
-    position: relative;
-  }
-
-  .shop-info-box {
-    box-shadow: 0rpx 8rpx 56rpx 0rpx rgba(154, 152, 152, 0.34);
-  }
-
-  .info-box-quan-list {
-    width: 164rpx;
-    height: 48rpx;
-    margin: 0 8rpx 8rpx 0;
-    position: relative;
-
-    image {
-      width: 164rpx;
-      height: 48rpx;
-      position: absolute;
-      top: 0;
-      left: 0;
-      z-index: 1;
-    }
-  }
-
-  .quan-list-1 {
-    position: absolute;
-    top: 3rpx;
-    left: 8rpx;
-    z-index: 2;
-  }
-
-  .quan-list-2 {
-    position: absolute;
-    top: 8rpx;
-    right: 22rpx;
-    z-index: 2;
-  }
-
-  .shop-type-list {
-    // height: 88rpx;
-    position: relative;
-  }
-
-  .shop-item {
-    position: relative;
-  }
-
-  .pj-num {
-    position: absolute;
-    right: -80rpx;
-    top: 0;
-    text-align: left;
-    width: 80rpx;
-  }
-
-  .shop-item-bs {
-    position: absolute;
-    bottom: 0;
-    width: 40rpx;
-    height: 6rpx;
-    border-radius: 20rpx;
-    transition: left 0.5s;
-  }
-
-  .sticky-nav {
-    width: 100%;
-    position: sticky;
-    z-index: 3;
-  }
-
-  .wh-44 {
-    width: 44rpx;
-    height: 44rpx;
-  }
-
-  .menu-box-left-f {
-    position: sticky;
-    // transition: all .3s ease;
-    // overflow: auto;
-  }
-
-  .menu-box-left {
-    width: 160rpx;
-    height: auto;
-    position: sticky;
-    overflow: auto;
-    // transition: all .3s ease;
-    // height: 100%;
-    // background-color: #F7F8FA;
-    // position: absolute;
-    // left: 0;
-    // top: 0;
-    // border-radius: 0rpx 20rpx 0 0rpx;
-  }
-
-  .menu-box-left-box {
-    overflow-y: auto;
-
-  }
-
-  .menu-type-list {
-    width: 160rpx;
-    min-height: 108rpx;
-    padding: 18rpx 28rpx;
-    position: relative;
-    z-index: 10;
-    border-radius: 0rpx 20rpx 20rpx 0rpx;
-
-    .menu-type-num {
-      position: absolute;
-      top: 2rpx;
-      right: 8rpx;
-      padding: 0 6rpx;
-      min-width: 20rpx;
-      height: 32rpx;
-      text-align: center;
-      line-height: 32rpx;
-      background: #FE6B2C;
-      border-radius: 50%;
-    }
-  }
-
-  .menu-type-list-f {
-    // width: 160rpx;
-    background-color: #007AFF;
-    width: 100%;
-    height: 100%;
-    overflow-y: auto;
-    /* 如果分类项很多,允许内部滚动 */
-    -webkit-overflow-scrolling: touch;
-    /* 改善移动端滚动体验 */
-    // height: 100%;
-  }
-
-  .menu-box-only {
-    // flex: 1;
-    width: calc(100% - 160rpx);
-  }
-
-  .menu-box-right {
-    // flex: 1;
-    width: 100%;
-    height: 100%;
-    // padding: 16rpx 0;
-    // box-sizing: border-box;
-    // position: relative;
-  }
-
-  .menu-list {
-    width: 100%;
-    padding: 0 20rpx 40rpx;
-    // height: 200rpx;
-    // margin-bottom: 40rpx;
-
-    .goods_img {
-      width: 200rpx;
-      height: 200rpx;
-      border-radius: 12rpx;
-      margin-right: 16rpx;
-    }
-
-    .menu-list-right {
-      flex: 1;
-
-      .right-only-right {
-        width: 116rpx;
-        height: 44rpx;
-        background: linear-gradient(270deg, #FF3333 0%, #FE6122 100%);
-        line-height: 44rpx;
-        position: relative;
-
-        .selectedNum {
-          position: absolute;
-          right: -10rpx;
-          top: -22rpx;
-          font-size: 24rpx;
-          color: #fff;
-          width: 32rpx;
-          height: 32rpx;
-          line-height: 32rpx;
-          background: #FE6B2C;
-          border-radius: 50%;
-          border: 1rpx solid #FFFFFF;
-        }
-      }
-
-      .right-only-right-red {
-        width: 44rpx;
-        height: 44rpx;
-        line-height: 40rpx;
-        border-radius: 12rpx;
-        border: 1rpx solid #41ABF5;
-        color: #41ABF5;
-      }
-
-      .right-only-right-add {
-        width: 44rpx;
-        height: 44rpx;
-        line-height: 40rpx;
-        background: linear-gradient(117deg, #57CAFF 0%, #41ABF5 100%);
-        border-radius: 12rpx;
-      }
-
-      .right-only-right-2 {
-        min-width: 50rpx;
-      }
-    }
-  }
-</style>
+	.car-scroll-box {
+		padding: 12rpx 24rpx calc(env(safe-area-inset-bottom) + 48rpx);
+	}
+
+	.zh-icon {
+		width: 32rpx;
+		height: 32rpx;
+	}
+
+	.shp-list-img {
+		width: 40rpx;
+		height: 40rpx;
+	}
+
+	.dd-box {
+		width: 144rpx;
+		padding: 12rpx 0;
+		background: rgba(0, 0, 0, 0.14);
+	}
+
+	.ss-box {
+		width: 64rpx;
+		height: 64rpx;
+		background: rgba(0, 0, 0, 0.14);
+	}
+
+	.shop-search {
+		width: 40rpx;
+		height: 40rpx;
+	}
+
+	.wh-44 {
+		width: 44rpx;
+		height: 44rpx;
+	}
+
+	.blank-text {
+		line-height: 32vh;
+	}
+
+	.box-title {
+		position: relative;
+	}
+
+	.box-close {
+		position: absolute;
+		right: 22rpx;
+	}
+
+	.pop-coupon {
+		width: 100%;
+		height: 42vh;
+		background-color: #F5F4F9;
+		border-radius: 24rpx 24rpx 0rpx 0rpx;
+		padding-top: 32rpx !important;
+		display: flex;
+		flex-direction: column;
+	}
+
+	.item-right {
+		padding: 24rpx;
+		box-sizing: border-box;
+		border-radius: 20rpx 0 0 20rpx;
+		position: relative;
+	}
+
+	.item-hr {
+		width: 0px;
+		height: auto;
+		border-right: 1rpx dashed #FB7850;
+	}
+
+	.item-hr-two {
+		width: 0px;
+		height: auto;
+		border-right: 1rpx dashed #999;
+	}
+
+	.item-left {
+		width: 220rpx;
+		height: auto;
+		padding: 20rpx 24rpx;
+		box-sizing: border-box;
+		position: relative;
+		border-radius: 0 20rpx 20rpx 0;
+	}
+
+	.but-box {
+		width: 152rpx;
+		height: 52rpx;
+		line-height: 52rpx;
+		text-align: center;
+		background: linear-gradient(225deg, #FB3D03 0%, #FF6901 100%);
+		border-radius: 200rpx;
+	}
+
+	.ball {
+		width: 24rpx;
+		height: 24rpx;
+		border-radius: 50%;
+		position: absolute;
+		top: -12rpx;
+		left: -12rpx;
+		background: #F5F5F5;
+		z-index: 2;
+	}
+
+	.ball-two {
+		width: 24rpx;
+		height: 24rpx;
+		border-radius: 50%;
+		position: absolute;
+		background: #F5F5F5;
+		z-index: 10;
+		bottom: -12rpx;
+		left: -12rpx;
+	}
+
+	.shop-index {
+		width: 100%;
+		min-height: 100vh;
+		height: auto;
+		position: relative;
+	}
+
+	.right-only-right-red {
+		width: 44rpx;
+		height: 44rpx;
+		line-height: 40rpx;
+		border-radius: 12rpx;
+		border: 1rpx solid #41ABF5;
+		color: #41ABF5;
+	}
+
+	.right-only-right-add {
+		width: 44rpx;
+		height: 44rpx;
+		line-height: 40rpx;
+		background: linear-gradient(117deg, #57CAFF 0%, #41ABF5 100%);
+		border-radius: 12rpx;
+	}
+
+	.right-only-right-2 {
+		min-width: 50rpx;
+	}
+
+	.w-514 {
+		width: 514rpx;
+	}
+
+	.bg-img {
+		position: fixed;
+		top: 0;
+		left: 0;
+		width: 100%;
+		height: 300rpx;
+		transition: linear .3s all;
+		// height: 300rpx;
+	}
+
+	.bg-img-type {
+		position: fixed;
+		top: 0;
+		left: 0;
+		width: 100%;
+		// opacity: 100;
+		transition: linear .3s all;
+	}
+
+	.mb-box {
+		position: absolute;
+		top: 0;
+		left: 0;
+		width: 100%;
+		height: 300rpx;
+		z-index: -1;
+	}
+
+
+	.nav-img {
+		width: 56rpx;
+		height: 56rpx;
+	}
+
+	.shop-buttom-money {
+		width: 100%;
+		// height: 140rpx;
+		background: rgba(255, 255, 255, 0.8);
+		padding-left: 24rpx;
+		padding-right: 24rpx;
+		padding-bottom: calc(env(safe-area-inset-bottom) + 12rpx);
+		padding-top: 22rpx;
+		// padding: 20rpx 24rpx;
+		position: fixed;
+		left: 0;
+		bottom: 0;
+		z-index: 5;
+	}
+
+	.pop-shop-buttom-money {
+		width: 100%;
+		// height: 140rpx;
+		background: #ECECEC;
+		padding-left: 24rpx;
+		padding-right: 24rpx;
+		padding-bottom: calc(env(safe-area-inset-bottom) + 12rpx);
+		padding-top: 22rpx;
+		position: fixed;
+		left: 0;
+		bottom: 0;
+		z-index: 5;
+	}
+
+	.shop-buttom-num {
+		width: 32rpx;
+		height: 32rpx;
+		line-height: 32rpx;
+		border-radius: 50%;
+		position: absolute;
+		top: 0rpx;
+		left: 85rpx;
+		border: 1rpx solid #FFFFFF;
+	}
+
+	.shop-buttom-money-2 {
+		width: 200rpx;
+		height: 80rpx;
+		line-height: 80rpx;
+		background: linear-gradient(270deg, #FF3333 0%, #FE6122 100%);
+	}
+
+	.info-box-top {}
+
+	.box-top-right {
+		width: 100rpx;
+		height: 100rpx;
+		border-radius: 12rpx;
+	}
+
+	.box-top-left {}
+
+	.top-left-1 {
+		width: 480rpx;
+		margin-bottom: 8rpx;
+	}
+
+	.img-x {
+		width: 24rpx;
+		height: 24rpx;
+	}
+
+	.buy-card {
+		height: 60vh;
+		border-radius: 24rpx 24rpx 0rpx 0rpx;
+	}
+
+	.buy-card-top {
+		width: 100%;
+		height: 92rpx;
+		background: #FCF5DB;
+		border-radius: 24rpx 24rpx 0rpx 0rpx;
+	}
+
+	.buy-card-item {
+		width: 100%;
+		// height: 176rpx;
+		margin-bottom: 32rpx;
+	}
+
+	.goods_img {
+		width: 152rpx;
+		height: 152rpx;
+		border-radius: 12rpx;
+		margin-right: 20rpx;
+	}
+
+	.shop-buttom-money-1 {
+		width: 100%;
+		height: 96rpx;
+		position: relative;
+	}
+
+	.gwc-img {
+		width: 88rpx;
+		height: 88rpx;
+	}
+
+	.head-box {
+		width: 100%;
+		position: relative;
+	}
+
+	.shop-info-box {
+		box-shadow: 0rpx 8rpx 56rpx 0rpx rgba(154, 152, 152, 0.34);
+	}
+
+	.info-box-quan-list {
+		width: 164rpx;
+		height: 48rpx;
+		margin: 0 8rpx 8rpx 0;
+		position: relative;
+
+		image {
+			width: 164rpx;
+			height: 48rpx;
+			position: absolute;
+			top: 0;
+			left: 0;
+			z-index: 1;
+		}
+	}
+
+	.quan-list-1 {
+		position: absolute;
+		top: 3rpx;
+		left: 8rpx;
+		z-index: 2;
+	}
+
+	.quan-list-2 {
+		position: absolute;
+		top: 8rpx;
+		right: 22rpx;
+		z-index: 2;
+	}
+
+	.shop-type-list {
+		// height: 88rpx;
+		position: relative;
+	}
+
+	.shop-item {
+		position: relative;
+	}
+
+	.pj-num {
+		position: absolute;
+		right: -80rpx;
+		top: 0;
+		text-align: left;
+		width: 80rpx;
+	}
+
+	.shop-item-bs {
+		position: absolute;
+		bottom: 0;
+		width: 40rpx;
+		height: 6rpx;
+		border-radius: 20rpx;
+		transition: left 0.5s;
+	}
+
+	.sticky-nav {
+		width: 100%;
+		position: sticky;
+		z-index: 3;
+	}
+
+	.wh-44 {
+		width: 44rpx;
+		height: 44rpx;
+	}
+
+	.menu-box-left-f {
+		position: sticky;
+		// transition: all .3s ease;
+		// overflow: auto;
+	}
+
+	.menu-box-left {
+		width: 160rpx;
+		height: auto;
+		position: sticky;
+		overflow: auto;
+		// transition: all .3s ease;
+		// height: 100%;
+		// background-color: #F7F8FA;
+		// position: absolute;
+		// left: 0;
+		// top: 0;
+		// border-radius: 0rpx 20rpx 0 0rpx;
+	}
+
+	.menu-box-left-box {
+		overflow-y: auto;
+
+	}
+
+	.menu-type-list {
+		width: 160rpx;
+		min-height: 108rpx;
+		padding: 18rpx 28rpx;
+		position: relative;
+		z-index: 10;
+		border-radius: 0rpx 20rpx 20rpx 0rpx;
+
+		.menu-type-num {
+			position: absolute;
+			top: 2rpx;
+			right: 8rpx;
+			padding: 0 6rpx;
+			min-width: 20rpx;
+			height: 32rpx;
+			text-align: center;
+			line-height: 32rpx;
+			background: #FE6B2C;
+			border-radius: 50%;
+		}
+	}
+
+	.menu-type-list-f {
+		// width: 160rpx;
+		background-color: #007AFF;
+		width: 100%;
+		height: 100%;
+		overflow-y: auto;
+		/* 如果分类项很多,允许内部滚动 */
+		-webkit-overflow-scrolling: touch;
+		/* 改善移动端滚动体验 */
+		// height: 100%;
+	}
+
+	.menu-box-only {
+		// flex: 1;
+		width: calc(100% - 160rpx);
+	}
+
+	.menu-box-right {
+		// flex: 1;
+		width: 100%;
+		height: 100%;
+		// padding: 16rpx 0;
+		// box-sizing: border-box;
+		// position: relative;
+	}
+
+	.menu-list {
+		width: 100%;
+		padding: 0 20rpx 40rpx;
+		// height: 200rpx;
+		// margin-bottom: 40rpx;
+
+		.goods_img {
+			width: 200rpx;
+			height: 200rpx;
+			border-radius: 12rpx;
+			margin-right: 16rpx;
+		}
+
+		.menu-list-right {
+			flex: 1;
+
+			.right-only-right {
+				width: 116rpx;
+				height: 44rpx;
+				background: linear-gradient(270deg, #FF3333 0%, #FE6122 100%);
+				line-height: 44rpx;
+				position: relative;
+
+				.selectedNum {
+					position: absolute;
+					right: -10rpx;
+					top: -22rpx;
+					font-size: 24rpx;
+					color: #fff;
+					width: 32rpx;
+					height: 32rpx;
+					line-height: 32rpx;
+					background: #FE6B2C;
+					border-radius: 50%;
+					border: 1rpx solid #FFFFFF;
+				}
+			}
+
+			.right-only-right-red {
+				width: 44rpx;
+				height: 44rpx;
+				line-height: 40rpx;
+				border-radius: 12rpx;
+				border: 1rpx solid #41ABF5;
+				color: #41ABF5;
+			}
+
+			.right-only-right-add {
+				width: 44rpx;
+				height: 44rpx;
+				line-height: 40rpx;
+				background: linear-gradient(117deg, #57CAFF 0%, #41ABF5 100%);
+				border-radius: 12rpx;
+			}
+
+			.right-only-right-2 {
+				min-width: 50rpx;
+			}
+		}
+	}
+</style>

+ 1 - 0
pages-takeout/new-specs-info.vue

@@ -193,6 +193,7 @@
           category_id: this.postData.category_id,
           seckill_money: this.infoData.seckill_money || 0,
           price: this.infoData.price || 0,
+		  pack_price: this.infoData.pack_price || 0, // 添加配送费
           spec_type: 2, // 多规格商品
           goods_desc: this.infoData.goods_desc || ''
         };

+ 2 - 2
pages.json

@@ -496,8 +496,8 @@
 		"current": 0,
 		"list": [{
 				"name": "列表调试",
-				"path": "pages-takeout/new-shop",
-				"query": "balance=2"
+				"path": "pages-takeout/goods-order",
+				"query": ""
 			},
 			{
 				"name": "dd",

+ 29 - 26
pages/index/index.vue

@@ -41,35 +41,38 @@
 			// if (data) {
 			// 	uni.setStorageSync('shop_id', data.shop_id)
 			// }
-			uni.setStorageSync('shop_id', 111)
-			uni.setStorageSync('table_number', 1)
-			this.login()
+			
+		},
+		onShow() {
+			// uni.setStorageSync('shop_id', 111)
+			// uni.setStorageSync('table_number', 1)
+			// this.login()
 		},
 		mounted() {},
 		methods: {
-			login() {
-				uni.login({
-					provider: "weixin",
-					success: (loginRes) => {
-						this.appletLogin(loginRes.code);
-					},
-					fail: (loginRes) => {
-						this.isAjax = false;
-						tools.error("获取授权信息失败");
-					},
-				});
-			},
-			appletLogin(code) {
-				appletLogin({
-					'code': code
-				}).then(res => {
-					if (res.code === 1) {
-						uni.setStorageSync('token', res.data.token)
-						uni.setStorageSync('m_id', res.data.m_id)
-						// this.goToUrl()
-					}
-				})
-			},
+			// login() {
+			// 	uni.login({
+			// 		provider: "weixin",
+			// 		success: (loginRes) => {
+			// 			this.appletLogin(loginRes.code);
+			// 		},
+			// 		fail: (loginRes) => {
+			// 			this.isAjax = false;
+			// 			tools.error("获取授权信息失败");
+			// 		},
+			// 	});
+			// },
+			// appletLogin(code) {
+			// 	appletLogin({
+			// 		'code': code
+			// 	}).then(res => {
+			// 		if (res.code === 1) {
+			// 			uni.setStorageSync('token', res.data.token)
+			// 			uni.setStorageSync('m_id', res.data.m_id)
+			// 			// this.goToUrl()
+			// 		}
+			// 	})
+			// },
 			goToUrl(shop_id) {
 				uni.reLaunch({
 					url: '/pages-takeout/new-shop?shop_id=' + shop_id

+ 630 - 622
pages/index/search-record.vue

@@ -1,629 +1,637 @@
 <template>
-  <view class="flex-common-css iPhone-bottom box-border-box bgc-f">
-    <image class="order-bg" src="@/static/img/order-food/ss-bg.png" mode=""></image>
-    <newNav textName="搜索商品" class="mb-20" titleColor='#333' leftIconColor='#333'></newNav>
-
-    <view class="plr-24 box-border-box">
-      <view class="s-input box-border-box bgc-f align-items-center flex-justify-space b-rad-200 z-3">
-        <view class="align-items-center flex-1 mr-16">
-          <image class="wh36 mr-16 flex-shrink0" src="/static/img/order-food/ss-icon.png" mode=""></image>
-          <input class="input-box fs-32" placeholder-class="fc-9" v-model="search" type="text" placeholder="请搜索商品"
-            @input="clearInput">
-        </view>
-        <view class="align-items-center">
-          <image v-if="showClearIcon" @click="clearIcon" class="qk-icon mr-24" src="@/static/img/order-food/qk-icon.png"
-            mode="">
-          </image>
-          <view class="input-buttom fs-28 fc-f fw-500 b-rad-200 text-align-center" @click="toList()">搜索</view>
-        </view>
-      </view>
-    </view>
-
-    <view class="scroll-view-css bgc-f seacrh-info box-border-box p-32" v-if="goodsList.length<=0">
-      <view class="flex-justify-space mb-32">
-        <view class="fs-32 fw-600 fc-3">搜索历史</view>
-        <view class="align-items-center" v-if="list.length > 0">
-          <view @click="isOpen=!isOpen" class="">{{!isOpen?'收起':'展开'}}</view>
-          <view @click="isOpen=!isOpen" :class="!isOpen?'down':'up'">
-            <uni-icons type="right" size="14" color="#999"></uni-icons>
-          </view>
-          <view class="view-x"></view>
-          <uni-icons @click="delList()" type="trash" size="18" color="#999"></uni-icons>
-        </view>
-      </view>
-      <view id='' :class="isOpen?'hide-h':''" class="flex-wrap-wrap mb-50 search-history" v-if="list.length > 0">
-        <view class="fs-28 list-item text-overflow-ellipsis-one" @click="toList(item)" v-for="(item,i) in list"
-          :key="i">{{item}}</view>
-      </view>
-    </view>
-    <scroll-view scroll-y="true" class="scroll-view-css bgc-F5F4F9 p-32 box-border-box" v-else @scrolltolower="scrolltolower">
-      <!-- <view class="scroll-view-css bgc-F5F4F9 p-32 box-border-box" v-else> -->
-      <view class="menu-list flex-justify-space bgc-f p-24 box-border-box b-rad-20 mb-16" v-for="(info,k) in goodsList"
-        :key="k" :id="'goods_id'+ info.goods_id">
-        <image class="flex-shrink0 goods_img mr-20" :src="info.goods_image" mode="scaleToFill"></image>
-        <view class="menu-list-right flex-direction flex-justify-space">
-          <view class="mb-8">
-            <view class="mb-4 goods-name text-overflow-ellipsis fs-32 fw-600">
-              {{info.goods_name}}
-            </view>
-            <view class="text-overflow-ellipsis-one fw-400 fc-9 fs-24 mb-2 goods-name" v-if="info.spec_type == 1">
-              {{info.goods_desc?info.goods_desc:''}}
-            </view>
-          </view>
-          <view class="flex-justify-space align-items-flex-end">
-            <view class="">
-              <span class="fs-24 fw-400 fc-3">¥</span>
-              <span class="fs-36 fw-b fc-3">{{info.seckill_money>0?info.seckill_money:info.price}}</span>
-              <span class="fs-24 fc-9">/份起</span>
-            </view>
-            <view class="display-flex align-items-center" v-if="info.spec_type == 1">
-              <image v-show="info.num > 0" class="wh-44" @click="addred(1,info)"
-                src="@/static/img/order-food/reduce-img.png" mode=""></image>
-              <view v-show="info.num > 0" class="right-only-right-2 text-align-center fs-28 fw-400">
-                {{info.num}}
-              </view>
-              <image class="wh-44" src="@/static/img/order-food/add-img.png" @click="addred(2,info)" mode=""></image>
-            </view>
-            <view v-else class="right-only-right text-align-center b-rad-200" @click="addred(3,info)">
-              <view class="fw-500 fs-28 fc-f">
-                选规格
-              </view>
-              <view class="selectedNum" v-if="info.num>0">
-                {{info.num}}
-              </view>
-            </view>
-          </view>
-        </view>
-      </view>
-      <!-- </view> -->
-    </scroll-view>
-
-    <view v-if="goodsList.length>0" class="shop-buttom-money p-24 box-border-box bgc-F5F4F9" @click="openBuyCrad()">
-      <view class="shop-buttom-money-1 bgc-f flex-justify-space align-items-center pl-24 box-border-box pr-8 b-rad-200">
-        <view class="align-items-center">
-          <image class="gwc-img mr-36" src="@/static/img/order-food/gwc-img.png" mode="scaleToFill"></image>
-          <view class="shop-buttom-num bgc-FE6B2C fs-24 fc-f text-align-center">{{cartData.total_num || 0}}
-          </view>
-          <view class="align-items-baseline">
-            <view class="fw-600 fs-28 fc-3 mr-4">¥</view>
-            <view class="fw-600 fs-48 fc-3">{{cartData.total_price || 0}}</view>
-          </view>
-        </view>
-
-        <view class="shop-buttom-money-2 text-align-center fc-f fs-32 fw-600 b-rad-200"
-          :class="cartData.total_num>0?'':'opacity-4'" @click.stop="toConfirmOrder()">去结算
-        </view>
-      </view>
-    </view>
-
-    <uni-popup ref="popupBuy" type="bottom" background-color="transparent" borderRadius='20px 20rpx 0 0'>
-      <view class="buy-card flex-index-css">
-        <view class="buy-card-top box-border-box plr-32 flex-justify-space align-items-center b-rad-20-20-0-0">
-          <view class="">
-            <span class="fs-32 fc-3 mr-12">已选商品</span>
-          </view>
-          <view class="fs-28 fw-400 fc-9 align-items-center" @click.stop="setShopIngDel">
-            <view class="">
-              <uni-icons type="trash" size="18" color="#999"></uni-icons>
-            </view>
-            <view class="fs-28 fw-400 fc-9">清空</view>
-          </view>
-        </view>
-        <view class="scroll-view-css bgc-ECECEC box-border-box car-scroll-box">
-          <view class="buy-card-item bgc-f b-rad-20 display-flex p-20 box-border-box"
-            v-for="(goods,i) in cartData.goods_list" :key="i">
-            <image class="goods_img" :src="goods.goods_image" mode="scaleToFill"></image>
-            <view class="flex-1 flex-direction flex-justify-space">
-              <view class="">
-                <view class="w-514 text-overflow-ellipsis-one fs-34 fw-600 mb-8">
-                  {{goods.goods_name}}
-                </view>
-                <view class="fc-6">
-                  {{goods.goods_attr}}
-                </view>
-              </view>
-              <view class="flex-justify-space">
-                <view class="">
-                  <span class="fs-24 fc-FB3D03 fw-400">¥</span>
-                  <span class="fs-40 fc-FB3D03 fw-b">{{goods.price}}</span>
-                </view>
-                <view class="display-flex align-items-center">
-                  <image class="wh-44" @click.stop="setShoppingSave(goods,2)"
-                    src="@/static/img/order-food/reduce-img.png" mode="">
-                  </image>
-                  <view class="right-only-right-2 text-align-center fs-28 fw-400">
-                    {{goods.goods_number}}
-                  </view>
-                  <image class="wh-44" src="/static/img/order-food/add-img.png" @click.stop="setShoppingSave(goods,1)"
-                    mode=""></image>
-                </view>
-              </view>
-            </view>
-          </view>
-          <en-blank navBackgroundColor='#ECECEC' v-if="cartData.goods_list.length<=0" message="快去选购商品吧!~"></en-blank>
-        </view>
-        <view class="pop-shop-buttom-money box-border-box" @click="openBuyCrad()">
-          <view
-            class="shop-buttom-money-1 bgc-f flex-justify-space align-items-center pl-24 box-border-box pr-8 b-rad-200">
-            <view class="align-items-center">
-              <image class="gwc-img mr-36" src="@/static/img/order-food/gwc-img.png" mode="scaleToFill">
-              </image>
-              <view class="shop-buttom-num bgc-FE6B2C fs-24 fc-f text-align-center">{{cartData.total_num}}
-              </view>
-              <view class="align-items-baseline">
-                <view class="fw-600 fs-28 fc-3 mr-4">¥</view>
-                <view class="fw-600 fs-48 fc-3">{{cartData.total_price}}</view>
-              </view>
-            </view>
-
-            <view class="shop-buttom-money-2 text-align-center fc-f fs-32 fw-600 b-rad-200"
-              :class="cartData.total_num>0?'':'opacity-4'" @click.stop="toConfirmOrder()">去结算
-            </view>
-          </view>
-        </view>
-      </view>
-    </uni-popup>
-  </view>
+	<view class="flex-common-css iPhone-bottom box-border-box bgc-f">
+		<image class="order-bg" src="@/static/img/order-food/ss-bg.png" mode=""></image>
+		<newNav textName="搜索商品" class="mb-20" titleColor='#333' leftIconColor='#333'></newNav>
+
+		<view class="plr-24 box-border-box">
+			<view class="s-input box-border-box bgc-f align-items-center flex-justify-space b-rad-200 z-3">
+				<view class="align-items-center flex-1 mr-16">
+					<image class="wh36 mr-16 flex-shrink0" src="/static/img/order-food/ss-icon.png" mode=""></image>
+					<input class="input-box fs-32" placeholder-class="fc-9" v-model="search" type="text"
+						placeholder="请搜索商品" @input="clearInput">
+				</view>
+				<view class="align-items-center">
+					<image v-if="showClearIcon" @click="clearIcon" class="qk-icon mr-24"
+						src="@/static/img/order-food/qk-icon.png" mode="">
+					</image>
+					<view class="input-buttom fs-28 fc-f fw-500 b-rad-200 text-align-center" @click="toList()">搜索</view>
+				</view>
+			</view>
+		</view>
+
+		<view class="scroll-view-css bgc-f seacrh-info box-border-box p-32" v-if="goodsList.length<=0">
+			<view class="flex-justify-space mb-32">
+				<view class="fs-32 fw-600 fc-3">搜索历史</view>
+				<view class="align-items-center" v-if="list.length > 0">
+					<view @click="isOpen=!isOpen" class="">{{!isOpen?'收起':'展开'}}</view>
+					<view @click="isOpen=!isOpen" :class="!isOpen?'down':'up'">
+						<uni-icons type="right" size="14" color="#999"></uni-icons>
+					</view>
+					<view class="view-x"></view>
+					<uni-icons @click="delList()" type="trash" size="18" color="#999"></uni-icons>
+				</view>
+			</view>
+			<view id='' :class="isOpen?'hide-h':''" class="flex-wrap-wrap mb-50 search-history" v-if="list.length > 0">
+				<view class="fs-28 list-item text-overflow-ellipsis-one" @click="toList(item)" v-for="(item,i) in list"
+					:key="i">{{item}}</view>
+			</view>
+		</view>
+		<scroll-view scroll-y="true" class="scroll-view-css bgc-F5F4F9 p-32 box-border-box" v-else
+			@scrolltolower="scrolltolower">
+			<!-- <view class="scroll-view-css bgc-F5F4F9 p-32 box-border-box" v-else> -->
+			<view class="menu-list flex-justify-space bgc-f p-24 box-border-box b-rad-20 mb-16"
+				v-for="(info,k) in goodsList" :key="k" :id="'goods_id'+ info.goods_id">
+				<image class="flex-shrink0 goods_img mr-20" :src="info.goods_image" mode="scaleToFill"></image>
+				<view class="menu-list-right flex-direction flex-justify-space">
+					<view class="mb-8">
+						<view class="mb-4 goods-name text-overflow-ellipsis fs-32 fw-600">
+							{{info.goods_name}}
+						</view>
+						<view class="text-overflow-ellipsis-one fw-400 fc-9 fs-24 mb-2 goods-name"
+							v-if="info.spec_type == 1">
+							{{info.goods_desc?info.goods_desc:''}}
+						</view>
+					</view>
+					<view class="flex-justify-space align-items-flex-end">
+						<view class="">
+							<span class="fs-24 fw-400 fc-3">¥</span>
+							<span class="fs-36 fw-b fc-3">{{info.seckill_money>0?info.seckill_money:info.price}}</span>
+							<span class="fs-24 fc-9">/份起</span>
+						</view>
+						<view class="display-flex align-items-center" v-if="info.spec_type == 1">
+							<image v-show="info.num > 0" class="wh-44" @click="addred(1,info)"
+								src="@/static/img/order-food/reduce-img.png" mode=""></image>
+							<view v-show="info.num > 0" class="right-only-right-2 text-align-center fs-28 fw-400">
+								{{info.num}}
+							</view>
+							<image class="wh-44" src="@/static/img/order-food/add-img.png" @click="addred(2,info)"
+								mode=""></image>
+						</view>
+						<view v-else class="right-only-right text-align-center b-rad-200" @click="addred(3,info)">
+							<view class="fw-500 fs-28 fc-f">
+								选规格
+							</view>
+							<view class="selectedNum" v-if="info.num>0">
+								{{info.num}}
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+			<!-- </view> -->
+		</scroll-view>
+
+		<view v-if="goodsList.length>0" class="shop-buttom-money p-24 box-border-box bgc-F5F4F9" @click="openBuyCrad()">
+			<view
+				class="shop-buttom-money-1 bgc-f flex-justify-space align-items-center pl-24 box-border-box pr-8 b-rad-200">
+				<view class="align-items-center">
+					<image class="gwc-img mr-36" src="@/static/img/order-food/gwc-img.png" mode="scaleToFill"></image>
+					<view class="shop-buttom-num bgc-FE6B2C fs-24 fc-f text-align-center">{{cartData.total_num || 0}}
+					</view>
+					<view class="align-items-baseline">
+						<view class="fw-600 fs-28 fc-3 mr-4">¥</view>
+						<view class="fw-600 fs-48 fc-3">{{cartData.total_price || 0}}</view>
+					</view>
+				</view>
+
+				<view class="shop-buttom-money-2 text-align-center fc-f fs-32 fw-600 b-rad-200"
+					:class="cartData.total_num>0?'':'opacity-4'" @click.stop="toConfirmOrder()">去结算
+				</view>
+			</view>
+		</view>
+
+		<uni-popup ref="popupBuy" type="bottom" background-color="transparent" borderRadius='20px 20rpx 0 0'>
+			<view class="buy-card flex-index-css">
+				<view class="buy-card-top box-border-box plr-32 flex-justify-space align-items-center b-rad-20-20-0-0">
+					<view class="">
+						<span class="fs-32 fc-3 mr-12">已选商品</span>
+					</view>
+					<view class="fs-28 fw-400 fc-9 align-items-center" @click.stop="setShopIngDel">
+						<view class="">
+							<uni-icons type="trash" size="18" color="#999"></uni-icons>
+						</view>
+						<view class="fs-28 fw-400 fc-9">清空</view>
+					</view>
+				</view>
+				<view class="scroll-view-css bgc-ECECEC box-border-box car-scroll-box">
+					<view class="buy-card-item bgc-f b-rad-20 display-flex p-20 box-border-box"
+						v-for="(goods,i) in cartData.goods_list" :key="i">
+						<image class="goods_img" :src="goods.goods_image" mode="scaleToFill"></image>
+						<view class="flex-1 flex-direction flex-justify-space">
+							<view class="">
+								<view class="w-514 text-overflow-ellipsis-one fs-34 fw-600 mb-8">
+									{{goods.goods_name}}
+								</view>
+								<view class="fc-6">
+									{{goods.goods_attr}}
+								</view>
+							</view>
+							<view class="flex-justify-space">
+								<view class="">
+									<span class="fs-24 fc-FB3D03 fw-400">¥</span>
+									<span class="fs-40 fc-FB3D03 fw-b">{{goods.price}}</span>
+								</view>
+								<view class="display-flex align-items-center">
+									<image class="wh-44" @click.stop="setShoppingSave(goods,2)"
+										src="@/static/img/order-food/reduce-img.png" mode="">
+									</image>
+									<view class="right-only-right-2 text-align-center fs-28 fw-400">
+										{{goods.goods_number}}
+									</view>
+									<image class="wh-44" src="/static/img/order-food/add-img.png"
+										@click.stop="setShoppingSave(goods,1)" mode=""></image>
+								</view>
+							</view>
+						</view>
+					</view>
+					<en-blank navBackgroundColor='#ECECEC' v-if="cartData.goods_list.length<=0"
+						message="快去选购商品吧!~"></en-blank>
+				</view>
+				<view class="pop-shop-buttom-money box-border-box" @click="openBuyCrad()">
+					<view
+						class="shop-buttom-money-1 bgc-f flex-justify-space align-items-center pl-24 box-border-box pr-8 b-rad-200">
+						<view class="align-items-center">
+							<image class="gwc-img mr-36" src="@/static/img/order-food/gwc-img.png" mode="scaleToFill">
+							</image>
+							<view class="shop-buttom-num bgc-FE6B2C fs-24 fc-f text-align-center">{{cartData.total_num}}
+							</view>
+							<view class="align-items-baseline">
+								<view class="fw-600 fs-28 fc-3 mr-4">¥</view>
+								<view class="fw-600 fs-48 fc-3">{{cartData.total_price}}</view>
+							</view>
+						</view>
+
+						<view class="shop-buttom-money-2 text-align-center fc-f fs-32 fw-600 b-rad-200"
+							:class="cartData.total_num>0?'':'opacity-4'" @click.stop="toConfirmOrder()">去结算
+						</view>
+					</view>
+				</view>
+			</view>
+		</uni-popup>
+	</view>
 </template>
 
 <script>
-  import cartStore from '@/utils/cartStore.js';
-  import tools from "@/service/tools";
-  import {
-    getSearch,
-    getSearchList,
-    delSearch
-  } from '@/api/goods.js';
-  export default {
-    data() {
-      return {
-        search: '',
-        isOpen: false,
-        showClearIcon: false,
-        list: [],
-        goodsList: [],
-        historyType: false,
-        total: '',
-        page: 1,
-        cartData: { // 添加购物车数据
-          total_price: 0,
-          total_num: 0,
-          goods_list: []
-        }
-      }
-    },
-    onLoad() {
-      cartStore.setShopId();
-      this.getList()
-    },
-    onShow() {
-      this.getCartData();
-    },
-    mounted() {},
-    methods: {
-      scrolltolower() {
-        if (this.goodsList.length < this.total) {
-          this.page += 1;
-          this.getSearch(this.search);
-        }
-      },
-      openBuyCrad() {
-        this.$refs.popupBuy.open()
-      },
-      getCartData() {
-        // 获取购物车数据
-        const shopCart = cartStore.getShopCart(this.shop_id);
-        if (shopCart) {
-          this.cartData = {
-            total_price: shopCart.total_price || 0,
-            total_num: shopCart.total_num || 0,
-            goods_list: shopCart.goods_list || []
-          };
-
-          // 更新商品列表中的数量显示
-          this.updateGoodsNumFromCart();
-        }
-      },
-      // 更新商品列表中的数量显示
-      updateGoodsNumFromCart() {
-        if (!this.goodsList.length) return;
-
-        const shopCart = cartStore.getShopCart(this.shop_id);
-        if (!shopCart) return;
-
-        // 创建商品数量映射
-        const goodsQuantityMap = {};
-        shopCart.goods_list.forEach(item => {
-          if (!goodsQuantityMap[item.goods_id]) {
-            goodsQuantityMap[item.goods_id] = 0;
-          }
-          goodsQuantityMap[item.goods_id] += item.goods_number;
-        });
-
-        // 更新商品列表数量
-        this.goodsList.forEach(goods => {
-          goods.num = goodsQuantityMap[goods.goods_id] || 0;
-        });
-      },
-      toList(name) {
-        let search = '';
-        if (name) {
-          search = name;
-          this.search = name
-        } else {
-          search = this.search;
-        }
-        this.page = 1
-        this.goodsList = []
-        this.getSearch(search)
-      },
-      getSearch(search) {
-        // 搜索商品列表
-        getSearch({
-          search: search,
-          page: this.page
-        }).then((res) => {
-          if (res.code * 1 === 1) {
-            const newGoods = res.data.items || [];
-            // 为每个商品添加购物车数量
-            newGoods.forEach(goods => {
-              goods.num = 0; // 初始化为0
-            });
-            this.total = res.data.total
-            this.goodsList = [...this.goodsList, ...res.data.items]
-            // 更新购物车数量显示
-            this.updateGoodsNumFromCart();
-          }
-        })
-      },
-      addred(type, item) {
-        if (type === 1) {
-          // 减
-          if (item.num <= 0) return;
-
-          item.num--;
-          if (item.num <= 0) {
-            // 从购物车移除
-            cartStore.removeFromCart(item.goods_id, item.goods_spec || []);
-          } else {
-            // 更新数量
-            cartStore.updateQuantity(item.goods_id, item.goods_spec || [], item.num);
-          }
-
-        } else if (type === 2) {
-          // 加
-          item.num++;
-
-          // 判断是否已存在购物车
-          const currentQty = cartStore.getGoodsQuantity(item.goods_id, item.goods_spec || []);
-          if (currentQty <= 0) {
-            // 新商品,添加到购物车
-            cartStore.addToCart(item, item.goods_spec || [], 1);
-          } else {
-            // 已存在,更新数量
-            cartStore.updateQuantity(item.goods_id, item.goods_spec || [], item.num);
-          }
-
-        } else if (type === 3) {
-          // 选规格
-          uni.navigateTo({
-            url: `/pages-takeout/new-specs-info?goods_id=${item.goods_id}&category_id=${item.category_id}`
-          })
-        }
-        // 更新购物车数据
-        this.getCartData();
-      },
-
-      setShoppingSave(item, type) {
-        if (type === 1) {
-          // 加
-          item.goods_number = item.goods_number + 1
-        } else {
-          // 减
-          item.goods_number = item.goods_number - 1
-        }
-
-        if (item.goods_number <= 0) {
-          // 数量为0,移除商品
-          cartStore.removeFromCart(item.goods_id, item.goods_spec || []);
-        } else {
-          // 更新商品数量
-          cartStore.updateQuantity(
-            item.goods_id,
-            item.goods_spec || [],
-            item.goods_number
-          );
-        }
-        // 更新页面数据
-        this.getShopIngList();
-      },
-      getShopIngList() {
-        // 获取购物车列表
-        const shopCart = cartStore.getShopCart(this.shop_id);
-        if (shopCart) {
-          this.cartData = {
-            ...this.cartData,
-            total_price: shopCart.total_price,
-            total_num: shopCart.total_num,
-            goods_list: shopCart.goods_list
-          };
-          // 同步更新商品列表中的数量
-          this.updateGoodsNumFromCart();
-        }
-      },
-      clearIcon() {
-        this.search = '';
-        this.showClearIcon = false;
-      },
-      clearInput(event) {
-        this.search = event.detail.value;
-        if (event.detail.value.length > 0) {
-          this.showClearIcon = true;
-        } else {
-          this.showClearIcon = false;
-        }
-      },
-      getList() {
-        // 获取搜索历史内容
-        getSearchList().then((res) => {
-          if (res.code === 1) {
-            this.list = res.data.my_search;
-          }
-        })
-      },
-      delList() {
-        delSearch().then((res) => {
-          if (res.code === 1) {
-            tools.success('删除成功');
-            this.list = [];
-          }
-        })
-      },
-    },
-  }
+	import cartStore from '@/utils/cartStore.js';
+	import tools from "@/service/tools";
+	import {
+		getSearch,
+		getSearchList,
+		delSearch
+	} from '@/api/goods.js';
+	export default {
+		data() {
+			return {
+				search: '',
+				isOpen: false,
+				showClearIcon: false,
+				list: [],
+				goodsList: [],
+				historyType: false,
+				total: '',
+				page: 1,
+				cartData: { // 添加购物车数据
+					total_price: 0,
+					total_num: 0,
+					goods_list: []
+				}
+			}
+		},
+		onLoad() {
+			cartStore.setShopId();
+			this.getList()
+		},
+		onShow() {
+			this.getCartData();
+		},
+		mounted() {},
+		methods: {
+			scrolltolower() {
+				if (this.goodsList.length < this.total) {
+					this.page += 1;
+					this.getSearch(this.search);
+				}
+			},
+			openBuyCrad() {
+				this.$refs.popupBuy.open()
+			},
+			getCartData() {
+				// 获取购物车数据
+				const shopCart = cartStore.getShopCart(this.shop_id);
+				if (shopCart) {
+					this.cartData = {
+						total_price: shopCart.total_price || 0,
+						total_num: shopCart.total_num || 0,
+						goods_list: shopCart.goods_list || [],
+						pack_price: shopCart.pack_price || 0,
+						total_goods_money: shopCart.total_goods_money || 0
+					};
+
+					// 更新商品列表中的数量显示
+					this.updateGoodsNumFromCart();
+				}
+			},
+			// 更新商品列表中的数量显示
+			updateGoodsNumFromCart() {
+				if (!this.goodsList.length) return;
+
+				const shopCart = cartStore.getShopCart(this.shop_id);
+				if (!shopCart) return;
+
+				// 创建商品数量映射
+				const goodsQuantityMap = {};
+				shopCart.goods_list.forEach(item => {
+					if (!goodsQuantityMap[item.goods_id]) {
+						goodsQuantityMap[item.goods_id] = 0;
+					}
+					goodsQuantityMap[item.goods_id] += item.goods_number;
+				});
+
+				// 更新商品列表数量
+				this.goodsList.forEach(goods => {
+					goods.num = goodsQuantityMap[goods.goods_id] || 0;
+				});
+			},
+			toList(name) {
+				let search = '';
+				if (name) {
+					search = name;
+					this.search = name
+				} else {
+					search = this.search;
+				}
+				this.page = 1
+				this.goodsList = []
+				this.getSearch(search)
+			},
+			getSearch(search) {
+				// 搜索商品列表
+				getSearch({
+					search: search,
+					page: this.page
+				}).then((res) => {
+					if (res.code * 1 === 1) {
+						const newGoods = res.data.items || [];
+						// 为每个商品添加购物车数量
+						newGoods.forEach(goods => {
+							goods.num = 0; // 初始化为0
+							goods.pack_price = parseFloat(goods.pack_price || 0);
+						});
+						this.total = res.data.total
+						this.goodsList = [...this.goodsList, ...res.data.items]
+						// 更新购物车数量显示
+						this.updateGoodsNumFromCart();
+					}
+				})
+			},
+			addred(type, item) {
+				if (type === 1) {
+					// 减
+					if (item.num <= 0) return;
+
+					item.num--;
+					if (item.num <= 0) {
+						// 从购物车移除
+						cartStore.removeFromCart(item.goods_id, item.goods_spec || []);
+					} else {
+						// 更新数量
+						cartStore.updateQuantity(item.goods_id, item.goods_spec || [], item.num);
+					}
+
+				} else if (type === 2) {
+					// 加
+					item.num++;
+
+					// 判断是否已存在购物车
+					const currentQty = cartStore.getGoodsQuantity(item.goods_id, item.goods_spec || []);
+					if (currentQty <= 0) {
+						// 新商品,添加到购物车
+						cartStore.addToCart(item, item.goods_spec || [], 1);
+					} else {
+						// 已存在,更新数量
+						cartStore.updateQuantity(item.goods_id, item.goods_spec || [], item.num);
+					}
+
+				} else if (type === 3) {
+					// 选规格
+					uni.navigateTo({
+						url: `/pages-takeout/new-specs-info?goods_id=${item.goods_id}&category_id=${item.category_id}`
+					})
+				}
+				// 更新购物车数据
+				this.getCartData();
+			},
+
+			setShoppingSave(item, type) {
+				if (type === 1) {
+					// 加
+					item.goods_number = item.goods_number + 1
+				} else {
+					// 减
+					item.goods_number = item.goods_number - 1
+				}
+
+				if (item.goods_number <= 0) {
+					// 数量为0,移除商品
+					cartStore.removeFromCart(item.goods_id, item.goods_spec || []);
+				} else {
+					// 更新商品数量
+					cartStore.updateQuantity(
+						item.goods_id,
+						item.goods_spec || [],
+						item.goods_number
+					);
+				}
+				// 更新页面数据
+				this.getShopIngList();
+			},
+			getShopIngList() {
+				// 获取购物车列表
+				const shopCart = cartStore.getShopCart(this.shop_id);
+				if (shopCart) {
+					this.cartData = {
+						...this.cartData,
+						total_price: shopCart.total_price,
+						total_num: shopCart.total_num,
+						goods_list: shopCart.goods_list
+					};
+					// 同步更新商品列表中的数量
+					this.updateGoodsNumFromCart();
+				}
+			},
+			clearIcon() {
+				this.search = '';
+				this.showClearIcon = false;
+			},
+			clearInput(event) {
+				this.search = event.detail.value;
+				if (event.detail.value.length > 0) {
+					this.showClearIcon = true;
+				} else {
+					this.showClearIcon = false;
+				}
+			},
+			getList() {
+				// 获取搜索历史内容
+				getSearchList().then((res) => {
+					if (res.code === 1) {
+						this.list = res.data.my_search;
+					}
+				})
+			},
+			delList() {
+				delSearch().then((res) => {
+					if (res.code === 1) {
+						tools.success('删除成功');
+						this.list = [];
+					}
+				})
+			},
+		},
+	}
 </script>
 
 <style scoped lang="scss">
-  .buy-card-item {
-    width: 100%;
-    margin-bottom: 32rpx;
-  }
-
-  .right-only-right-2 {
-    min-width: 50rpx;
-  }
-
-  .pop-shop-buttom-money {
-    width: 100%;
-    // height: 140rpx;
-    background: #ECECEC;
-    padding-left: 24rpx;
-    padding-right: 24rpx;
-    padding-bottom: calc(env(safe-area-inset-bottom) + 12rpx);
-    padding-top: 22rpx;
-    position: fixed;
-    left: 0;
-    bottom: 0;
-    z-index: 5;
-  }
-
-  .goods_img {
-    width: 152rpx;
-    height: 152rpx;
-    border-radius: 12rpx;
-    margin-right: 20rpx;
-  }
-
-  .car-scroll-box {
-    padding: 12rpx 24rpx calc(env(safe-area-inset-bottom) + 48rpx);
-  }
-
-  .buy-card {
-    height: 60vh;
-    border-radius: 24rpx 24rpx 0rpx 0rpx;
-  }
-
-  .buy-card-top {
-    width: 100%;
-    height: 92rpx;
-    background: #FCF5DB;
-    border-radius: 24rpx 24rpx 0rpx 0rpx;
-  }
-
-  .shop-buttom-money-1 {
-    width: 100%;
-    height: 96rpx;
-    position: relative;
-  }
-
-  .qk-icon {
-    width: 32rpx;
-    height: 32rpx;
-  }
-
-  .shop-buttom-money {
-    width: 100%;
-    // height: 140rpx;
-  }
-
-  .shop-buttom-money-1 {
-    width: 100%;
-    height: 96rpx;
-    position: relative;
-  }
-
-  .shop-buttom-money-2 {
-    width: 200rpx;
-    height: 80rpx;
-    line-height: 80rpx;
-    background: linear-gradient(270deg, #FF3333 0%, #FE6122 100%);
-  }
-
-  .gwc-img {
-    width: 88rpx;
-    height: 88rpx;
-  }
-
-  .shop-buttom-num {
-    width: 32rpx;
-    height: 32rpx;
-    line-height: 32rpx;
-    border-radius: 50%;
-    position: absolute;
-    top: 0rpx;
-    left: 85rpx;
-    border: 1rpx solid #FFFFFF;
-  }
-
-  .z-3 {
-    position: relative;
-    z-index: 3;
-  }
-
-  .order-bg {
-    width: 100%;
-    height: 17vh;
-    position: fixed;
-    left: 0;
-    top: 0;
-  }
-
-  .hide-h {
-    height: 232rpx !important;
-    overflow: hidden !important;
-  }
-
-  .down {
-    transform: rotate(-90deg);
-    transition: all 0.5s;
-  }
-
-  .up {
-    transform: rotate(90deg);
-    transition: all 0.5s;
-  }
-
-  .view-x {
-    width: 2rpx;
-    height: 20rpx;
-    background-color: #eee;
-    margin: 0 24rpx;
-  }
-
-  .find-item {
-    width: 48%;
-    text-align: left;
-  }
-
-  .list-item {
-    max-height: 688rpx;
-    min-width: 10rpx;
-    height: 56rpx;
-    line-height: 56rpx;
-    background: #F7F8FC;
-    border-radius: 200rpx;
-    margin: 0 8rpx 32rpx 0;
-    box-sizing: border-box;
-    padding: 0 24rpx;
-  }
-
-  .seacrh-bg {
-    position: absolute;
-    top: 0;
-    left: 0;
-    width: 100%;
-    height: 376rpx;
-    filter: blur(80rpx);
-    background-image: linear-gradient(to right, #C9F7FC, #F9F6E0, #F6F5F3);
-    z-index: -1;
-  }
-
-  .wh36 {
-    width: 36rpx;
-    height: 36rpx;
-  }
-
-  .input-box {
-    width: 100%;
-  }
-
-  .input-buttom {
-    width: 120rpx;
-    height: 60rpx;
-    background: linear-gradient(270deg, #FF3333 0%, #FE6122 100%);
-    line-height: 60rpx;
-  }
-
-  .s-input {
-    width: 100%;
-    height: 72rpx;
-    padding: 6rpx 6rpx 6rpx 24rpx;
-  }
-
-  .seacrh-info {
-    margin-top: 20rpx;
-    border-radius: 24rpx 24rpx 0rpx 0rpx;
-  }
-
-  .seacrh-record-index {
-    position: relative;
-  }
-
-  .wh-44 {
-    width: 44rpx;
-    height: 44rpx;
-  }
-
-  .menu-list {
-    width: 100%;
-
-    .goods_img {
-      width: 168rpx;
-      height: 168rpx;
-      border-radius: 12rpx;
-    }
-  }
-
-  .menu-list-right {
-    flex: 1;
-  }
-
-  .right-only-right-red {
-    width: 44rpx;
-    height: 44rpx;
-    line-height: 40rpx;
-    border-radius: 12rpx;
-    border: 1rpx solid #41ABF5;
-    color: #41ABF5;
-  }
-
-  .right-only-right-add {
-    width: 44rpx;
-    height: 44rpx;
-    line-height: 40rpx;
-    background: linear-gradient(117deg, #57CAFF 0%, #41ABF5 100%);
-    border-radius: 12rpx;
-  }
-
-  .right-only-right {
-    width: 116rpx;
-    height: 44rpx;
-    background: linear-gradient(270deg, #FF3333 0%, #FE6122 100%);
-    line-height: 44rpx;
-    position: relative;
-  }
-
-  .selectedNum {
-    position: absolute;
-    right: -10rpx;
-    top: -22rpx;
-    font-size: 24rpx;
-    color: #fff;
-    width: 32rpx;
-    height: 32rpx;
-    line-height: 32rpx;
-    background: #FE6B2C;
-    border-radius: 50%;
-    border: 1rpx solid #FFFFFF;
-  }
-</style>
+	.buy-card-item {
+		width: 100%;
+		margin-bottom: 32rpx;
+	}
+
+	.right-only-right-2 {
+		min-width: 50rpx;
+	}
+
+	.pop-shop-buttom-money {
+		width: 100%;
+		// height: 140rpx;
+		background: #ECECEC;
+		padding-left: 24rpx;
+		padding-right: 24rpx;
+		padding-bottom: calc(env(safe-area-inset-bottom) + 12rpx);
+		padding-top: 22rpx;
+		position: fixed;
+		left: 0;
+		bottom: 0;
+		z-index: 5;
+	}
+
+	.goods_img {
+		width: 152rpx;
+		height: 152rpx;
+		border-radius: 12rpx;
+		margin-right: 20rpx;
+	}
+
+	.car-scroll-box {
+		padding: 12rpx 24rpx calc(env(safe-area-inset-bottom) + 48rpx);
+	}
+
+	.buy-card {
+		height: 60vh;
+		border-radius: 24rpx 24rpx 0rpx 0rpx;
+	}
+
+	.buy-card-top {
+		width: 100%;
+		height: 92rpx;
+		background: #FCF5DB;
+		border-radius: 24rpx 24rpx 0rpx 0rpx;
+	}
+
+	.shop-buttom-money-1 {
+		width: 100%;
+		height: 96rpx;
+		position: relative;
+	}
+
+	.qk-icon {
+		width: 32rpx;
+		height: 32rpx;
+	}
+
+	.shop-buttom-money {
+		width: 100%;
+		// height: 140rpx;
+	}
+
+	.shop-buttom-money-1 {
+		width: 100%;
+		height: 96rpx;
+		position: relative;
+	}
+
+	.shop-buttom-money-2 {
+		width: 200rpx;
+		height: 80rpx;
+		line-height: 80rpx;
+		background: linear-gradient(270deg, #FF3333 0%, #FE6122 100%);
+	}
+
+	.gwc-img {
+		width: 88rpx;
+		height: 88rpx;
+	}
+
+	.shop-buttom-num {
+		width: 32rpx;
+		height: 32rpx;
+		line-height: 32rpx;
+		border-radius: 50%;
+		position: absolute;
+		top: 0rpx;
+		left: 85rpx;
+		border: 1rpx solid #FFFFFF;
+	}
+
+	.z-3 {
+		position: relative;
+		z-index: 3;
+	}
+
+	.order-bg {
+		width: 100%;
+		height: 17vh;
+		position: fixed;
+		left: 0;
+		top: 0;
+	}
+
+	.hide-h {
+		height: 232rpx !important;
+		overflow: hidden !important;
+	}
+
+	.down {
+		transform: rotate(-90deg);
+		transition: all 0.5s;
+	}
+
+	.up {
+		transform: rotate(90deg);
+		transition: all 0.5s;
+	}
+
+	.view-x {
+		width: 2rpx;
+		height: 20rpx;
+		background-color: #eee;
+		margin: 0 24rpx;
+	}
+
+	.find-item {
+		width: 48%;
+		text-align: left;
+	}
+
+	.list-item {
+		max-height: 688rpx;
+		min-width: 10rpx;
+		height: 56rpx;
+		line-height: 56rpx;
+		background: #F7F8FC;
+		border-radius: 200rpx;
+		margin: 0 8rpx 32rpx 0;
+		box-sizing: border-box;
+		padding: 0 24rpx;
+	}
+
+	.seacrh-bg {
+		position: absolute;
+		top: 0;
+		left: 0;
+		width: 100%;
+		height: 376rpx;
+		filter: blur(80rpx);
+		background-image: linear-gradient(to right, #C9F7FC, #F9F6E0, #F6F5F3);
+		z-index: -1;
+	}
+
+	.wh36 {
+		width: 36rpx;
+		height: 36rpx;
+	}
+
+	.input-box {
+		width: 100%;
+	}
+
+	.input-buttom {
+		width: 120rpx;
+		height: 60rpx;
+		background: linear-gradient(270deg, #FF3333 0%, #FE6122 100%);
+		line-height: 60rpx;
+	}
+
+	.s-input {
+		width: 100%;
+		height: 72rpx;
+		padding: 6rpx 6rpx 6rpx 24rpx;
+	}
+
+	.seacrh-info {
+		margin-top: 20rpx;
+		border-radius: 24rpx 24rpx 0rpx 0rpx;
+	}
+
+	.seacrh-record-index {
+		position: relative;
+	}
+
+	.wh-44 {
+		width: 44rpx;
+		height: 44rpx;
+	}
+
+	.menu-list {
+		width: 100%;
+
+		.goods_img {
+			width: 168rpx;
+			height: 168rpx;
+			border-radius: 12rpx;
+		}
+	}
+
+	.menu-list-right {
+		flex: 1;
+	}
+
+	.right-only-right-red {
+		width: 44rpx;
+		height: 44rpx;
+		line-height: 40rpx;
+		border-radius: 12rpx;
+		border: 1rpx solid #41ABF5;
+		color: #41ABF5;
+	}
+
+	.right-only-right-add {
+		width: 44rpx;
+		height: 44rpx;
+		line-height: 40rpx;
+		background: linear-gradient(117deg, #57CAFF 0%, #41ABF5 100%);
+		border-radius: 12rpx;
+	}
+
+	.right-only-right {
+		width: 116rpx;
+		height: 44rpx;
+		background: linear-gradient(270deg, #FF3333 0%, #FE6122 100%);
+		line-height: 44rpx;
+		position: relative;
+	}
+
+	.selectedNum {
+		position: absolute;
+		right: -10rpx;
+		top: -22rpx;
+		font-size: 24rpx;
+		color: #fff;
+		width: 32rpx;
+		height: 32rpx;
+		line-height: 32rpx;
+		background: #FE6B2C;
+		border-radius: 50%;
+		border: 1rpx solid #FFFFFF;
+	}
+</style>

+ 31 - 15
pages/login/index.vue

@@ -25,14 +25,8 @@
 <script>
 	import tools from "@/service/tools";
 	import {
-		commonRegisterSms
-	} from '@/api/common.js';
-	import {
-		membeRphoneLogin
+		appletLogin
 	} from "@/api/member";
-	import {
-		getAgreement
-	} from "@/api/common.js";
 
 	export default {
 		data() {
@@ -55,10 +49,37 @@
 			};
 		},
 		onLoad(data) {
-			console.log(data);
+			uni.setStorageSync('shop_id', 111)
+			uni.setStorageSync('table_number', 1)
+			this.authorizationLogin()
 		},
 		mounted() {},
 		methods: {
+			authorizationLogin() {
+				tools.showLoading()
+				uni.login({
+					provider: "weixin",
+					success: (loginRes) => {
+						this.appletLogin(loginRes.code);
+					},
+					fail: (loginRes) => {
+						this.isAjax = false;
+						tools.error("获取授权信息失败");
+					},
+				});
+			},
+			appletLogin(code) {
+				appletLogin({
+					'code': code
+				}).then(res => {
+					if (res.code === 1) {
+						tools.hideLoading()
+						uni.setStorageSync('token', res.data.token)
+						uni.setStorageSync('m_id', res.data.m_id)
+						// this.goToUrl()
+					}
+				})
+			},
 			refuse() {
 				// #ifdef MP-WEIXIN
 				// 微信小程序平台
@@ -83,13 +104,8 @@
 				if (this.isAjax) {
 					return false;
 				}
-				this.isAjax = true;
-				uni.switchTab({
-					url: "/pages/index/index",
-				});
-			},
-			noLogin() {
-				uni.switchTab({
+				this.isAjax = false;
+				uni.reLaunch({
 					url: "/pages/index/index",
 				});
 			}

+ 351 - 251
utils/cartStore.js

@@ -1,255 +1,355 @@
 class CartStore {
-  constructor() {
-    this.storageKey = 'shopping_cart';
-    this.currentShopId = ''; // 当前店铺ID
-  }
-  
-  // 设置当前店铺ID
-  setShopId() {
-    this.currentShopId = uni.getStorageSync('shop_id');
-  }
-  
-  // 获取购物车数据
-  getCart() {
-    try {
-      const cartStr = uni.getStorageSync(this.storageKey);
-      if (!cartStr) {
-        return {};
-      }
-      return JSON.parse(cartStr);
-    } catch (e) {
-      console.error('获取购物车失败:', e);
-      return {};
-    }
-  }
-  
-  // 保存购物车数据
-  saveCart(cartData) {
-    try {
-      uni.setStorageSync(this.storageKey, JSON.stringify(cartData));
-    } catch (e) {
-      console.error('保存购物车失败:', e);
-    }
-  }
-  
-  // 获取指定店铺的购物车
-  getShopCart(shopId = null) {
-    const cart = this.getCart();
-    const targetShopId = shopId || this.currentShopId;
-    if (!targetShopId) return null;
-    
-    if (!cart[targetShopId]) {
-      cart[targetShopId] = {
-        total_price: 0,
-        total_num: 0,
-        goods_list: [],
-        shop_info: null
-      };
-      this.saveCart(cart);
-    }
-    
-    return cart[targetShopId];
-  }
-  
-  // 添加商品到购物车
-  addToCart(goods, goodsSpec = [], quantity = 1) {
-    if (!this.currentShopId) {
-      console.error('未设置店铺ID');
-      return false;
-    }
-    
-    const cart = this.getCart();
-    if (!cart[this.currentShopId]) {
-      cart[this.currentShopId] = {
-        total_price: 0,
-        total_num: 0,
-        goods_list: [],
-        shop_info: null
-      };
-    }
-    
-    const shopCart = cart[this.currentShopId];
-    
-    // 生成商品唯一标识(结合商品ID和规格ID)
-    const specIdStr = goodsSpec.length > 0 
-      ? goodsSpec.map(spec => `${spec.id}_${spec.number}`).sort().join('_')
-      : 'no_spec';
-    
-    const goodsKey = `${goods.goods_id}_${specIdStr}`;
-    
-    // 查找是否已存在相同商品
-    const existingIndex = shopCart.goods_list.findIndex(
-      item => this.getGoodsKey(item) === goodsKey
-    );
-    
-    if (existingIndex > -1) {
-      // 已存在,更新数量
-      shopCart.goods_list[existingIndex].goods_number += quantity;
-    } else {
-      // 新商品,添加到列表
-      shopCart.goods_list.push({
-        goods_id: goods.goods_id,
-        goods_name: goods.goods_name || '',
-        goods_image: goods.goods_image || '',
-        price: this.calculatePrice(goods, goodsSpec),
-        goods_number: quantity,
-        goods_attr: this.getSpecAttr(goodsSpec),
-        goods_spec: goodsSpec,
-        category_id: goods.category_id,
-        goods_desc: goods.goods_desc || '',
-        spec_type: goods.spec_type || 1
-      });
-    }
-    
-    // 重新计算总计
-    this.calculateTotals(shopCart);
-    
-    // 保存到本地存储
-    this.saveCart(cart);
-    
-    return true;
-  }
-  
-  // 更新商品数量
-  updateQuantity(goodsId, goodsSpec = [], quantity) {
-    if (!this.currentShopId) return false;
-    
-    const cart = this.getCart();
-    const shopCart = cart[this.currentShopId];
-    if (!shopCart) return false;
-    
-    const specIdStr = goodsSpec.length > 0 
-      ? goodsSpec.map(spec => `${spec.id}_${spec.number}`).sort().join('_')
-      : 'no_spec';
-    
-    const goodsKey = `${goodsId}_${specIdStr}`;
-    
-    const goodsIndex = shopCart.goods_list.findIndex(
-      item => this.getGoodsKey(item) === goodsKey
-    );
-    
-    if (goodsIndex > -1) {
-      if (quantity <= 0) {
-        // 数量为0,移除商品
-        shopCart.goods_list.splice(goodsIndex, 1);
-      } else {
-        // 更新数量
-        shopCart.goods_list[goodsIndex].goods_number = quantity;
-      }
-      
-      // 重新计算总计
-      this.calculateTotals(shopCart);
-      this.saveCart(cart);
-      return true;
-    }
-    
-    return false;
-  }
-  
-  // 从购物车移除商品
-  removeFromCart(goodsId, goodsSpec = []) {
-    return this.updateQuantity(goodsId, goodsSpec, 0);
-  }
-  
-  // 清空当前店铺购物车
-  clearCurrentShopCart() {
-    if (!this.currentShopId) return false;
-    
-    const cart = this.getCart();
-    cart[this.currentShopId] = {
-      total_price: 0,
-      total_num: 0,
-      goods_list: []
-    };
-    
-    this.saveCart(cart);
-    return true;
-  }
-  
-  // 计算商品价格
-  calculatePrice(goods, goodsSpec = []) {
-    let price = goods.seckill_money > 0 ? Number(goods.seckill_money) : Number(goods.price);
-    // 如果有规格,累加规格价格
-    if (goodsSpec.length > 0) {
-      goodsSpec.forEach(spec => {
-        // 这里需要根据实际情况获取规格价格
-        // 假设规格信息中包含价格
-        if (spec.price) {
-          price += Number(spec.price) * (spec.number || 1);
-        }
-      });
-    }
-    
-    return Number(price).toFixed(2);
-  }
-  
-  // 获取规格描述
-  getSpecAttr(goodsSpec = []) {
-    if (goodsSpec.length === 0) return '';
-    return goodsSpec.map(spec => spec.name || '').join('、');
-  }
-  
-  // 生成商品唯一键
-  getGoodsKey(goodsItem) {
-    const specIdStr = goodsItem.goods_spec && goodsItem.goods_spec.length > 0
-      ? goodsItem.goods_spec.map(spec => `${spec.id}_${spec.number}`).sort().join('_')
-      : 'no_spec';
-    
-    return `${goodsItem.goods_id}_${specIdStr}`;
-  }
-  
-  // 计算购物车总计
-  calculateTotals(shopCart) {
-    let total_price = 0;
-    let total_num = 0;
-    
-    shopCart.goods_list.forEach(item => {
-      total_price += item.price * item.goods_number;
-      total_num += item.goods_number;
-    });
-    
-    shopCart.total_price = parseFloat(total_price.toFixed(2));
-    shopCart.total_num = total_num;
-  }
-  
-  // 获取商品在购物车中的数量
-  getGoodsQuantity(goodsId, goodsSpec = []) {
-    if (!this.currentShopId) return 0;
-    
-    const cart = this.getCart();
-    const shopCart = cart[this.currentShopId];
-    if (!shopCart) return 0;
-    
-    const specIdStr = goodsSpec.length > 0 
-      ? goodsSpec.map(spec => `${spec.id}_${spec.number}`).sort().join('_')
-      : 'no_spec';
-    
-    const goodsKey = `${goodsId}_${specIdStr}`;
-    
-    const goodsItem = shopCart.goods_list.find(
-      item => this.getGoodsKey(item) === goodsKey
-    );
-    
-    return goodsItem ? goodsItem.goods_number : 0;
-  }
-  
-  // 获取指定店铺购物车中某商品的总数量(所有规格合并)
-  getGoodsTotalQuantity(goodsId) {
-    if (!this.currentShopId) return 0;
-    
-    const cart = this.getCart();
-    const shopCart = cart[this.currentShopId];
-    if (!shopCart) return 0;
-    
-    let total = 0;
-    shopCart.goods_list.forEach(item => {
-      if (item.goods_id === goodsId) {
-        total += item.goods_number;
-      }
-    });
-    
-    return total;
-  }
+	constructor() {
+		this.storageKey = 'shopping_cart';
+		this.currentShopId = ''; // 当前店铺ID
+	}
+
+	// 设置当前店铺ID
+	setShopId() {
+		this.currentShopId = uni.getStorageSync('shop_id');
+	}
+
+	// 获取购物车数据
+	getCart() {
+		try {
+			const cartStr = uni.getStorageSync(this.storageKey);
+			if (!cartStr) {
+				return {};
+			}
+			return JSON.parse(cartStr);
+		} catch (e) {
+			console.error('获取购物车失败:', e);
+			return {};
+		}
+	}
+
+	// 保存购物车数据
+	saveCart(cartData) {
+		try {
+			uni.setStorageSync(this.storageKey, JSON.stringify(cartData));
+		} catch (e) {
+			console.error('保存购物车失败:', e);
+		}
+	}
+
+	// 获取指定店铺的购物车
+	getShopCart(shopId = null) {
+		const cart = this.getCart();
+		const targetShopId = shopId || this.currentShopId;
+		if (!targetShopId) return null;
+
+		if (!cart[targetShopId]) {
+			cart[targetShopId] = {
+				total_price: 0, //所有价格总和
+				total_num: 0,
+				goods_list: [],
+				pack_price: 0, //配送费总额
+				total_goods_money: 0, //商品价格总额
+				shop_info: null
+			};
+			this.saveCart(cart);
+		}
+
+		return cart[targetShopId];
+	}
+
+	// 添加商品到购物车
+	addToCart(goods, goodsSpec = [], quantity = 1) {
+		if (!this.currentShopId) {
+			console.error('未设置店铺ID');
+			return false;
+		}
+
+		const cart = this.getCart();
+		if (!cart[this.currentShopId]) {
+			cart[this.currentShopId] = {
+				total_price: 0,
+				total_num: 0,
+				goods_list: [],
+				pack_price: 0, //配送费总额
+				total_goods_money: 0, //商品价格总额
+				shop_info: null
+			};
+		}
+
+		const shopCart = cart[this.currentShopId];
+
+		// 生成商品唯一标识(结合商品ID和规格ID)
+		const specIdStr = goodsSpec.length > 0 ?
+			goodsSpec.map(spec => `${spec.id}_${spec.number}`).sort().join('_') :
+			'no_spec';
+
+		const goodsKey = `${goods.goods_id}_${specIdStr}`;
+
+		// 计算商品单价
+		const unitPrice = this.calculatePrice(goods, goodsSpec);
+
+		// 获取商品配送费
+		const packPrice = parseFloat(goods.pack_price || 0);
+
+		// 查找是否已存在相同商品
+		const existingIndex = shopCart.goods_list.findIndex(
+			item => this.getGoodsKey(item) === goodsKey
+		);
+
+		if (existingIndex > -1) {
+			// 已存在,更新数量
+			shopCart.goods_list[existingIndex].goods_number += quantity;
+		} else {
+			// 新商品,添加到列表
+			shopCart.goods_list.push({
+				goods_id: goods.goods_id,
+				goods_name: goods.goods_name || '',
+				goods_image: goods.goods_image || '',
+				// price: this.calculatePrice(goods, goodsSpec),
+				price: unitPrice,
+				pack_price: packPrice, // 单个商品配送费
+				goods_number: quantity,
+				goods_attr: this.getSpecAttr(goodsSpec),
+				goods_spec: goodsSpec,
+				category_id: goods.category_id,
+				goods_desc: goods.goods_desc || '',
+				spec_type: goods.spec_type || 1
+			});
+		}
+
+		// 重新计算总计
+		this.calculateTotals(shopCart);
+
+		// 保存到本地存储
+		this.saveCart(cart);
+
+		return true;
+	}
+
+	// 更新商品数量
+	updateQuantity(goodsId, goodsSpec = [], quantity) {
+		if (!this.currentShopId) return false;
+
+		const cart = this.getCart();
+		const shopCart = cart[this.currentShopId];
+		if (!shopCart) return false;
+
+		const specIdStr = goodsSpec.length > 0 ?
+			goodsSpec.map(spec => `${spec.id}_${spec.number}`).sort().join('_') :
+			'no_spec';
+
+		const goodsKey = `${goodsId}_${specIdStr}`;
+
+		const goodsIndex = shopCart.goods_list.findIndex(
+			item => this.getGoodsKey(item) === goodsKey
+		);
+
+		if (goodsIndex > -1) {
+			if (quantity <= 0) {
+				// 数量为0,移除商品
+				shopCart.goods_list.splice(goodsIndex, 1);
+			} else {
+				// 更新数量
+				shopCart.goods_list[goodsIndex].goods_number = quantity;
+			}
+
+			// 重新计算总计
+			this.calculateTotals(shopCart);
+			this.saveCart(cart);
+			return true;
+		}
+
+		return false;
+	}
+
+	// 从购物车移除商品
+	removeFromCart(goodsId, goodsSpec = []) {
+		return this.updateQuantity(goodsId, goodsSpec, 0);
+	}
+
+	// 清空当前店铺购物车
+	clearCurrentShopCart() {
+		if (!this.currentShopId) return false;
+
+		const cart = this.getCart();
+		cart[this.currentShopId] = {
+			total_price: 0,
+			total_num: 0,
+			goods_list: [],
+			pack_price: 0,
+			total_goods_money: 0,
+			shop_info: null
+		};
+
+		this.saveCart(cart);
+		return true;
+	}
+
+	// 计算商品价格
+	calculatePrice(goods, goodsSpec = []) {
+		let price = goods.seckill_money > 0 ? Number(goods.seckill_money) : Number(goods.price);
+		// 如果有规格,累加规格价格
+		if (goodsSpec.length > 0) {
+			goodsSpec.forEach(spec => {
+				// 这里需要根据实际情况获取规格价格
+				// 假设规格信息中包含价格
+				if (spec.price) {
+					price += Number(spec.price) * (spec.number || 1);
+				}
+			});
+		}
+
+		return Number(price).toFixed(2);
+	}
+
+	// 获取规格描述
+	getSpecAttr(goodsSpec = []) {
+		if (goodsSpec.length === 0) return '';
+		return goodsSpec.map(spec => spec.name || '').join('、');
+	}
+
+	// 生成商品唯一键
+	getGoodsKey(goodsItem) {
+		const specIdStr = goodsItem.goods_spec && goodsItem.goods_spec.length > 0 ?
+			goodsItem.goods_spec.map(spec => `${spec.id}_${spec.number}`).sort().join('_') :
+			'no_spec';
+
+		return `${goodsItem.goods_id}_${specIdStr}`;
+	}
+
+	// 计算购物车总计
+	calculateTotals(shopCart) {
+		// let total_price = 0;
+		let total_goods_money = 0; // 商品总额(不含配送费)
+		let total_pack_price = 0; // 配送费总额
+		let total_num = 0;
+
+		// 计算商品总额和总数量
+		shopCart.goods_list.forEach(item => {
+			const itemGoodsMoney = item.price * item.goods_number; // 商品金额
+			const itemPackPrice = parseFloat(item.pack_price || 0) * item.goods_number; // 配送费金额
+			const itemTotal = item.price * item.goods_number;
+			// total_goods_money += itemTotal;
+			// total_num += item.goods_number;
+			total_goods_money += itemGoodsMoney;
+			total_pack_price += itemPackPrice;
+			total_num += item.goods_number;
+		});
+
+		// 更新商品总额
+		shopCart.total_goods_money = parseFloat(total_goods_money.toFixed(2));
+
+		// 更新配送费总额
+		shopCart.pack_price = parseFloat(total_pack_price.toFixed(2));
+
+		// 更新商品总数量
+		shopCart.total_num = total_num;
+
+		// 计算总价:商品总额 + 配送费
+		const total_price = shopCart.total_goods_money + (shopCart.pack_price || 0);
+		shopCart.total_price = parseFloat(total_price.toFixed(2));
+
+		// shopCart.goods_list.forEach(item => {
+		// 	total_price += item.price * item.goods_number;
+		// 	total_num += item.goods_number;
+		// });
+
+		// shopCart.total_price = parseFloat(total_price.toFixed(2));
+		// shopCart.total_num = total_num;
+	}
+
+	// 获取商品在购物车中的数量
+	getGoodsQuantity(goodsId, goodsSpec = []) {
+		if (!this.currentShopId) return 0;
+
+		const cart = this.getCart();
+		const shopCart = cart[this.currentShopId];
+		if (!shopCart) return 0;
+
+		const specIdStr = goodsSpec.length > 0 ?
+			goodsSpec.map(spec => `${spec.id}_${spec.number}`).sort().join('_') :
+			'no_spec';
+
+		const goodsKey = `${goodsId}_${specIdStr}`;
+
+		const goodsItem = shopCart.goods_list.find(
+			item => this.getGoodsKey(item) === goodsKey
+		);
+
+		return goodsItem ? goodsItem.goods_number : 0;
+	}
+
+	// 获取指定店铺购物车中某商品的总数量(所有规格合并)
+	getGoodsTotalQuantity(goodsId) {
+		if (!this.currentShopId) return 0;
+
+		const cart = this.getCart();
+		const shopCart = cart[this.currentShopId];
+		if (!shopCart) return 0;
+
+		let total = 0;
+		shopCart.goods_list.forEach(item => {
+			if (item.goods_id === goodsId) {
+				total += item.goods_number;
+			}
+		});
+
+		return total;
+	}
+
+	// 获取购物车统计数据
+	getCartStats(shopId = null) {
+		const shopCart = this.getShopCart(shopId);
+		if (!shopCart) {
+			return {
+				total_price: 0,
+				total_num: 0,
+				goods_list: [],
+				pack_price: 0,
+				total_goods_money: 0
+			};
+		}
+
+		return {
+			total_price: shopCart.total_price || 0,
+			total_num: shopCart.total_num || 0,
+			goods_list: shopCart.goods_list || [],
+			pack_price: shopCart.pack_price || 0,
+			total_goods_money: shopCart.total_goods_money || 0
+		};
+	}
+
+	// 获取商品总额(不含配送费)
+	getGoodsTotalMoney(shopId = null) {
+		const shopCart = this.getShopCart(shopId);
+		return shopCart ? (shopCart.total_goods_money || 0) : 0;
+	}
+
+	// 获取配送费
+	getPackPrice(shopId = null) {
+		const shopCart = this.getShopCart(shopId);
+		return shopCart ? (shopCart.pack_price || 0) : 0;
+	}
+
+	// 获取总价(商品总额+配送费)
+	getTotalPrice(shopId = null) {
+		const shopCart = this.getShopCart(shopId);
+		return shopCart ? (shopCart.total_price || 0) : 0;
+	}
+	// 获取单个商品在购物车中的信息
+	getGoodsInfo(goodsId, goodsSpec = []) {
+		if (!this.currentShopId) return null;
+
+		const cart = this.getCart();
+		const shopCart = cart[this.currentShopId];
+		if (!shopCart) return null;
+
+		const specIdStr = goodsSpec.length > 0 ?
+			goodsSpec.map(spec => `${spec.id}_${spec.number}`).sort().join('_') :
+			'no_spec';
+
+		const goodsKey = `${goodsId}_${specIdStr}`;
+
+		return shopCart.goods_list.find(
+			item => this.getGoodsKey(item) === goodsKey
+		);
+	}
 }
 
 // 创建单例