lilei преди 4 години
родител
ревизия
b9e10769b2
променени са 4 файла, в които са добавени 39 реда и са изтрити 33 реда
  1. 2 2
      App.vue
  2. 13 6
      pages/getOrder/getOrder.vue
  3. 9 9
      pages/index/index.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.105: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 - 6
pages/getOrder/getOrder.vue

@@ -173,15 +173,22 @@
 				this.$store.state.vuex_orderInfo.storeId = storeId
 				// 判断当前门店是否已运营
 				this.getStoreStatus(storeId,bizId)
+				
+				// 监听点击已阅读事件
+				uni.$once('read', this.read)
+				// 获取用户信息
+				this.getUserPhone()
+				// 获取服务项目
+				this.getServerList()
 			} else {
 				// 判断是否扫码过
 				if (this.$store.state.vuex_orderInfo.bizId != '') {
-					// 监听点击已阅读事件
-					uni.$once('read', this.read)
-					// 获取用户信息
-					this.getUserPhone()
-					// 获取服务项目
-					this.getServerList()
+					// // 监听点击已阅读事件
+					// uni.$once('read', this.read)
+					// // 获取用户信息
+					// this.getUserPhone()
+					// // 获取服务项目
+					// this.getServerList()
 				} else {
 					// 返回首页
 					uni.reLaunch({

+ 9 - 9
pages/index/index.vue

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

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

@@ -134,35 +134,35 @@ export default {
 			console.log(e)
 			if(e.type == 'xcz'){
 				// 进度消息
-				if(e.data.level == 'c'){
-					 this.curWorkStutesText= e.data.message
+				if(e.data.level == 'C'){
+					 this.curWorkStutesText= e.data.msgCodeInfo
 					 // 洗车完成
-					 if(e.data.code=="XCWC"){
+					 if(e.data.msgCode=="XCWC"){
 						 this.washCarSuccess()
 					 }
 				}
 				// 错误消息
-				if(e.data.level == 'f'){
-					this.curWorkStutesText= e.data.message
+				if(e.data.level == 'F'){
+					this.curWorkStutesText= e.data.msgCodeInfo
 					this.devError()
 				}
 				// 复位状态
-				if(e.data.leve == 'd'){
-					this.curWorkStutesText= e.data.message
+				if(e.data.leve == 'D'){
+					this.curWorkStutesText= e.data.msgCodeInfo
 					// 开始复位
-					if(e.data.code=="FW_START"){
+					if(e.data.msgCode=="FW_START"){
 						this.showStart = true;
 						this.showStop = false;
 					}
 					// 复位成功
-					if(e.data.code=="FW_SUCC"){
+					if(e.data.msgCode=="FW_SUCC"){
 						this.resetRabtSuccess()
 					}
 				}
 				// 停止
-				if(e.data.level == 'a'){
-					if(e.data.code=="JJTZ"||e.data.code=="XCX_JJTZ"){
-						this.curWorkStutesText= e.data.message
+				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()
@@ -222,7 +222,8 @@ export default {
 			this.showStart = false;
 			this.step = 0;
 			// 进度条,服务时间根据不同的服务类型而不同
-			let serverTime = this.washDuration/60
+			// let serverTime = this.washDuration/60
+			let serverTime = 20
 			this.interId = setInterval(()=>{
 				// 小于60时说明洗车机正在工作中
 				if(this.step<=60){
@@ -270,9 +271,7 @@ export default {
 				showCancel: false,
 			    success: function (res) {
 			        if (res.confirm) {
-						uni.redirectTo({
-							url: "/pages/order/orderDetail"
-						})
+						uni.navigateBack()
 			        }
 			    }
 			});