Browse Source

Signed-off-by: 1004749546@qq.com <1004749546@qq.com>
下单修改

1004749546@qq.com 4 years ago
parent
commit
f4c0ca39c2
2 changed files with 19 additions and 14 deletions
  1. 12 7
      pages/getOrder/getOrder.vue
  2. 7 7
      pages/work/index/index.vue

+ 12 - 7
pages/getOrder/getOrder.vue

@@ -153,11 +153,6 @@
 			}
 		},
 		onLoad(option) {
-			uni.removeStorageSync('stepIndex')
-			// 注册全局监听事件
-			uni.$once('read', this.read)
-			this.getUserPhone()
-			this.getServerList()
 			// 存储当前扫码的设备及网点id
 			// if(options.scene){
 			// 	let scene=decodeURIComponent(options.scene);
@@ -167,7 +162,12 @@
 			// 	//其他逻辑处理。。。。。
 			//   }
 			this.$store.state.vuex_orderInfo.bizId = option.bizId || '9898'
-			this.$store.state.vuex_orderInfo.storeId = option.storeId || ''
+			this.$store.state.vuex_orderInfo.storeId = option.storeId || '100000'
+			uni.removeStorageSync('stepIndex')
+			// 注册全局监听事件
+			uni.$once('read', this.read)
+			this.getUserPhone()
+			this.getServerList()
 		},
 		onUnload() {
 			uni.removeStorageSync('stepIndex')
@@ -201,7 +201,8 @@
 			// 获取服务列表
 			getServerList () {
 				this.status = 'loading'
-				getStoreItems({storeId:100000}).then(res =>{
+				let storeId = this.$store.state.vuex_orderInfo.storeId
+				getStoreItems({storeId:storeId}).then(res =>{
 					this.status = 'loadmore'
 					if (res.status == 200) {
 						this.itemList = res.data 
@@ -282,6 +283,10 @@
 			},
 			// 去付款 保存订单
 			handleSubmit (){
+				if(this.itemList.length==0){
+					this.toashMsg('请先选择服务')
+					return 
+				}
 				if (this.isRead !='read') {
 					this.toashMsg('请先阅读并同意无人洗车《注意事项及服务协议》!')
 					return 

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

@@ -141,6 +141,12 @@ export default {
 		})
 	},
 	methods: {
+		// 电话客服
+		callPhone () {
+			uni.makePhoneCall({
+			    phoneNumber: '15202957025' 
+			})
+		},
 		// 倒计时结束时,自动完成洗车订单
 		endDtime() {
 			this.washCarSuccess()
@@ -201,7 +207,7 @@ export default {
 		// 洗车完成
 		washCarSuccess(){
 			this.status = "success";
-			this.curWorkStutesText='洗车已完成';
+			this.curWorkStutesText='洗车已结束';
 			this.resetLoadingStatus();
 			// 关闭socket
 			this.$store.commit("$closeWebsocket")
@@ -235,12 +241,6 @@ export default {
 				this.ldeg = -135 + 6 * (second - 30);
 			}
 		},
-		// 电话客服
-		callPhone () {
-			uni.makePhoneCall({
-			    phoneNumber: '15202957025' 
-			})
-		},
 		// 归位机器
 		resetRabt(){
 			// 归位命令