Explorar o código

更新满减页面样式

zhuxiuping %!s(int64=2) %!d(string=hai) anos
pai
achega
04e5c40fb5

+ 4 - 4
common/config.js

@@ -1,7 +1,7 @@
-// const ROOTPATH = "https://mxys.chuanghai-tech.com/sqx_fast";//https://mxys.chuanghai-tech.com/sqx_fast/swagger/index.html
-const ROOTPATH = "https://www.daweilinli.com/sqx_fast";
-// const ROOTPATH1 = "https://mxys.chuanghai-tech.com/sqx_fast";//tcwm.xianmaxiong.com
-const ROOTPATH1 = "https://www.daweilinli.com/sqx_fast";//tcwm.xianmaxiong.com
+const ROOTPATH = "https://mxys.chuanghai-tech.com/sqx_fast";//https://mxys.chuanghai-tech.com/sqx_fast/swagger/index.html
+// const ROOTPATH = "https://www.daweilinli.com/sqx_fast";
+const ROOTPATH1 = "https://mxys.chuanghai-tech.com/sqx_fast";//tcwm.xianmaxiong.com
+// const ROOTPATH1 = "https://www.daweilinli.com/sqx_fast";//tcwm.xianmaxiong.com
 const ROOTPATH2 = "wss://mxys.chuanghai-tech.com/wss/websocket/"//联系客服
 const ROOTPATH3 = "wss://mxys.chuanghai-tech.com/wss/ordersChat/"//聊天
 

+ 5 - 2
pages/index/index.vue

@@ -195,7 +195,9 @@
 							<view class="flex margin-top-xs justify-between align-start" style="width: 100%;">
 								<view class="flex flex-wrap align-center"
 									style="width: 100%;height: 100%;overflow: hidden;">
-									<view class="lable flex justify-center align-center" v-if="item.exemptMinMoney">
+									<!-- <view class="lable flex justify-center align-center" v-if="item.enableFullReductionFlag==1">
+										不参与配送费满减</view> -->
+									<view class="lable flex justify-center align-center" v-if="item.enableFullReductionFlag==0&&item.exemptMinMoney">
 										满{{item.exemptMinMoney}}免配送费</view>
 									<view class="lable flex justify-center align-center"
 										v-for="(ite,ind) in item.shopLable" :key='ind' v-if="item.shopLable">
@@ -267,7 +269,8 @@
 						style="position: absolute;right: -10rpx;top: -10rpx;z-index: 999;;font-size: 60rpx;font-weight: bold;">
 						X
 					</view>
-					<image src="../../static/images/index/hb_bg.png" class="hb_img" @click="takemoney()"></image>
+					 <!-- @click="takemoney()" ../../static/images/index/hb_bg.png-->
+					<image src="https://moxuanyunshang.oss-cn-beijing.aliyuncs.com/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20240520171928.jpg" class="hb_img"></image>
 					<!-- <image src="../../static/images/index/hb_btn.png" class="hb_btn" @click="takemoney()"></image> -->
 				</view>
 			</view>

+ 4 - 1
pages/index/shop/index.vue

@@ -30,12 +30,15 @@
 									{{shopDet.minimumDelivery}}元起送
 								</view>
 							</view>
+							
 							<view class="flex align-center margin-top-xs">
 								<!-- <view style="color: #FCD202;margin-right: 8rpx;">{{shopDet.autoSendOrder==1?'商家配送':'平台配送'}}</view> -->
 								<view style="margin-right: 8rpx;">{{shopDet.autoSendOrder==1?'商家配送:':'平台配送:'}}</view>
 								<view class="text-gray" style="margin-right: 8rpx;">
 									配送费{{shopDet.errandMoney?shopDet.errandMoney:0}}元</view>
