lilei před 4 roky
rodič
revize
b8b3809651
4 změnil soubory, kde provedl 31 přidání a 28 odebrání
  1. 2 2
      App.vue
  2. 13 9
      pages/index/index.vue
  3. 1 1
      pages/store/storeList.vue
  4. 15 16
      pages/work/index/index.vue

+ 2 - 2
App.vue

@@ -1,6 +1,6 @@
 <script>
-	// const uat_URL = 'https://carwash.test.zyucgj.com/cw-wechat/' // 预发布
-	const uat_URL = 'http://192.168.16.103:8103/cw-wechat/' // 本地
+	const uat_URL = 'https://carwash.test.zyucgj.com/cw-wechat/' // 预发布
+	// const uat_URL = 'http://192.168.16.103:8103/cw-wechat/' // 本地
 	const pro_URL = 'https://carwash.zyucgj.com/saas/clz/'  // 生产
 	const buildType = 0 // 打包环境对应类型,1 生产 0 预发布
 	const buildURL = buildType ? pro_URL : uat_URL // 打包后实际对应的url

+ 13 - 9
pages/index/index.vue

@@ -243,15 +243,19 @@
 			},
 			// 扫码洗车
 			scanCode () {
-				// uni.scanCode({
-				//     success: function (res) {
-				//         console.log('条码类型:' + res.scanType);
-				//         console.log('条码内容:' + res.result);
-				//     }
-				// });
-				uni.navigateTo({
-					url: `/pages/getOrder/getOrder?scene=100037,9998`
-				})
+				uni.scanCode({
+				    success: function (res) {
+				        console.log('条码类型:' + res.scanType);
+				        console.log('条码内容:' + res.result);
+						uni.navigateTo({
+							url: res.result
+						})
+				    }
+				});
+				
+				// uni.navigateTo({
+				// 	url: `/pages/getOrder/getOrder?scene=100037,9998`
+				// })
 			},
 			// 创建标记点 OPEN :正常营业  CLOSED:暂停营业  TO_BE_OPENED:待开业
 			createMarker(point) {

+ 1 - 1
pages/store/storeList.vue

@@ -24,7 +24,7 @@
 					</view>
 				</view>
 				<view class="list-right">
-					<u-image width="110rpx" height="110rpx" :border-radius="10" :src="getStoreStatus(item)"></u-image>
+					<u-image width="55px" height="55px" :border-radius="10" :src="getStoreStatus(item)"></u-image>
 				</view>
 			</view>
 			<u-empty class="noData" :text="noDataText" img-width="120" v-if="storeList.length==0 && status!='loading'" mode="list"></u-empty>

+ 15 - 16
pages/work/index/index.vue

@@ -144,7 +144,18 @@ export default {
 				// 错误消息
 				if(e.data.level == 'F'){
 					this.curWorkStutesText= e.data.msgCodeInfo
-					this.devError()
+					// 显示急停提示弹框
+					this.showStop = true;
+				}
+				// 急停
+				if(e.data.level == 'A'){
+					if(e.data.msgCode=="JJTZ"||e.data.msgCode=="XCX_JJTZ"){
+						this.curWorkStutesText= e.data.msgCodeInfo
+						// 显示急停提示弹框
+						this.showStop = true;
+					}else{
+						this.devError()
+					}
 				}
 				// 复位状态
 				if(e.data.leve == 'D'){
@@ -159,15 +170,6 @@ export default {
 						this.resetRabtSuccess()
 					}
 				}
-				// 停止
-				if(e.data.level == 'A'){
-					if(e.data.msgCode=="JJTZ"||e.data.msgCode=="XCX_JJTZ"){
-						this.curWorkStutesText= e.data.msgCodeInfo
-						this.stopWashCarSuccess()
-					}else{
-						this.devError()
-					}
-				}
 			}
 		})
 	},
@@ -207,8 +209,6 @@ export default {
 				        if (res.confirm) {
 							cmd.operateType = 'stop' //操作命令
 							_this.$store.commit("$sendWebsocket",JSON.stringify(cmd))
-							// 显示急停提示弹框
-							_this.showStop = true;
 				        }
 				    }
 				});
@@ -222,8 +222,7 @@ export default {
 			this.showStart = false;
 			this.step = 0;
 			// 进度条,服务时间根据不同的服务类型而不同
-			// let serverTime = this.washDuration/60
-			let serverTime = 20
+			let serverTime = this.washDuration/60
 			this.interId = setInterval(()=>{
 				// 小于60时说明洗车机正在工作中
 				if(this.step<=60){
@@ -234,13 +233,13 @@ export default {
 				}
 			},1000*serverTime)
 		},
-		// 紧急停止成功
+		// 设备停止成功
 		stopWashCarSuccess(){
 			// 关闭socket
 			this.$store.commit("$closeWebsocket")
 			this.status = 'stop';
 			this.$store.state.vuex_workStatus = 'stop'
-			this.curWorkStutesText='设备已紧急停止';
+			this.curWorkStutesText='设备已停止';
 			this.resetLoadingStatus();
 		},
 		// 设备异常