Преглед на файлове

添加明厨亮灶功能

xiaoxin преди 1 месец
родител
ревизия
e1503aa544
променени са 5 файла, в които са добавени 284 реда и са изтрити 143 реда
  1. 8 8
      common/config.js
  2. 6 0
      pages.json
  3. 20 4
      pages/index/index.vue
  4. 179 131
      pages/index/shop/payOrder.vue
  5. 71 0
      running/cook/cook.vue

+ 8 - 8
common/config.js

@@ -1,12 +1,12 @@
-// const ROOTPATH = "https://mxys.chuanghai-tech.com/sqx_fast";
-// const ROOTPATH1 = "https://mxys.chuanghai-tech.com/sqx_fast";
-// const ROOTPATH2 = "wss://mxys.chuanghai-tech.com/wss/websocket/"
-// const ROOTPATH3 = "wss://mxys.chuanghai-tech.com/wss/ordersChat/"
+const ROOTPATH = "https://mxys.chuanghai-tech.com/sqx_fast";
+const ROOTPATH1 = "https://mxys.chuanghai-tech.com/sqx_fast";
+const ROOTPATH2 = "wss://mxys.chuanghai-tech.com/wss/websocket/"
+const ROOTPATH3 = "wss://mxys.chuanghai-tech.com/wss/ordersChat/"
 
-const ROOTPATH = "https://mxys.chuanghai-tech.com/wm-test/wm-api/sqx_fast";
-const ROOTPATH1 = "https://mxys.chuanghai-tech.com/wm-test/wm-api/sqx_fast";
-const ROOTPATH2 = "wss://mxys.chuanghai-tech.com/wss-test/websocket/"
-const ROOTPATH3 = "wss://mxys.chuanghai-tech.com/wss-test/ordersChat/"
+// const ROOTPATH = "https://mxys.chuanghai-tech.com/wm-test/wm-api/sqx_fast";
+// const ROOTPATH1 = "https://mxys.chuanghai-tech.com/wm-test/wm-api/sqx_fast";
+// const ROOTPATH2 = "wss://mxys.chuanghai-tech.com/wss-test/websocket/"
+// const ROOTPATH3 = "wss://mxys.chuanghai-tech.com/wss-test/ordersChat/"
 
 // const ROOTPATH = "http://192.168.161.225:8171/sqx_fast";
 // const ROOTPATH1 = "http://192.168.161.225:8171/sqx_fast";

+ 6 - 0
pages.json

@@ -452,6 +452,12 @@
 						"enablePullDownRefresh": false
 					}
 
+				},
+				{
+					"path": "cook/cook",
+					"style": {
+						"navigationBarTitleText": "明厨亮灶"
+					}
 				}
 			]
 		}

+ 20 - 4
pages/index/index.vue

@@ -225,7 +225,9 @@
 										<text style="margin-left: 3px;">|</text>
 										<text style="margin-left: 3px;">满{{it.minMoney}}减{{it.money}}</text>
 									</view>
-									
+									<view class="lable flex justify-center align-center cook" @click.stop="goCook(item)">
+										明厨亮灶>
+									</view>
 								</view>
 							</view>
 						</view>
@@ -236,8 +238,10 @@
 									mode="">
 								</image>
 								<view class="u-line-1 text-df text-bold margin-top-xs">{{ite.goodsName}}</view>
-								<view class="text-bold margin-top-xs" style="color: #FD6416;"> <text
-										class="text-sm">¥</text> {{ite.goodsMoney}}</view>
+								<view class="text-bold margin-top-xs" style="color: #FD6416;"> 
+								    <text class="text-sm">¥</text> 
+									{{ite.goodsMoney}}
+								</view>
 							</view>
 						</view>
 					</view>
@@ -1427,7 +1431,13 @@
 					url: '/pages/index/shop/goodsDet?goodsId=' + goodsId + '&shopId=' + shopId + '&orderType=2'
 				})
 			},
-
+			// 跳转厨房监控页面
+			goCook(item){
+				// console.log(item.shopName);
+				uni.navigateTo({
+					url:`/running/cook/cook?shopName=${item.shopName}`
+				})
+			}
 		},
 		onReachBottom: function() {
 			console.log('当前长度',this.shopList.length,this.totalCount)
@@ -2008,4 +2018,10 @@
 		background-repeat: no-repeat;
 		background-size: contain;
 	}