-								<view class="lable text-gray" v-if="shopDet.exemptMinMoney">
+								<!-- <view class="lable text-gray" v-if="shopDet.enableFullReductionFlag==1">
+										不参与配送费满减</view> -->
+								<view class="lable text-gray" v-if="shopDet.enableFullReductionFlag==0&&shopDet.exemptMinMoney">
 									满{{shopDet.exemptMinMoney}}元免配送费</view>
 							</view>
 

+ 85 - 36
pages/index/shop/pindanDet.vue

@@ -5,7 +5,7 @@
 				<view class="flex align-center">
 					<image src="../../../static/tabbar/index.png" style="width: 40rpx;height: 37rpx;" mode=""></image>
 					<view class="text-xl text-bold text-black margin-lr-xs">{{goodsShop.shopName}}</view>
-					
+
 
 
 					<!-- <image src="../../../static/images/index/right.png" style="width: 14rpx;height: 24rpx;" mode=""></image> -->
@@ -179,6 +179,7 @@
 		},
 		data() {
 			return {
+				dataList:[],
 				orderType: 2,
 				shopId: '',
 				tuiguangImg: '',
@@ -198,6 +199,7 @@
 			this.shopId = e.shopId
 			this.orderId = e.orderId ? e.orderId : uni.getStorageSync('orderId')
 			this.userId = uni.getStorageSync('userId')
+			this.getData();
 		},
 		onShow() {
 			this.getOrderDetail();
@@ -208,12 +210,6 @@
 				}
 			});
 		},
-		onBackPress() {
-			
-		},
-		onUnload() {
-			
-		},
 		methods: {
 			// 添加数量
 			add(item, index) {
@@ -367,9 +363,9 @@
 				this.getOrderList()
 			},
 			goGoodsList() {
-				uni.setStorageSync('types',1)
+				uni.setStorageSync('types', 1)
 				uni.navigateBack({
-					
+
 				})
 				// uni.navigateTo({
 				// 	url: '/pages/index/shop/goodsList?shopId=' + this.shopId
@@ -409,10 +405,10 @@
 					uni.hideLoading()
 				});
 			},
