Sfoglia il codice sorgente

地区筛选改到前端

1410417013 7 mesi fa
parent
commit
1fa0d395e8

+ 1 - 1
my/coupon/index.vue

@@ -114,7 +114,7 @@ export default {
 				})
 			} else {
 				uni.navigateTo({
-					url: '/pages/index/shop/index?shopId=' + item.shopId + '&shopTypeId=' + item.shopTypeId
+					url: '/pages/index/shop/index?shopId=' + item.shopId + '&shopTypeId=' + item.shopTypeId+'&lat='+uni.getStorageSync('lat')+'&lng='+uni.getStorageSync('lng')
 				})
 			}
 		}

+ 1 - 1
my/myPingJia/myPingJia.vue

@@ -126,7 +126,7 @@ export default {
 		//去商铺
 		gotoShop(shopId, item) {
 			uni.navigateTo({
-				url: '/pages/index/shop/index?shopId=' + shopId + '&shopTypeId=' + item.shopTypeId
+				url: '/pages/index/shop/index?shopId=' + shopId + '&shopTypeId=' + item.shopTypeId+'&lat='+uni.getStorageSync('lat')+'&lng='+uni.getStorageSync('lng')
 			})
 		},
 		//预览图片

+ 13 - 18
my/vip/shop.vue

@@ -190,11 +190,12 @@
 				XCXIsSelect: '否',
 				content:'',
 				hintShow: false,
+				city:'',
 			}
 		},
 		onLoad(e) {
-			console.log(e)
-			
+			// console.log(e,'l')
+			this.city=e.city
 			this.XCXIsSelect = this.$queue.getData('XCXIsSelect');
 			if (this.XCXIsSelect == '否') {
 				this.getGuize()
@@ -223,7 +224,7 @@
 				}
 			});
 			that.getShopList()