+	
+	.cook{
+		color: #2B7924;
+		border: none;
+		background-color: #F0FCE6;
+	}
 </style>

+ 179 - 131
pages/index/shop/payOrder.vue

@@ -30,10 +30,10 @@
 					</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 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 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" />
@@ -95,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&&packType==1">
+					<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>
@@ -113,32 +113,32 @@
 				<view>特殊地址跑腿费</view>
 				<view class="tosend_header_do_ri">¥{{ address.insideDeliveryFee }}</view>
 			</view>
-			<view class="tosend_header_do justify-between" v-if="Vipmoney.canReduceFlag=='1'">
+			<view class="tosend_header_do justify-between" v-if="Vipmoney.canReduceFlag == '1'">
 				<view>会员立减</view>
 				<view class="tosend_header_do_ri">- ¥{{ Vipmoney.reduceAmount }}</view>
 			</view>
-			<view class="tosend_header_do justify-between do_bot" v-if="Vipmoney.canReduceFlag=='1'">
+			<view class="tosend_header_do justify-between do_bot" v-if="Vipmoney.canReduceFlag == '1'">
 				<view>优惠券</view>
 				<!-- <view class="tosend_header_do_ri" v-if="coupon">- ¥{{ coupon.money }}</view>
 				<view v-else>
 					<image src="../../../static/images/order/right1.png" style="width: 14rpx; height: 24rpx" mode=""></image>
 				</view> -->
 			</view>
-			<view class="tosend_header_do justify-between do_bot" @click="isShow" v-if="Vipmoney.canReduceFlag=='0'">
+			<view class="tosend_header_do justify-between do_bot" @click="isShow" v-if="Vipmoney.canReduceFlag == '0'">
 				<view>优惠券</view>
 				<view class="tosend_header_do_ri" v-if="coupon">- ¥{{ coupon.money }}</view>
 				<view v-else>
 					<image src="../../../static/images/order/right1.png" style="width: 14rpx; height: 24rpx" mode=""></image>
 				</view>
 			</view>
-			<view class="tosend_header_do justify-between do_bot" v-if="Vipmoney.canReduceFlag=='1'">
+			<view class="tosend_header_do justify-between do_bot" v-if="Vipmoney.canReduceFlag == '1'">
 				<view>优惠活动</view>
 				<!-- <view class="tosend_header_do_ri" v-if="huodong">- ¥{{ huodong.discountAmount }}</view>
 				<view v-else>
 					<image src="../../../static/images/order/right1.png" style="width: 14rpx; height: 24rpx" mode=""></image>
 				</view> -->
 			</view>
-			<view class="tosend_header_do justify-between do_bot" @click="huodongShow" v-if="Vipmoney.canReduceFlag=='0'">
+			<view class="tosend_header_do justify-between do_bot" @click="huodongShow" v-if="Vipmoney.canReduceFlag == '0'">
 				<view>优惠活动</view>
 				<view class="tosend_header_do_ri" v-if="huodong">- ¥{{ huodong.discountAmount }}</view>
 				<view v-else>
