Browse Source

代码修改

wangfei 6 years ago
parent
commit
dc4a8cb558

+ 11
- 6
src/pages/user/mainPage/coffeeIndex/index.vue View File

438
     },
438
     },
439
     locationMapping () {
439
     locationMapping () {
440
       let that = this
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
       if (this.userInfo.customer.MapUser !== '') {
443
       if (this.userInfo.customer.MapUser !== '') {
444
         this.topCaseInfoData.caseId = this.userInfo.customer.BelongCaseId
444
         this.topCaseInfoData.caseId = this.userInfo.customer.BelongCaseId
445
         for (let i = 0; i < this.CaseList.length; i++) {
445
         for (let i = 0; i < this.CaseList.length; i++) {
500
       }
500
       }
501
     },
501
     },
502
     toOrders (subItem, item) {
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 View File

116
       return this.$refs.mySwiper.swiper
116
       return this.$refs.mySwiper.swiper
117
     },
117
     },
118
     MySwiperMsg () {
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
   components: {
122
   components: {

+ 2
- 2
src/util/api.js View File

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