-			that.gethdlist();
+			// that.gethdlist();
 		},
 		methods: {
 			//筛选活动
@@ -278,7 +279,7 @@
 				})
 			},
 			getSelect(e) {
-				console.log(e)
+				// console.log(e)
 				this.options4.forEach(res => {
 					if (res.id == e.id) {
 						res.select = true
@@ -292,28 +293,28 @@
 				})
 			},
 			confirm(e) {
-				console.log(e)
+				// console.log(e)
 				this.page = 1
 				this.current = e;
 
 				this.getShopList();
 			},
 			confirm2(e) {
-				console.log(e)
+				// console.log(e)
 				this.page = 1
 				this.current = e;
 
 				this.getShopList();
 			},
 			confirm3(e) {
-				console.log(e)
+				// console.log(e)
 				this.page = 1
 				this.current = e;
 
 				this.getShopList();
 			},
 			confirm4(e) {
-				console.log(e)
+				// console.log(e)
 				this.page = 1
 				this.shopTypeId = e
 
@@ -331,7 +332,8 @@
 					shopTypeId: this.shopTypeId,
 					lng: uni.getStorageSync('lng'),
 					lat: uni.getStorageSync('lat'),
-					vipPromotion:1 
+					vipPromotion:1,
+					city:this.city
 					// activityId: this.activityId,
 				}
 				console.log(data,'输入数据') 
@@ -392,13 +394,6 @@
 				let closeTime = this.shop.lockHours.split(':')[0] //结束小时
 				let closeTime1 = this.shop.lockHours.split(':')[1] //结束分钟.
 				// console.log(hours)
-				// console.log(minute)
-				// console.log(openTime)
-				// console.log(openTime1)
-				
-				// console.log(closeTime)
-				// console.log(closeTime1)
-				// console.log(minute >= closeTime1)
 				if (hours < openTime) {
 					this.hintShow = true
 					return
@@ -417,7 +412,7 @@
 				let items = encodeURIComponent(JSON.stringify(shuzu));
 				// if (this.userId) {
 					uni.navigateTo({
-						url:'/pages/index/shop/index?shopId='+url+'&huoListss='+items+'&shopTypeId='+e.shopTypeId
+						url:'/pages/index/shop/index?shopId='+url+'&huoListss='+items+'&shopTypeId='+e.shopTypeId+'&lat='+uni.getStorageSync('lat')+'&lng='+uni.getStorageSync('lng')
 					})
 				// } else {
 				// 	uni.navigateTo({
@@ -458,7 +453,7 @@
 				// 	return
 				// }
 
-				console.log(url)
+				// console.log(url)
 				if (this.userId) {
 					uni.navigateTo({
 						url

+ 4 - 4
pages/index/index.vue

@@ -39,7 +39,7 @@
 				</view>
 			</view>
 			<view class="padding-lr" @click="natiVip">
-				<image class="radius" style="width: 100%;height: 280rpx;" src="https://mxys.chuanghai-tech.com/wmfile/20251124/ce18c619fcef4483a67613a3fb1c4256.png"></image>
+				<image class="radius" style="width: 100%;height: 280rpx;" src="https://mxys.chuanghai-tech.com/wmfile/20251128/aa2e9bf9a4e04b758090007ac04cea44.jpg"></image>
 			</view>
 			<!-- 公告 -->
 			<!-- <view class="flex justify-between align-center bg-white padding-bottom padding-lr radius bg-white"
@@ -660,7 +660,7 @@
 			natiVip(){
 				if (this.token) {
 					uni.navigateTo({
-						url:'/my/vip/shop'
+						url:'/my/vip/shop?city='+this.city
 					})
 				} else {
 					this.bindlogin()
@@ -1142,7 +1142,7 @@
 				})
 			},
 			goNav(url,type) {
-				console.log(url)
+				console.log(url,'lkk')
 				if(url=='/my/integral/index' || url=='/my/task/index'){
 					uni.navigateTo({
 						url: '/pages/public/login'
@@ -1306,7 +1306,7 @@
 			},
 			// 查看金刚区详情
 			goDetail(item) {
-				console.log(item);
+				console.log(item,'kkkk');
 				if (uni.getStorageSync('sendMsg')) {
 					console.log('授权+1',this.arr)
 					wx.requestSubscribeMessage({

+ 27 - 2
pages/index/search/index.vue

@@ -259,11 +259,13 @@ export default {
 			shopTypeId: '',
 			title: '综合排序',
 			title1: '筛选',
-			totalCount: 0
+			totalCount: 0,
+			city:'',
 		}
 	},
 	onLoad() {
 		let that = this
+		this.defaultAddress()
 		this.getSearchList()
 		this.gethdlist()
 		this.userId = uni.getStorageSync('userId') ? uni.getStorageSync('userId') : ''
@@ -280,6 +282,27 @@ export default {
 		})
 	},
 	methods: {
+		defaultAddress() {
+			if (uni.getStorageSync('city')) {
+				this.address = uni.getStorageSync('city')
+			}
+			let data = {
+				page: 1,
+				limit: 1000
+			}
+			this.$Request.get('/app/address/selectAddressList', data).then(res => {
+				if (res.code == 0 && res.data.list.length) {
+					this.city=res.data.list[0].city
+					res.data.list.forEach(res => {
+						if (res.addressDefault) {
+							this.city=res.city
+						}
+					})
+		
+				} else {
+				}
+			})
+		},
 		//筛选活动
 		searchhd(index, activityId) {
 			if (index == this.currenthd) {
@@ -396,10 +419,12 @@ export default {
 				lng: this.lng,
 				lat: this.lat,
 				userId: this.userId,
-				activityId: this.activityId
+				activityId: this.activityId,
+				city:this.city
 			}
 
 			this.$Request.get('/app/goods/selectShop', data).then((res) => {
+				console.log(res,'搜索',data,uni.getStorageSync('city'))
 				if (res.code == 0) {
 					this.totalCount = res.data.totalCount
 					res.data.list.forEach((ret) => {

+ 103 - 27
pages/index/shop/confirmOrder.vue

@@ -27,6 +27,11 @@
 						</view>
 					</view>
 				</view>
+				<view class="flex margin-top" style="align-items: center">
+					<view style="font-size: 32rpx;color: #333333;font-weight: bold;">是否店内就餐?</view>
+					<view style="margin-left: 140px;transform: scale(0.8); "><switch :checked="ispackType" @change="handleSwitchChange" color="#4cd964"/></view>
+				</view>
+				<view style="color: #ea0018;">(店内就餐减免打包费)</view>
 				<view class="flex margin-top" style="align-items: center" v-if="shopTypeName == '三大运营商'">
 					<view>请填写身份证号:</view>
 					<input type="idcard" v-model="idcard1" style="border: 1px solid" />
@@ -101,7 +106,7 @@
 						<view v-if="item.skuMessage">{{ item.skuMessage }}</view>
 						<view>x{{ item.goodsNum }}</view>
 					</view>
-					<view class="flex justify-between text-bold align-center margin-tb-sm">
+					<view class="flex justify-between text-bold align-center margin-tb-sm" v-if="packType==1">
 						<view>打包费</view>
 						<view class="">¥{{ item.goodsPack }} / 份</view>
 					</view>
@@ -415,7 +420,9 @@ export default {
 			// 是否显示积分模块
 			isIntegral: false,
 			shopTypeName: '', //店铺类型
-			idcard1: '' //身份证号
+			idcard1: '', //身份证号
+			packType:1,//堂食0,到店外卖打包1
+			ispackType:false,
 		}
 	},
 	onLoad(option) {
@@ -492,6 +499,35 @@ export default {
 		}
 	},
 	methods: {
+		// 开关状态变化时触发
+		handleSwitchChange(e) {
+		  this.ispackType = e.detail.value; // 更新状态
+		  console.log("开关状态:", this.ispackType);
+		  // 可在此处添加业务逻辑(如保存状态到缓存、调用接口等)
+		  if (this.ispackType) {
+			this.packType=0
+		  } else {
+			this.packType=1
+		  }
+		  console.log("堂食或:packType", this.packType);
+		  if (this.orderType == 2) {
+		  	this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
+		  } else {
+		  	if(this.packType==1){
+		  		this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
+		  	}else{
+		  		this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
+		  	}
+		  }
+		  
+		  let totalMoney = parseFloat(this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
+		  
+		  if (totalMoney <= 0) {
+		  	this.totalPrice1 = 0.01
+		  } else {
+		  	this.totalPrice1 = totalMoney
+		  }
+		},
 		//获取会员立减金额
 		getvipMoney() {
 			var shopId =this.shopId
@@ -815,20 +851,36 @@ export default {
 					parseFloat(this.totalPrice) + parseFloat(this.paotuiMoney) + parseFloat(this.dabaoMoney) + parseFloat(this.address.insideDeliveryFee)
 				).toFixed(2)
 			} else {
-				this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
+				if(this.packType==1){
+					this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
+				}else{
+					this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
+				}
+			}
+			let totalMoney = parseFloat(
+				this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0).toFixed(2)
+			).toFixed(2)
+			if (totalMoney <= 0) {
+				this.totalPrice1 = 0.01
+			} else {
+				this.totalPrice1 = totalMoney
 			}
-			console.log(this.totalPrice1,'切换')
+			console.log(this.totalPrice1,'切换',totalMoney)
 			if (this.coupon) {
 				if (this.orderType == 2) {
 					this.totalPrice1 = parseFloat(
 						parseFloat(this.totalPrice) + parseFloat(this.paotuiMoney) + parseFloat(this.dabaoMoney) + parseFloat(this.address.insideDeliveryFee)
 					).toFixed(2)
 				} else {
-					this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
+					if(this.packType==1){
+						this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
+					}else{
+						this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
+					}
 				}
 				let totalMoney = parseFloat(
 					this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0).toFixed(2)
-				)
+				).toFixed(2)
 				if (totalMoney <= 0) {
 					this.totalPrice1 = 0.01
 				} else {
@@ -842,11 +894,15 @@ export default {
 						parseFloat(this.totalPrice) + parseFloat(this.paotuiMoney) + parseFloat(this.dabaoMoney) + parseFloat(this.address.insideDeliveryFee)
 					).toFixed(2)
 				} else {
-					this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
+					if(this.packType==1){
+						this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
+					}else{
+						this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
+					}
 				}
 				let totalMoney = parseFloat(
 					this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0).toFixed(2)
-				)
+				).toFixed(2)
 				if (totalMoney <= 0) {
 					this.totalPrice1 = 0.01
 				} else {
@@ -858,12 +914,15 @@ export default {
 						parseFloat(this.totalPrice) + parseFloat(this.paotuiMoney) + parseFloat(this.dabaoMoney) + parseFloat(this.address.insideDeliveryFee)
 					).toFixed(2)
 				} else {
-					this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
+					if(this.packType==1){
+						this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
+					}else{
+						this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
+					}
 				}
 				let totalMoney = parseFloat(
 					this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0).toFixed(2)
-				)
-				console.log(this.totalPrice1,this.coupon.money,this.Vipmoney.reduceAmount,totalMoney,'totalMoney')
+				).toFixed(2)
 				if (totalMoney <= 0) {
 					this.totalPrice1 = 0.01
 				} else {
@@ -887,7 +946,11 @@ export default {
 			if (this.orderType == 2) {
 				this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
 			} else {
-				this.totalPrice1 = parseFloat(this.totalPrice + this.dabaoMoney).toFixed(2)
+				if(this.packType==1){
+					this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
+				}else{
+					this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
+				}
 			}
 
 			let totalMoney = parseFloat(this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
@@ -914,7 +977,11 @@ export default {
 			if (this.orderType == 2) {
 				this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
 			} else {
-				this.totalPrice1 = parseFloat(this.totalPrice + this.dabaoMoney).toFixed(2)
+				if(this.packType==1){
+					this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
+				}else{
+					this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
+				}
 			}
 			let totalMoney = parseFloat(this.totalPrice1 - (this.huodong.discountAmount ? this.huodong.discountAmount : 0) - (this.coupon.money ? this.coupon.money : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
 			if (totalMoney <= 0) {
@@ -949,7 +1016,11 @@ export default {
 							if (this.orderType == 2) {
 								this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
 							} else {
-								this.totalPrice1 = parseFloat(this.totalPrice + this.dabaoMoney).toFixed(2)
+								if(this.packType==1){
+									this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
+								}else{
+									this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
+								}
 							}
 
 							let totalMoney = parseFloat(
@@ -994,7 +1065,11 @@ export default {
 							if (this.orderType == 2) {
 								this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
 							} else {
-								this.totalPrice1 = parseFloat(this.totalPrice + this.dabaoMoney).toFixed(2)
+								if(this.packType==1){
+									this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
+								}else{
+									this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
+								}
 							}
 
 							let totalMoney = parseFloat(
@@ -1078,7 +1153,7 @@ export default {
 			}
 			// console.log(data)
 			this.$Request.get('/app/order/selectAllOrderList', data).then((res) => {
-				// console.log(res)
+				console.log(res,'moneuy')
 				uni.hideLoading()
 				if (res.code == 0 && res.data.pageUtils.list.length) {
 					this.GoodsorderId = res.data.pageUtils.list[0].orderId
@@ -1120,12 +1195,15 @@ export default {
 							parseFloat(this.totalPrice) + parseFloat(this.paotuiMoney) + parseFloat(this.dabaoMoney) + parseFloat(this.address.insideDeliveryFee)
 						).toFixed(2)
 					} else {
-						this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
+						if(this.packType==1){
+							this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
+						}else{
+							this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
+						}
 					}
 					let totalMoney = parseFloat(
 						this.totalPrice1 - (this.huodong.discountAmount ? this.huodong.discountAmount : 0) - (this.coupon.money ? this.coupon.money : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)
 					).toFixed(2)
-					
 					if (totalMoney <= 0) {
 						this.totalPrice1 = 0.01
 					} else {
@@ -1185,7 +1263,11 @@ export default {
 							parseFloat(this.totalPrice) + parseFloat(this.paotuiMoney) + parseFloat(this.dabaoMoney) + parseFloat(this.address.insideDeliveryFee)
 						).toFixed(2)
 					} else {
-						this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
+						if(this.packType==1){
+							this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
+						}else{
+							this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
+						}
 					}
 					let totalMoney = parseFloat(
 						this.totalPrice1 - (this.huodong.discountAmount ? this.huodong.discountAmount : 0) - (this.coupon.money ? this.coupon.money : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)
@@ -1251,13 +1333,6 @@ export default {
 			if (this.remark) {
 				this.takeReark()
 			}
-			// if(this.orderType == 1){
-			// 	uni.showToast({
-			// 		title: '是否店内就餐?',
-			// 		icon: 'none'
-			// 	})
-			// 	return
-			// }
 			uni.showLoading({
 				title: '支付中...',
 				mask: true // 是否显示透明蒙层,防止触摸穿透
@@ -1340,7 +1415,8 @@ export default {
 							addressId: this.address.addressId ? this.address.addressId : '',
 							orderType: this.orderType,
 							type: res.enable ? 1 : 3,
-							idCard: this.idcard1
+							idCard: this.idcard1,
+							packType:this.packType
 						}
 
 						console.log(data,'xinjiu')

+ 2 - 0
pages/index/shop/index.vue

@@ -1002,6 +1002,8 @@ export default {
 
 					if (urlreq == '/app/goods/selectGoodsClassifyList') {
 						this.getSupermarketGoodsList(this.dataList[0].classifyId)
+					}else{
+						this.getSupermarketGoodsList(this.dataList[0].classifyId)
 					}
 				}
 			})

+ 118 - 21
pages/index/shop/payOrder.vue

@@ -4,11 +4,11 @@
 		<view class="text-center text-red" v-if="isTrue && orderType == 2">超出配送距离</view>
 		<view class="food">
 			<view class="flex bg justify-between padding-lr-xl">
-				<view @click="switchTab(2)" :class="orderType == 2 ? 'select' : ''" class="tabBtn" v-if="XCXIsSelect == '是'">
+				<view @click="switchTab(2)" :class="orderType == 2 ? 'select' : ''" class="tabBtn" v-if="XCXIsSelect == '是' && showReach != 1 && shopTypeName != '三大运营商'">
 					<view class="title">外卖配送</view>
 					<view :class="orderType == 2 ? 'active' : ''"></view>
 				</view>
-				<view @click="switchTab(1)" :class="orderType == 1 ? 'select' : ''" class="tabBtn">
+				<view @click="switchTab(1)" :class="orderType == 1 ? 'select' : ''" class="tabBtn" v-if="showReach != 2">
 					<view class="title">到店自取</view>
 					<view :class="orderType == 1 ? 'active' : ''"></view>
 				</view>
@@ -29,6 +29,15 @@
 						</view>
 					</view>
 				</view>
+				<view class="flex margin-top" style="align-items: center">
+					<view style="font-size: 32rpx;color: #333333;font-weight: bold;">是否店内就餐?</view>
+					<view style="margin-left: 140px;transform: scale(0.8); "><switch :checked="ispackType" @change="handleSwitchChange" color="#4cd964"/></view>
+				</view>
+				<view style="color: #ea0018;">(店内就餐减免打包费)</view>
+				<view class="flex margin-top" style="align-items: center" v-if="shopTypeName == '三大运营商'">
+					<view>请填写身份证号:</view>
+					<input type="idcard" v-model="idcard1" style="border: 1px solid" />
+				</view>
 			</view>
 			<view class="" v-if="orderType == 2">
 				<view class="goods_address" v-if="JSON.stringify(address) == '{}'" @click="goAddress">
@@ -86,7 +95,7 @@
 						<view v-if="item.skuMessage">{{ item.skuMessage }}</view>
 						<view>x{{ item.goodsNum }}</view>
 					</view>
-					<view class="flex justify-between align-center text-gray margin-tb-sm" v-if="item.goodsPack">
+					<view class="flex justify-between align-center text-gray margin-tb-sm" v-if="item.goodsPack&&packType==1">
 						<view>打包费</view>
 						<view class="">¥{{ item.goodsPack }} / 份</view>
 					</view>
@@ -380,6 +389,7 @@ export default {
 			ifPaotui: 0, //是否满减
 			reservationOpenFlag: 0, //1预约,0不预约
 			shopId: '',
+			showReach: null,
 			// 基础实付满多少
 			ruleAmount1: 0,
 			// 基础实付满多少送的积分
@@ -395,18 +405,30 @@ export default {
 			// 可获得积分
 			intergral: 0,
 			// 是否显示积分模块
-			isIntegral: false
+			isIntegral: false,
+			shopTypeName: '', //店铺类型
+			idcard1: '', //身份证号
+			packType:1,//堂食0,到店外卖打包1
+			ispackType:false,
 		}
 	},
 	onLoad(option) {
+		this.shopTypeName = option.shopTypeName
+		if (option.showReach) {
+			this.showReach = option.showReach
+		}
 		// #ifdef MP-WEIXIN
 		this.XCXIsSelect = this.$queue.getData('XCXIsSelect') ? this.$queue.getData('XCXIsSelect') : '是'
 		// #endif
 
-		this.orderId = option.orderId
-		this.orderType = option.orderType
-		if (option.shopId) {
-			this.shopId = option.shopId
+		this.shopId = option.shopId
+		if (option.shopTypeName == '三大运营商') {
+			this.orderType = 1
+		} else {
+			this.orderType = option.orderType
+		}
+		if (option.orderId) {
+			this.orderId = option.orderId
 		}
 
 		uni.showLoading({
@@ -459,6 +481,35 @@ export default {
 		}
 	},
 	methods: {
+		// 开关状态变化时触发
+		handleSwitchChange(e) {
+		  this.ispackType = e.detail.value; // 更新状态
+		  console.log("开关状态:", this.ispackType);
+		  // 可在此处添加业务逻辑(如保存状态到缓存、调用接口等)
+		  if (this.ispackType) {
+			this.packType=0
+		  } else {
+			this.packType=1
+		  }
+		  console.log("堂食或:packType", this.packType);
+		  if (this.orderType == 2) {
+		  	this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
+		  } else {
+		  	if(this.packType==1){
+		  		this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
+		  	}else{
+		  		this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
+		  	}
+		  }
+		  
+		  let totalMoney = parseFloat(this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
+		  
+		  if (totalMoney <= 0) {
+		  	this.totalPrice1 = 0.01
+		  } else {
+		  	this.totalPrice1 = totalMoney
+		  }
+		},
 		//获取会员立减金额
 		getvipMoney() {
 			var shopId =this.shopId
@@ -790,17 +841,33 @@ export default {
 			if (this.orderType == 2) {
 				this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
 			} else {
-				this.totalPrice1 = parseFloat(this.totalPrice + this.dabaoMoney).toFixed(2)
+				if(this.packType==1){
+					this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
+				}else{
+					this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
+				}
+			}
+			let totalMoney = parseFloat(
+				this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0).toFixed(2)
+			).toFixed(2)
+			if (totalMoney <= 0) {
+				this.totalPrice1 = 0.01
+			} else {
+				this.totalPrice1 = totalMoney
 			}
 			if (this.coupon) {
 				if (this.orderType == 2) {
 					this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
 				} else {
-					this.totalPrice1 = parseFloat(this.totalPrice + this.dabaoMoney).toFixed(2)
+					if(this.packType==1){
+						this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
+					}else{
+						this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
+					}
 				}
 				let totalMoney = parseFloat(
 					this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0).toFixed(2)
-				)
+				).toFixed(2)
 				if (totalMoney <= 0) {
 					this.totalPrice1 = 0.01
 				} else {
@@ -812,11 +879,15 @@ export default {
 				if (this.orderType == 2) {
 					this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
 				} else {
-					this.totalPrice1 = parseFloat(this.totalPrice + this.dabaoMoney).toFixed(2)
+					if(this.packType==1){
+						this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
+					}else{
+						this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
+					}
 				}
 				let totalMoney = parseFloat(
 					this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0).toFixed(2)
-				)
+				).toFixed(2)
 				if (totalMoney <= 0) {
 					this.totalPrice1 = 0.01
 				} else {
@@ -826,11 +897,15 @@ export default {
 				if (this.orderType == 2) {
 					this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
 				} else {
-					this.totalPrice1 = parseFloat(this.totalPrice + this.dabaoMoney).toFixed(2)
+					if(this.packType==1){
+						this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
+					}else{
+						this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
+					}
 				}
 				let totalMoney = parseFloat(
 					this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0).toFixed(2)
-				)
+				).toFixed(2)
 				if (totalMoney <= 0) {
 					this.totalPrice1 = 0.01
 				} else {
@@ -854,7 +929,11 @@ export default {
 			if (this.orderType == 2) {
 				this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
 			} else {
-				this.totalPrice1 = parseFloat(this.totalPrice + this.dabaoMoney).toFixed(2)
+				if(this.packType==1){
+					this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
+				}else{
+					this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
+				}
 			}
 			let totalMoney = parseFloat(this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
 
@@ -883,7 +962,11 @@ export default {
 			if (this.orderType == 2) {
 				this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
 			} else {
-				this.totalPrice1 = parseFloat(this.totalPrice + this.dabaoMoney).toFixed(2)
+				if(this.packType==1){
+					this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
+				}else{
+					this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
+				}
 			}
 
 			let totalMoney = parseFloat(this.totalPrice1 - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
@@ -916,7 +999,11 @@ export default {
 							if (this.orderType == 2) {
 								this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
 							} else {
-								this.totalPrice1 = parseFloat(this.totalPrice + this.dabaoMoney).toFixed(2)
+								if(this.packType==1){
+									this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
+								}else{
+									this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
+								}
 							}
 
 							let totalMoney = parseFloat(
@@ -960,7 +1047,11 @@ export default {
 							if (this.orderType == 2) {
 								this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
 							} else {
-								this.totalPrice1 = parseFloat(this.totalPrice + this.dabaoMoney).toFixed(2)
+								if(this.packType==1){
+									this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
+								}else{
+									this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
+								}
 							}
 
 							let totalMoney = parseFloat(
@@ -1040,7 +1131,11 @@ export default {
 					if (this.orderType == 2) {
 						this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
 					} else {
-						this.totalPrice1 = this.totalPrice + this.dabaoMoney
+						if(this.packType==1){
+							this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
+						}else{
+							this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
+						}
 					}
 					let totalMoney = parseFloat(
 						this.totalPrice1 - (this.huodong.discountAmount ? this.huodong.discountAmount : 0) - (this.coupon.money ? this.coupon.money : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)
@@ -1176,7 +1271,9 @@ export default {
 							couponId: this.coupon ? this.coupon.id : '',
 							addressId: this.address.addressId ? this.address.addressId : '',
 							orderType: this.orderType,
-							type: res.enable ? 1 : 3
+							type: res.enable ? 1 : 3,
+							idCard: this.idcard1,
+							packType:this.packType
 						}
 
 						console.log(data)

+ 5 - 3
pages/index/shopList/index.vue

@@ -190,11 +190,12 @@
 				XCXIsSelect: '否',
 				content:'',
 				hintShow: false,
+				city:'',
 			}
 		},
 		onLoad(e) {
 			console.log(e)
-			
+			this.city=e.city
 			this.XCXIsSelect = this.$queue.getData('XCXIsSelect');
 			if (this.XCXIsSelect == '否') {
 				this.getGuize()
@@ -331,7 +332,8 @@
 					shopTypeId: this.shopTypeId,
 					lng: uni.getStorageSync('lng'),
 					lat: uni.getStorageSync('lat'),
-					activityId:this.activityId
+					activityId:this.activityId,
+					city:this.city,
 				}
 				this.$Request.getT('/app/goods/selectShop', data).then(res => {
 					uni.hideLoading()
@@ -413,7 +415,7 @@
 				let items = encodeURIComponent(JSON.stringify(shuzu));
 				// if (this.userId) {
 					uni.navigateTo({
-						url:'/pages/index/shop/index?shopId='+url+'&huoListss='+items+'&shopTypeId='+e.shopTypeId
+						url:'/pages/index/shop/index?shopId='+url+'&huoListss='+items+'&shopTypeId='+e.shopTypeId+'&lat='+uni.getStorageSync('lat')+'&lng='+uni.getStorageSync('lng')
 					})
 				// } else {
 				// 	uni.navigateTo({

+ 1 - 1
pages/index/shopList/indexShop.vue

@@ -388,7 +388,7 @@
 				let items = encodeURIComponent(JSON.stringify(shuzu));
 				if (this.userId) {
 					uni.navigateTo({
-						url:'/pages/index/shop/index?shopId='+url+'&huoListss='+items+'&shopTypeId='+e.shopTypeId
+						url:'/pages/index/shop/index?shopId='+url+'&huoListss='+items+'&shopTypeId='+e.shopTypeId+'&lat='+uni.getStorageSync('lat')+'&lng='+uni.getStorageSync('lng')
 					})
 				} else {
 					uni.navigateTo({

+ 1 - 1
pages/order/feedback.vue

@@ -289,7 +289,7 @@ export default {
 
 		send() {
 			// console.log(this.orderTypeExtra)
-			if (this.orderTypeExtra == 1 || this.orderTypeExtra == 3) {
+			if (this.orderTypeExtra == 1 || this.orderTypeExtra == 3||this.orderTypeExtra==0) {
 				// 到店取餐
 				if (!this.value) {
 					uni.showToast({

+ 6 - 3
pages/order/index.vue

@@ -48,7 +48,10 @@
 							<view class="margin-left-xs">{{ item.shopName }}</view>
 						</view>
 					</view>
-					<view style="padding: 0 30rpx; font-size: 20px" v-if="item.orderSequence">#{{ item.orderSequence }}</view>
+					<view style="padding: 0 30rpx; font-size: 20px">
+						{{ item.orderTypeExtra == 0 ? '上门堂食' :item.orderTypeExtra == 1 ? '上门取餐' : item.orderTypeExtra == 2 ? '骑手配送' : item.orderTypeExtra == 3 ? '商家配送' : '' }} 
+						<view v-if="item.orderSequence">#{{ item.orderSequence }}</view>
+					</view>
 					<view style="padding: 0 30rpx; font-size: 16px" v-if="item.idCard">身份证号:{{ item.idCard }}</view>
 
 					<view class="cont_two_text" v-if="item.orderCode">{{ item.orderCode }}</view>
@@ -184,7 +187,7 @@
 
 							<view v-if="item.riderPhone" @click.stop="bindphone(item.riderPhone)">骑手电话:{{ item.riderPhone }}</view>
 							<view>
-								{{ item.orderTypeExtra == 1 ? '到店取餐' : item.orderTypeExtra == 2 ? '骑手配送' : item.orderTypeExtra == 3 ? '商家配送' : '' }} #{{
+								{{ item.orderTypeExtra == 0 ? '上门堂食' :item.orderTypeExtra == 1 ? '上门取餐' : item.orderTypeExtra == 2 ? '骑手配送' : item.orderTypeExtra == 3 ? '商家配送' : '' }} #{{
 									item.orderSequence
 								}}
 							</view>
@@ -696,7 +699,7 @@ export default {
 			}
 			// #endif
 			uni.navigateTo({
-				url: '/pages/index/shop/index?shopId=' + e + '&shopTypeId=' + item.shopTypeId
+				url: '/pages/index/shop/index?shopId=' + e + '&shopTypeId=' + item.shopTypeId+'&lat='+uni.getStorageSync('lat')+'&lng='+uni.getStorageSync('lng')
 			})
 		},
 		// 完成订单

+ 1 - 1
pages/order/takefood.vue

@@ -21,7 +21,7 @@
 
 			<view style="padding: 0 30rpx; font-size: 20px" v-if="dataDet.orderSequence">#{{ dataDet.orderSequence }}</view>
 			<view style="padding: 0 30rpx; font-size: 20px">
-				{{ dataDet.orderTypeExtra == 1 ? '到店取餐' : dataDet.orderTypeExtra == 2 ? '骑手配送' : dataDet.orderTypeExtra == 3 ? '商家配送' : '' }}
+				{{ dataDet.orderTypeExtra == 0 ? '上门堂食' :dataDet.orderTypeExtra == 1 ? '上门取餐' : dataDet.orderTypeExtra == 2 ? '骑手配送' : dataDet.orderTypeExtra == 3 ? '商家配送' : '' }}
 			</view>
 			<view class="flex justify-center" v-if="dataDet.orderType == 1" style="width: 100%; height: 140rpx; margin-bottom: 30rpx">
 				<view class="flex justify-center" style="width: 94%; height: 100%; border-radius: 18rpx; background-color: #ffffff; padding: 3%">

+ 2 - 0
running/huodong/list.vue

@@ -330,6 +330,7 @@
 					shopTypeId: this.shopTypeId,
 					lng: uni.getStorageSync('lng'),
 					lat: uni.getStorageSync('lat'),
+					city:this.city
 				}
 				this.$Request.getT('/app/goods/selectShop', data).then(res => {
 					if (res.code == 0) {
@@ -350,6 +351,7 @@
 									shopTypeId: this.shopTypeId,
 									lng: uni.getStorageSync('lng'),
 									lat: uni.getStorageSync('lat'),
+									city:this.city
 								}
 								this.$Request.getT('/app/goods/selectShop', data).then(res => {
 									if (res.code == 0) {