@@ -357,7 +357,7 @@ export default {
 			packMoney: 0, //打包费
 			totalPrice: 0,
 			totalPrice1: 0,
-			totalPrice12:0,
+			totalPrice12: 0,
 			address: {
 				insideDeliveryFee: 0
 			}, //地址
@@ -369,11 +369,11 @@ export default {
 			coupon: '',
 			shopDet: '',
 			huodong: '', //选择的活动信息
-			Vipmoney:{
-				canReduceFlag:'0',
-				reduceAmount:0,
-				vipReduceDesc:''
-			},//会员立减金额
+			Vipmoney: {
+				canReduceFlag: '0',
+				reduceAmount: 0,
+				vipReduceDesc: ''
+			}, //会员立减金额
 			couponList: [],
 			huoList: [], //可用活动
 			orderType: 2, //1表示到店自取 2表示外卖配送
@@ -423,8 +423,8 @@ export default {
 			isIntegral: false,
 			shopTypeName: '', //店铺类型
 			idcard1: '', //身份证号
-			packType:1,//堂食0,到店外卖打包1
-			ispackType:false,
+			packType: 1, //堂食0,到店外卖打包1
+			ispackType: false
 		}
 	},
 	onLoad(option) {
@@ -472,7 +472,7 @@ export default {
 	},
 	onShow() {
 		this.getMsgData()
-		
+
 		this.addressId = this.addressId ? this.addressId : uni.getStorageSync('addressId')
 		if (this.addressId) {
 			this.getAddressDet(this.addressId)
@@ -497,54 +497,64 @@ 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)
-		  	}
-		  }
-		  this.getvipMoney()
-		  let totalMoney =0
-		  if(this.Vipmoney.canReduceFlag=='1'){
-		  			  totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
-		  }else{
-		  			  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.totalPrice12 = 0.01
-		  } else {
-		  	this.totalPrice12 = totalMoney
-		  }
+			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)
+				}
+			}
+			this.getvipMoney()
+			let totalMoney = 0
+			if (this.Vipmoney.canReduceFlag == '1') {
+				totalMoney = parseFloat(this.totalPrice1 - (this.Vipmoney.reduceAmount ? this.Vipmoney.reduceAmount : 0)).toFixed(2)
+			} else {
+				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.totalPrice12 = 0.01
+			} else {
+				this.totalPrice12 = totalMoney
+			}
 		},
 		//获取会员立减金额
 		getvipMoney() {
 			let data = {
 				// shopId: this.shopId,
-				userId: uni.getStorageSync('userId'),
+				userId: uni.getStorageSync('userId')
 				// originalPrice:this.totalPrice1
 			}
-			this.$Request.get(`/app/vip/get-can-reduce/${this.dataList.orderId}`,data).then((res) => {
+			this.$Request.get(`/app/vip/get-can-reduce/${this.dataList.orderId}`, data).then((res) => {
 				console.log(res, '会员立减')
 				if (res.code == 0 && res.data) {
-					this.Vipmoney=res.data
-					let totalMoney =0
-					if(this.Vipmoney.canReduceFlag=='1'){
-								  totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
-					}else{
-								  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) 
+					this.Vipmoney = res.data
+					let totalMoney = 0
+					if (this.Vipmoney.canReduceFlag == '1') {
+						totalMoney = parseFloat(this.totalPrice1 - (this.Vipmoney.reduceAmount ? this.Vipmoney.reduceAmount : 0)).toFixed(2)
+					} else {
+						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.totalPrice12 = 0.01
@@ -821,7 +831,6 @@ export default {
 					this.getOrderList()
 					// this.getQishou()
 				}
-				
 			})
 		},
 		goBack() {
@@ -875,25 +884,30 @@ export default {
 			}
 
 			if (this.orderType == 2) {
-				this.packType=1
-				this.ispackType =false
+				this.packType = 1
+				this.ispackType = false
 				this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
 				this.getvipMoney()
 			} else {
-				this.packType=1
-				this.ispackType =false
-				if(this.packType==1){
+				this.packType = 1
+				this.ispackType = false
+				if (this.packType == 1) {
 					this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
-				}else{
+				} else {
 					this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
 				}
 				this.getvipMoney()
 			}
-			let totalMoney =0
-			if(this.Vipmoney.canReduceFlag=='1'){
-						  totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
-			}else{
-						  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) 
+			let totalMoney = 0
+			if (this.Vipmoney.canReduceFlag == '1') {
+				totalMoney = parseFloat(this.totalPrice1 - (this.Vipmoney.reduceAmount ? this.Vipmoney.reduceAmount : 0)).toFixed(2)
+			} else {
+				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.totalPrice12 = 0.01
@@ -904,17 +918,22 @@ export default {
 				if (this.orderType == 2) {
 					this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
 				} else {
-					if(this.packType==1){
+					if (this.packType == 1) {
 						this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
-					}else{
+					} else {
 						this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
 					}
 				}
-				let totalMoney =0
-				if(this.Vipmoney.canReduceFlag=='1'){
-							  totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
-				}else{
-							  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) 
+				let totalMoney = 0
+				if (this.Vipmoney.canReduceFlag == '1') {
+					totalMoney = parseFloat(this.totalPrice1 - (this.Vipmoney.reduceAmount ? this.Vipmoney.reduceAmount : 0)).toFixed(2)
+				} else {
+					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.totalPrice12 = 0.01
@@ -927,38 +946,49 @@ export default {
 				if (this.orderType == 2) {
 					this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
 				} else {
-					if(this.packType==1){
+					if (this.packType == 1) {
 						this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
-					}else{
+					} else {
 						this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
 					}
 				}
-				let totalMoney =0
-				if(this.Vipmoney.canReduceFlag=='1'){
-							  totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
-				}else{
-							  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) 
+				let totalMoney = 0
+				if (this.Vipmoney.canReduceFlag == '1') {
+					totalMoney = parseFloat(this.totalPrice1 - (this.Vipmoney.reduceAmount ? this.Vipmoney.reduceAmount : 0)).toFixed(2)
+				} else {
+					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.totalPrice12 = 0.01
 				} else {
 					this.totalPrice12 = totalMoney
 				}
-			}if (this.Vipmoney.canReduceFlag=='1') {
+			}
+			if (this.Vipmoney.canReduceFlag == '1') {
 				if (this.orderType == 2) {
 					this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
 				} else {
-					if(this.packType==1){
+					if (this.packType == 1) {
 						this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
-					}else{
+					} else {
 						this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
 					}
 				}
-				let totalMoney =0
-				if(this.Vipmoney.canReduceFlag=='1'){
-							  totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
-				}else{
-							  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) 
+				let totalMoney = 0
+				if (this.Vipmoney.canReduceFlag == '1') {
+					totalMoney = parseFloat(this.totalPrice1 - (this.Vipmoney.reduceAmount ? this.Vipmoney.reduceAmount : 0)).toFixed(2)
+				} else {
+					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.totalPrice12 = 0.01
@@ -983,17 +1013,22 @@ export default {
 			if (this.orderType == 2) {
 				this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
 			} else {
-				if(this.packType==1){
+				if (this.packType == 1) {
 					this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
-				}else{
+				} else {
 					this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
 				}
 			}
-			let totalMoney =0
-			if(this.Vipmoney.canReduceFlag=='1'){
-						  totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
-			}else{
-						  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) 
+			let totalMoney = 0
+			if (this.Vipmoney.canReduceFlag == '1') {
+				totalMoney = parseFloat(this.totalPrice1 - (this.Vipmoney.reduceAmount ? this.Vipmoney.reduceAmount : 0)).toFixed(2)
+			} else {
+				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.totalPrice12 = 0.01
@@ -1020,18 +1055,23 @@ export default {
 			if (this.orderType == 2) {
 				this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
 			} else {
-				if(this.packType==1){
+				if (this.packType == 1) {
 					this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
-				}else{
+				} else {
 					this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
 				}
 			}
 
-			let totalMoney =0
-			if(this.Vipmoney.canReduceFlag=='1'){
-						  totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
-			}else{
-						  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) 
+			let totalMoney = 0
+			if (this.Vipmoney.canReduceFlag == '1') {
+				totalMoney = parseFloat(this.totalPrice1 - (this.Vipmoney.reduceAmount ? this.Vipmoney.reduceAmount : 0)).toFixed(2)
+			} else {
+				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) {
@@ -1053,11 +1093,10 @@ export default {
 				shopId: this.dataList.shopId,
 				page: 1,
 				limit: 20,
-				minMoney:minMoney
-					
+				minMoney: minMoney
 			}
 			this.$Request.get('/app/coupon/selectUserCouponList', data).then((res) => {
-				console.log(res,'优惠券')
+				console.log(res, '优惠券')
 				if (res.code == 0) {
 					this.couponList = res.data.list
 					if (this.coupon) {
@@ -1067,18 +1106,23 @@ export default {
 							if (this.orderType == 2) {
 								this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
 							} else {
-								if(this.packType==1){
+								if (this.packType == 1) {
 									this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
-								}else{
+								} else {
 									this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
 								}
 							}
 
-							let totalMoney =0
-							if(this.Vipmoney.canReduceFlag=='1'){
-										  totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
-							}else{
-										  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) 
+							let totalMoney = 0
+							if (this.Vipmoney.canReduceFlag == '1') {
+								totalMoney = parseFloat(this.totalPrice1 - (this.Vipmoney.reduceAmount ? this.Vipmoney.reduceAmount : 0)).toFixed(2)
+							} else {
+								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) {
@@ -1118,20 +1162,25 @@ export default {
 							if (this.orderType == 2) {
 								this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
 							} else {
-								if(this.packType==1){
+								if (this.packType == 1) {
 									this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
-								}else{
+								} else {
 									this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
 								}
 							}
 
-							let totalMoney =0
-							if(this.Vipmoney.canReduceFlag=='1'){
-										  totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
-							}else{
-										  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) 
+							let totalMoney = 0
+							if (this.Vipmoney.canReduceFlag == '1') {
+								totalMoney = parseFloat(this.totalPrice1 - (this.Vipmoney.reduceAmount ? this.Vipmoney.reduceAmount : 0)).toFixed(2)
+							} else {
+								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.totalPrice12 = 0.01
 							} else {
@@ -1164,12 +1213,12 @@ export default {
 		getOrderList() {
 			this.paotuiMoney = 0
 			this.totalPrice1 = 0
-			this.totalPrice12=0
+			this.totalPrice12 = 0
 			let data = {
 				orderId: this.orderId
 			}
 			this.$Request.get('/app/order/selectBuyGoods', data).then((res) => {
-				console.log(res, '666')
+				console.log(res, '6661')
 				uni.hideLoading()
 				if (res.code == 0) {
 					this.dataList = res.data
@@ -1206,9 +1255,9 @@ export default {
 					if (this.orderType == 2) {
 						this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
 					} else {
-						if(this.packType==1){
+						if (this.packType == 1) {
 							this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
-						}else{
+						} else {
 							this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
 						}
 					}
@@ -1217,9 +1266,9 @@ export default {
 					// if(this.Vipmoney.canReduceFlag=='1'){
 					// 			  totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
 					// }else{
-					// 			  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) 
+					// 			  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.totalPrice12 = 0.01
 					// } else {
@@ -1232,7 +1281,6 @@ export default {
 					this.getHuoList()
 					this.detCoupon()
 					this.getDistance()
-					
 				}
 			})
 		},
@@ -1354,7 +1402,7 @@ export default {
 							orderType: this.orderType,
 							type: res.enable ? 1 : 3,
 							idCard: this.idcard1,
-							packType:this.packType
+							packType: this.packType
 						}
 
 						console.log(data)

+ 71 - 0
running/cook/cook.vue

@@ -0,0 +1,71 @@
+<template>
+	<view class="container">
+		<!-- 监控盒子 -->
+		<view class="top">设备离线</view>
+
+		<!-- 店铺信息区域 -->
+		<view class="info">
+			<view class="info_box">
+				店铺名 &nbsp;&nbsp;&nbsp;
+				<text class="name">{{ shopName }}</text>
+			</view>
+
+			<view class="info_tips">因设备兼容性、网络信号或维护检修等因素,直播可能出现卡顿、加载失败等</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			shopName: '未知'
+		}
+	},
+	onLoad(options) {
+		// console.log(options)
+		if (options.shopName) {
+			this.shopName = options.shopName
+		}
+	},
+	methods: {}
+}
+</script>
+
+<style lang="scss" scoped>
+.container {
+	height: 100vh;
+	background-color: #ededed;
+
+	.top {
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		width: 100%;
+		height: 380rpx;
+		color: #fff;
+		background-color: #000;
+	}
+
+	.info {
+		padding: 20rpx;
+		margin-top: 20rpx;
+		border-radius: 10rpx;
+		background-color: #fff;
+
+		.info_box {
+			line-height: 70rpx;
+			border-bottom: 2rpx solid #ccc;
+
+			.name {
+				color: #757575;
+			}
+		}
+
+		.info_tips {
+			margin-top: 10rpx;
+			color: #757575;
+		}
+	}
+}
+</style>