wangfei 6 lat temu
rodzic
commit
dc4a8cb558

+ 11
- 6
src/pages/user/mainPage/coffeeIndex/index.vue Wyświetl plik

@@ -438,8 +438,8 @@ export default {
438 438
     },
439 439
     locationMapping () {
440 440
       let that = this
441
-      that.topCaseInfoData.caseName = that.CaseList[0].CaseName
442
-      that.topCaseInfoData.caseId = that.CaseList[0].CaseId
441
+      // that.topCaseInfoData.caseName = that.CaseList[0].CaseName
442
+      // that.topCaseInfoData.caseId = that.CaseList[0].CaseId
443 443
       if (this.userInfo.customer.MapUser !== '') {
444 444
         this.topCaseInfoData.caseId = this.userInfo.customer.BelongCaseId
445 445
         for (let i = 0; i < this.CaseList.length; i++) {
@@ -500,10 +500,15 @@ export default {
500 500
       }
501 501
     },
502 502
     toOrders (subItem, item) {
503
-
504
-
505
-
506
-      this.$router.push({name: 'placeOrder', query: { tableid: encodeURI(subItem.TableId), tableno: encodeURI(subItem.TableNo), caseid: encodeURI(subItem.CaseId), casename: encodeURI(this.topCaseInfoData.caseName), areaid: encodeURI(subItem.AreaId), areaname: encodeURI(item.AreaName)}})
503
+      const _that = this
504
+      this.getCaseConf({caseid: subItem.CaseId}).then(res => {
505
+        if (res.Status === 1) {
506
+          this.$router.push({name: 'placeOrder', query: { tableid: encodeURI(subItem.TableId), tableno: encodeURI(subItem.TableNo), caseid: encodeURI(subItem.CaseId), casename: encodeURI(_that.topCaseInfoData.caseName), areaid: encodeURI(subItem.AreaId), areaname: encodeURI(item.AreaName)}})
507
+        } else {
508
+          _that.$toast('当前案场已歇业!')
509
+          return
510
+        }
511
+      })
507 512
     },
508 513
   }
509 514
 }

+ 1
- 3
src/pages/user/mainPage/indexPage/index.vue Wyświetl plik

@@ -116,9 +116,7 @@ export default {
116 116
       return this.$refs.mySwiper.swiper
117 117
     },
118 118
     MySwiperMsg () {
119
-      this.$nextTick(() => {  // 下一个UI帧再初始化swiper
120
-        return this.$refs.MySwiperMsg.swiper
121
-      })
119
+      return this.$refs.MySwiperMsg.swiper
122 120
     }
123 121
   },
124 122
   components: {

+ 2
- 2
src/util/api.js Wyświetl plik

@@ -1,5 +1,5 @@
1
-const baseUrl = '/api-v2'
2
-// const baseUrl = '/api'
1
+// const baseUrl = '/api-v2'
2
+const baseUrl = '/api'
3 3
 const wechat = '/wechat/:org'
4 4
 const guest = '/guest/:org'
5 5