lilei 4 anni fa
parent
commit
fdad8759c3
1 ha cambiato i file con 7 aggiunte e 2 eliminazioni
  1. 7 2
      pages/work/index/index.vue

+ 7 - 2
pages/work/index/index.vue

@@ -57,7 +57,7 @@
 					</view>
 					<view v-else>
 						<view>设备启动中请注意安全,如果设备工作中出现故障,请按紧急停止按钮或联系客服。</view>
-						<view @click="callPhone">如有疑问,请联系客服:<text>{{$store.state.vuex_kfMobile}}</text> </view>
+						<view @click="callPhone">如有疑问,请联系客服:<text>{{kfMobile}}</text> </view>
 					</view>
 				</view>
 			</view>
@@ -129,6 +129,7 @@ export default {
 			washCarType: '', // 洗车服务类型,不同的类型对应的时间不一样
 			washDuration: 7.5, // 机器运行步骤,共8步,等分60
 			orderNo: '',// 订单编号
+			kfMobile: ''
 		};
 	},
 	onShow() {
@@ -136,6 +137,7 @@ export default {
 	},
 	onLoad(options) {
 		console.log("onLoad")
+		this.kfMobile = this.$store.state.vuex_kfMobile
 		// 创建websocket
 		this.$store.commit('$webSocket')
 		uni.showLoading({
@@ -211,12 +213,15 @@ export default {
 			if(od!=0){
 				let d = new Date().getTime() - od
 				this.timestamp = 300 - d/1000
+				if(this.timestamp<=0){
+					this.endDtime()
+				}
 			}
 		},
 		// 倒计时结束时,自动完成洗车订单
 		endDtime() {
 			console.log('endDtime',this.status)
-			if(this.status == 'start'||status=='starting'){
+			if(this.status == 'start'||this.status=='starting'){
 				this.washCarSuccess()
 			}
 		},