Browse Source

no message

xiaoxin 9 tháng trước cách đây
mục cha
commit
cfe5c0959d

+ 1 - 1
my/address/add.vue

@@ -178,7 +178,7 @@
 			},
 			getAddress(stationId ,type){
 				this.$Request.get(`/app/inside-address/list/${stationId}`).then(res => {
-					// console.log(res);
+					console.log(res,96325);
 					if(res.code == 0){
 						this.addressList = res.data
 						

+ 19 - 11
my/index/shop/index2.vue

@@ -745,23 +745,31 @@ export default {
 
 		if (option.scene) {
 			const scene = decodeURIComponent(option.scene)
-			let list = scene.split(',')
-			let shopId
 
-			if (list.length) {
-				//获取shopid
-				shopId = list[0]
-			}
+			let params = {}
+			// 分割成键值对数组
+			let pairs = scene.split('&')
+			// 遍历并解析每个键值对
+			pairs.forEach((pair) => {
+				const [key, value] = pair.split('=')
+				params[key] = value
+			})
 
-			if (list.length > 1) {
-				this.shopTypeId = list[1].split(',')
-				this.showShopTypeId = this.shopTypeId.includes('10')
-			}
+			let shopId = params.shopId
+			let shopTypeId = params.shopTypeId
+
+			// console.log(shopId)
+			// console.log(shopTypeId)
 
 			if (shopId) {
 				this.shopId = shopId
 			}
 
+			if (shopTypeId) {
+				this.shopTypeId = shopTypeId.split(',')
+				this.showShopTypeId = this.shopTypeId.includes('10')
+			}
+
 			this.getData()
 		} else {
 			// if (option.huoListss) {
@@ -1027,7 +1035,7 @@ export default {
 			// console.log(dataRight)
 
 			this.$Request.get('/app/goods/selectSupermarketGoodsList', dataRight).then((res) => {
-				// console.log(res, '9996329')
+				console.log(res, '9996329')
 				if (res.code == 0) {
 					this.supermarketGoodsList = [...this.supermarketGoodsList, ...res.data.records]
 					this.total = res.data.total

+ 14 - 12
pages/index/index.vue

@@ -492,17 +492,19 @@
 
 			if (e.scene) {
 				const scene = decodeURIComponent(e.scene);
-				let list = scene.split(',');
-				let shopId;
-
-				if (list.length > 0) {
-					shopId = list[0]; //获取shopid
-				}
-				// uni.setStorageSync('shopId',e.shopId)
-				console.log(e, '首页')
-				console.log(scene, '商铺id')
-				console.log(shopId, 'shopId')
-
+				
+				let params = {}
+				// 分割成键值对数组
+				let pairs = scene.split('&')
+				// 遍历并解析每个键值对
+				pairs.forEach((pair) => {
+					const [key, value] = pair.split('=')
+					params[key] = value
+				})
+				
+				let shopId = params.shopId
+				let shopTypeId = params.shopTypeId
+				
 				if (shopId) {
 					that.shopId = shopId
 				}
@@ -516,7 +518,7 @@
 
 				setTimeout(function() {
 					uni.navigateTo({
-						url: '/pages/index/shop/index?shopId=' + that.shopId
+						url: '/pages/index/shop/index?shopId=' + that.shopId +'&shopTypeId=' + shopTypeId
 					})
 				}, 100)
 			} else if (e.orderId) {

+ 15 - 5
pages/index/shop/confirmOrder.vue

@@ -1563,10 +1563,15 @@ export default {
 				addressId: e
 			}
 			this.$Request.get('/app/address/selectAddressById', data).then((res) => {
+				console.log(res, 77777777)
 				if (res.code == 0) {
 					this.address = res.data
 
-					this.getInsideDeliveryFee(this.address.insideAddressId)
+					if (this.address.insideAddressId) {
+						this.getInsideDeliveryFee(this.address.insideAddressId)
+					} else {
+						this.getInsideDeliveryFee(0)
+					}
 					if (JSON.stringify(this.address) != '{}') {
 						this.getDistance()
 					}
@@ -1582,6 +1587,7 @@ export default {
 				limit: 100
 			}
 			that.$Request.get('/app/address/selectAddressList', data).then((res) => {
+				console.log(res, 741852)
 				if (res.code == 0) {
 					that.address = res.data.list[0] ? res.data.list[0] : {}
 					res.data.list.forEach((ret) => {
@@ -1590,9 +1596,13 @@ export default {
 						}
 					})
 
-					// console.log(that.address, '我的地址列表460777')
+					console.log(that.address, '我的地址列表460777')
 
-					this.getInsideDeliveryFee(this.address.insideAddressId)
+					if (this.address.insideAddressId) {
+						this.getInsideDeliveryFee(this.address.insideAddressId)
+					} else {
+						this.getInsideDeliveryFee(0)
+					}
 
 					if (JSON.stringify(this.address) != '{}') {
 						this.getDistance()
@@ -1602,7 +1612,7 @@ export default {
 		},
 		getInsideDeliveryFee(insideAddressId) {
 			this.$Request.get(`/app/inside-address/${insideAddressId}`).then((res) => {
-				// console.log(res, 987456)
+				console.log(res, 987456)
 				if (res.code == 0) {
 					this.address.insideDeliveryFee = res.data.deliveryFee || 0
 				}
@@ -1971,4 +1981,4 @@ export default {
 		top: -20rpx; */
 	z-index: 9;
 }
-</style>
+</style>

+ 11 - 7
pages/index/shop/index.vue

@@ -44,6 +44,7 @@
 								</view>
 							</view>
 						</view>
+
 						<!-- <view class="flex justify-between">
 							<view style="width: 500rpx">
 								<view class="text-xl text-bold u-line-1">{{ shopDet.shopName }}</view>
@@ -67,8 +68,9 @@
 							<view>
 								<image mode="aspectFill" :src="shopDet.shopCover" class="radius" style="width: 110rpx; height: 110rpx; margin-top: 30rpx"></image>
 							</view>
-						</view>
-						<view class="flex align-center margin-top-xs" v-if="shopDet.shopNotice">
+						</view> -->
+
+						<!-- <view class="flex align-center margin-top-xs" v-if="shopDet.shopNotice">
 							<text style="width: 14%">公告:</text>
 							<u-notice-bar
 								color="#AAAAAA"
@@ -82,8 +84,9 @@
 								:volume-icon="false"
 								:list="shopDet.shopNotice.split(',')"
 							></u-notice-bar>
-						</view>
-						<view style="display: flex; margin-top: 3px" class="flex flex-wrap align-center" @click="clickGong">
+						</view> -->
+
+						<!-- <view style="display: flex; margin-top: 3px" class="flex flex-wrap align-center" @click="clickGong">
 							<view v-for="(ite, ind) in huoListss" :key="ind" v-if="huoListss && ite.activityType != '1'">
 								<view class="lable flex justify-center align-center" style="border-radius: 4rpx; background-color: #ffffff; color: red; box-sizing: border-box">
 									<text v-if="ite.activityType == '2'">时段</text>
@@ -93,9 +96,9 @@
 									<text style="margin-left: 3px">{{ ite.activityName }}</text>
 								</view>
 							</view>
-						</view>
+						</view> -->
 
-						<view class="margin-top-xs" style="width: 100%; height: 40rpx" v-if="couponList.length > 0">
+						<!-- <view class="margin-top-xs" style="width: 100%; height: 40rpx" v-if="couponList.length > 0">
 							<scroll-view scroll-x="true" class="scroll-view_H">
 								<view class="coupon-item flex align-center" v-for="(item, index) in couponList" :key="index" @click="coupons = true">
 									<text>优惠券</text>
@@ -882,6 +885,7 @@ export default {
 				shopId: this.shopId
 			}
 			this.$Request.get('/app/coupon/seleteAllCoupon', data).then((res) => {
+				console.log(res, 963)
 				if (res.code == 0 && res.data) {
 					this.couponList = res.data
 				}
@@ -2312,4 +2316,4 @@ page {
 	width: 180rpx; /* 三张图片平分宽度 */
 	height: 135rpx;
 }
-</style>
+</style>

+ 11 - 2
pages/index/shop/payOrder.vue

@@ -1421,7 +1421,12 @@ export default {
 				console.log(res, 741258)
 				if (res.code == 0) {
 					this.address = res.data
-					this.getInsideDeliveryFee(this.address.insideAddressId)
+
+					if (this.address.insideAddressId) {
+						this.getInsideDeliveryFee(this.address.insideAddressId)
+					} else {
+						this.getInsideDeliveryFee(0)
+					}
 
 					if (JSON.stringify(this.address) != '{}') {
 						this.getDistance()
@@ -1445,7 +1450,11 @@ export default {
 							that.address = ret
 						}
 					})
-					this.getInsideDeliveryFee(this.address.insideAddressId)
+					if (this.address.insideAddressId) {
+						this.getInsideDeliveryFee(this.address.insideAddressId)
+					} else {
+						this.getInsideDeliveryFee(0)
+					}
 					// console.log(that.address, '我的地址列表460777')
 					if (JSON.stringify(this.address) != '{}') {
 						this.getDistance()