-			getOrderDetail(){
-				this.$Request.getT('/app/order/selectOrderById?orderId=' + this.orderId).then(res =>{
-					if(res.code == 0 && res.data){
-						if(res.data.isPay && res.data.isPay == 1){
+			getOrderDetail() {
+				this.$Request.getT('/app/order/selectOrderById?orderId=' + this.orderId).then(res => {
+					if (res.code == 0 && res.data) {
+						if (res.data.isPay && res.data.isPay == 1) {
 							uni.showToast({
 								title: '拼单已结束',
 								icon: 'none'
@@ -433,27 +429,29 @@
 
 				this.$Request.get("/app/order/selectShareTheBill", data).then(res => {
 					if (res.code == 0) {
-						
-						if(!res.data){
-							uni.showToast({
-								title: '拼单已结束',
-								icon: 'none'
-							})
+
+						if (!res.data) {
+							uni.showToast({
+								title: '拼单已结束',
+								icon: 'none'
+							})
 							setTimeout(function() {
-								uni.removeStorageSync('orderId')
-								uni.navigateBack()
-							}, 1000)
-						}
+								uni.removeStorageSync('orderId')
+								uni.navigateBack()
+							}, 1000)
+						}
 						this.goodsShop = res.data.goodsShop
 						// this.goodsList = res.data.orderGoodsList
 						this.myGoodList = res.data.parentShareTheBill
 						let mySum = 0
 						for (var i = 0; i < this.myGoodList.length; i++) {
 							if (i == 0) {
-								mySum = parseFloat(parseFloat(parseFloat(this.myGoodList[i].goodsPrice) * parseFloat(this.myGoodList[i].goodsNum)).toFixed(2))
+								mySum = parseFloat(parseFloat(parseFloat(this.myGoodList[i].goodsPrice) *
+									parseFloat(this.myGoodList[i].goodsNum)).toFixed(2))
 								this.number += this.myGoodList[i].goodsNum
 							} else {
-								mySum = parseFloat(parseFloat(mySum + parseFloat(this.myGoodList[i].goodsPrice) * parseFloat(this.myGoodList[i].goodsNum)).toFixed(2))
+								mySum = parseFloat(parseFloat(mySum + parseFloat(this.myGoodList[i].goodsPrice) *
+									parseFloat(this.myGoodList[i].goodsNum)).toFixed(2))
 								this.number += this.myGoodList[i].goodsNum
 							}
 							if (i == (this.myGoodList.length - 1)) {
@@ -467,22 +465,27 @@
 						var sum = 0
 						for (var i = 0; i < this.otherGoodList.length; i++) {
 							if (i == 0) {
-								
-								sum = parseFloat(parseFloat(parseFloat(this.otherGoodList[i].goodsPrice) * parseFloat(this.otherGoodList[i].goodsNum)).toFixed(2))
-								
+
+								sum = parseFloat(parseFloat(parseFloat(this.otherGoodList[i].goodsPrice) *
+									parseFloat(this.otherGoodList[i].goodsNum)).toFixed(2))
+
 								this.number += this.otherGoodList[i].goodsNum
 							} else {
 								this.number += this.otherGoodList[i].goodsNum
 								if (this.otherGoodList[i].userId == this.otherGoodList[i - 1].userId) {
-									sum = parseFloat(parseFloat(sum + parseFloat(this.otherGoodList[i].goodsPrice) * parseFloat(this.otherGoodList[i].goodsNum)).toFixed(2))
+									sum = parseFloat(parseFloat(sum + parseFloat(this.otherGoodList[i]
+										.goodsPrice) * parseFloat(this.otherGoodList[i].goodsNum)).toFixed(
+										2))
 								} else {
 									this.otherGoodList[i - 1].goodsPrice = sum
-									sum = parseFloat(parseFloat(parseFloat(this.otherGoodList[i].goodsPrice) * parseFloat(this.otherGoodList[i].goodsNum)).toFixed(2))
+									sum = parseFloat(parseFloat(parseFloat(this.otherGoodList[i].goodsPrice) *
+										parseFloat(this.otherGoodList[i].goodsNum)).toFixed(2))
 								}
 							}
 							if (i == (this.otherGoodList.length - 1)) {
 								this.otherGoodList[i].goodsPrice = sum
-								this.totalPrice = parseFloat(parseFloat(parseFloat(this.totalPrice) + parseFloat(sum)).toFixed(2))
+								this.totalPrice = parseFloat(parseFloat(parseFloat(this.totalPrice) + parseFloat(
+									sum)).toFixed(2))
 								// parseFloat(parseFloat(mySum).toFixed(2))
 							}
 						}
@@ -496,6 +499,17 @@
 					}
 				});
 			},
+			// 获取店铺信息
+			getData() {
+				let data = {
+					shopId: this.shopId
+				}
+				this.$Request.get("/app/goods/selectGoodsList", data).then(res => {
+					if (res.code == 0 && res.data) {
+						this.dataList = res.data.list
+					}
+				});
+			},
 			// 去结算
 			goConfirm() {
 				if (!this.userId) {
@@ -515,10 +529,45 @@
 					}
 				}
 				if (this.myGoodList.length > 0 || this.otherGoodList.length > 0) {
-					uni.navigateTo({
-						url: '/pages/index/shop/confirmOrder?shopId=' + this.shopId + '&orderType=2&orderId=' +
-							this.orderId
-					})
+					let that = this;
+					let goodstr1 = 0 //商品库的 必须次数
+					let goodstr2 = 0 //购物车的 必须次数
+					let regex = new RegExp('必选', 'g');
+					let dataList = JSON.stringify(this.dataList)
+					if (dataList.match(regex)) {
+						goodstr1 = dataList.match(regex).length
+						console.log("goodstr1----" + goodstr1)
+						if (dataList.indexOf('必选') != -1) { //检测商品是否存在必选
+							let goodsList = JSON.stringify(that.myGoodList)
+							if (goodsList.match(regex)) {
+								goodstr2 = goodsList.match(regex).length
+								console.log("goodstr2----" + goodstr2)
+								if (goodstr1 == goodstr2) { //检查购物车商品是否存在必须
+									uni.navigateTo({
+										url: '/pages/index/shop/confirmOrder?shopId=' + that.shopId + '&orderType=2&orderId=' +
+											that.orderId
+									})
+								} else {
+									uni.showToast({
+										title: "有" + goodstr1 + "个必选商品,请选择后结算",
+										icon: "none"
+									})
+									return
+								}
+							} else {
+								uni.showToast({
+									title: "有" + goodstr1 + "个必选商品,请选择后结算",
+									icon: "none"
+								})
+								return
+							}
+						}
+					} else {
+						uni.navigateTo({
+							url: '/pages/index/shop/confirmOrder?shopId=' + that.shopId + '&orderType=2&orderId=' +
+								that.orderId
+						})
+					}
 				} else {
 					uni.showToast({
 						title: '请先添加商品',
@@ -1160,4 +1209,4 @@
 		background: #FCD202;
 		border-radius: 36rpx;
 	}
-</style>
+</style>

+ 5 - 1
pages/order/takefood.vue

@@ -66,7 +66,11 @@
 					<view>优惠券</view>
 					<view class="tosend_header_do_ri">-¥{{dataDet.couponMoney}}</view>
 				</view>
-				<view class="tosend_header_do do_bot" v-if="dataDet.errandMoney>0&&dataDet.orderType==2">
+				<view class="tosend_header_do do_bot" v-if="dataDet.errandMoney>0&&dataDet.orderType==2 && dataDet.errandMoneyIsShop=='本单未达到商家满减金额,跑腿费由用户承担'">
+					<view>跑腿费</view>
+					<view class="tosend_header_do_ri">¥{{dataDet.errandMoney}}</view>
+				</view>
+				<view class="tosend_header_do do_bot" v-if="dataDet.errandMoney>0&&dataDet.orderType==2 && dataDet.errandMoneyIsShop=='商家未开启配送费满减,跑腿费由用户承担'">
 					<view>跑腿费</view>
 					<view class="tosend_header_do_ri">¥{{dataDet.errandMoney}}</view>
 				</view>

BIN=BIN
static/images/index/banner.png


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/index.js.map


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/shop/index.js.map


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/shop/pindanDet.js.map


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/order/takefood.js.map


+ 2 - 1
unpackage/dist/dev/mp-weixin/app.json

@@ -119,5 +119,6 @@
     "getLocation",
     "chooseLocation"
   ],
-  "usingComponents": {}
+  "usingComponents": {},
+  "sitemapLocation": "sitemap.json"
 }

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 2 - 2
unpackage/dist/dev/mp-weixin/common/vendor.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/index/index.wxml


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/index/shop/index.wxml


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/index/shop/pindanDet.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/order/takefood.wxml


+ 4 - 0
unpackage/dist/dev/mp-weixin/pages/order/takefood.wxss

@@ -391,6 +391,10 @@
 
 
 
+
+
+
+
 /* 余额 */
 .tosend.data-v-45b63682 {
 	width: 100%;

BIN=BIN
unpackage/dist/dev/mp-weixin/static/images/index/banner.png


+ 2 - 2
unpackage/dist/dev/mp-weixin/uview-ui/components/u-button/u-button.json

@@ -1,4 +1,4 @@
 {
-  "usingComponents": {},
-  "component": true
+  "component": true,
+  "usingComponents": {}
 }

+ 2 - 2
unpackage/dist/dev/mp-weixin/uview-ui/components/u-line/u-line.json

@@ -1,4 +1,4 @@
 {
-  "component": true,
-  "usingComponents": {}
+  "usingComponents": {},
+  "component": true
 }