yuantianjiao 6 年之前
父節點
當前提交
2ceac3c003

二進制
public/favicon.ico 查看文件


+ 46
- 29
src/pages/user/mainPage/coffeeIndex/index.vue 查看文件

247
     }),
247
     }),
248
     ...mapCaseState({
248
     ...mapCaseState({
249
       caseTotal: x => x.caseTotal,
249
       caseTotal: x => x.caseTotal,
250
+      choosedCase: x => x.choosedCase
250
     }),
251
     }),
251
     ...mapCardState({
252
     ...mapCardState({
252
       cardList: x => x.cardList
253
       cardList: x => x.cardList
365
     ...mapCaseActions([
366
     ...mapCaseActions([
366
       'getCaseTotal',
367
       'getCaseTotal',
367
       'getCaseConf',
368
       'getCaseConf',
369
+      'changeChoosedCase'
368
     ]),
370
     ]),
369
     ...mapCardActions(['getCardList']),
371
     ...mapCardActions(['getCardList']),
370
     checkCanDo () {
372
     checkCanDo () {
413
         caseid: this.topCaseInfoData.caseId
415
         caseid: this.topCaseInfoData.caseId
414
       })
416
       })
415
       this.showSelect = false
417
       this.showSelect = false
418
+      this.changeChoosedCase({ CaseName: val.CaseName, CaseId: val.CaseId })
416
     },
419
     },
417
     cutNav (index) { // 切换nav
420
     cutNav (index) { // 切换nav
418
       this.navActive = index
421
       this.navActive = index
498
           })
501
           })
499
         }
502
         }
500
       } else {
503
       } else {
501
-        wxsdk({ url: encodeURIComponent(window.location.href.split('#')[0]) }, {
502
-          title: '城的空间',
503
-          desc: '城的空间',
504
-          link: `${window.location.origin}${window.location.pathname}#/mainPage/indexPage`,
505
-          thu_image: `https://spaceofcheng.oss-cn-beijing.aliyuncs.com/indexlogo.jpg?x-oss-process=style/wxicon`
506
-        }).then(() => {
507
-          wx.getLocation({
508
-            type: 'gcj02', // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02'
509
-            success: function (res) {
510
-              let latitude1 = res.latitude // 纬度,浮点数,范围为90 ~ -90
511
-              let longitude1 = res.longitude // 经度,浮点数,范围为180 ~ -180。
512
-              for (let i = 0; i < that.CaseList.length; i++) {
513
-                let result = that.CaseList[i].Coordinate.split(",")
514
-                let latitude2 = parseFloat(result[0])
515
-                let longitude2 = parseFloat(result[1])
516
-                if (that.toolClass.getGreatCircleDistance(latitude1, longitude1, latitude2, longitude2) < 500) {
517
-                  that.topCaseInfoData.caseName = that.CaseList[i].CaseName
518
-                  that.topCaseInfoData.caseId = that.CaseList[i].CaseId
519
-                  that.getCaseTableList({
520
-                    caseid: that.topCaseInfoData.caseId
521
-                  })
522
-                  if (this.userInfo.customer.MapUser !== '') {
523
-                    that.getCaseTotal({
504
+        // console.log(this.choosedCase)
505
+        if (this.choosedCase.CaseId) {
506
+          that.topCaseInfoData.caseName = this.choosedCase.CaseName
507
+          that.topCaseInfoData.caseId = this.choosedCase.CaseId
508
+          // that.getCaseTableList({
509
+          //   caseid: that.topCaseInfoData.caseId
510
+          // })
511
+          // if (this.userInfo.customer.MapUser !== '') {
512
+          //   that.getCaseTotal({
513
+          //     caseid: that.topCaseInfoData.caseId
514
+          //   })
515
+          // }
516
+        } else {
517
+          wxsdk({ url: encodeURIComponent(window.location.href.split('#')[0]) }, {
518
+            title: '城的空间',
519
+            desc: '城的空间',
520
+            link: `${window.location.origin}${window.location.pathname}#/mainPage/indexPage`,
521
+            thu_image: `https://spaceofcheng.oss-cn-beijing.aliyuncs.com/indexlogo.jpg?x-oss-process=style/wxicon`
522
+          }).then(() => {
523
+            wx.getLocation({
524
+              type: 'gcj02', // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02'
525
+              success: function (res) {
526
+                let latitude1 = res.latitude // 纬度,浮点数,范围为90 ~ -90
527
+                let longitude1 = res.longitude // 经度,浮点数,范围为180 ~ -180。
528
+                for (let i = 0; i < that.CaseList.length; i++) {
529
+                  let result = that.CaseList[i].Coordinate.split(",")
530
+                  let latitude2 = parseFloat(result[0])
531
+                  let longitude2 = parseFloat(result[1])
532
+                  if (that.toolClass.getGreatCircleDistance(latitude1, longitude1, latitude2, longitude2) < 500) {
533
+                    that.topCaseInfoData.caseName = that.CaseList[i].CaseName
534
+                    that.topCaseInfoData.caseId = that.CaseList[i].CaseId
535
+                    that.getCaseTableList({
524
                       caseid: that.topCaseInfoData.caseId
536
                       caseid: that.topCaseInfoData.caseId
525
                     })
537
                     })
538
+                    if (this.userInfo.customer.MapUser !== '') {
539
+                      that.getCaseTotal({
540
+                        caseid: that.topCaseInfoData.caseId
541
+                      })
542
+                    }
526
                   }
543
                   }
527
                 }
544
                 }
545
+                if (!that.topCaseInfoData.caseId || !that.topCaseInfoData.caseName) {
546
+                  that.$toast('当前位置无案场')
547
+                  that.topCaseInfoData.caseName = '当前位置无案场'
548
+                }
528
               }
549
               }
529
-              if (!that.topCaseInfoData.caseId || !that.topCaseInfoData.caseName) {
530
-                that.$toast('当前位置无案场')
531
-                that.topCaseInfoData.caseName = '当前位置无案场'
532
-              }
533
-            }
550
+            })
534
           })
551
           })
535
-        })
552
+        }
536
       }
553
       }
537
     },
554
     },
538
     beforeClose (action, done) {
555
     beforeClose (action, done) {

+ 4
- 3
src/pages/user/mainPage/index.vue 查看文件

19
 </template>
19
 </template>
20
 
20
 
21
 <script>
21
 <script>
22
-import { mapState } from 'vuex'
22
+import { mapState, mapActions } from 'vuex'
23
 export default {
23
 export default {
24
   name: '',
24
   name: '',
25
   data () {
25
   data () {
48
     if (!this.userInfo.customer.MapUser || !this.$route.query.hideTabbar) {
48
     if (!this.userInfo.customer.MapUser || !this.$route.query.hideTabbar) {
49
       this.showTabBar = true
49
       this.showTabBar = true
50
     }
50
     }
51
-  },
52
-  methods: {
51
+    if (this.$route.query.hideTabbar){
52
+      sessionStorage.setItem('from','sales')
53
+    }
53
   }
54
   }
54
 }
55
 }
55
 </script>
56
 </script>

+ 4
- 2
src/pages/user/placeOrder/index.vue 查看文件

275
       })
275
       })
276
     },
276
     },
277
     placeOrder (Remark) { // 下单
277
     placeOrder (Remark) { // 下单
278
-      if(this.ajaxOff){
278
+      if (this.ajaxOff) {
279
         this.ajaxOff = false
279
         this.ajaxOff = false
280
         this.postData.info.OrgId = this.orgId
280
         this.postData.info.OrgId = this.orgId
281
         this.postData.info.UserId = this.userInfo.CustomerId
281
         this.postData.info.UserId = this.userInfo.CustomerId
282
         this.postData.info.UserName = this.userInfo.customer.CustomerName
282
         this.postData.info.UserName = this.userInfo.customer.CustomerName
283
         this.postData.info.PayType = 'sys user'
283
         this.postData.info.PayType = 'sys user'
284
         this.postData.info.Remark = Remark
284
         this.postData.info.Remark = Remark
285
+        this.postData.from = sessionStorage.getItem('from') ? sessionStorage.getItem('from') : ''
285
         var orderInfo = this.selGoods
286
         var orderInfo = this.selGoods
286
         this.postData.detail = []
287
         this.postData.detail = []
287
         var amount = 0
288
         var amount = 0
304
         this.toPay({
305
         this.toPay({
305
           info: JSON.stringify(this.postData.info),
306
           info: JSON.stringify(this.postData.info),
306
           detail: JSON.stringify(this.postData.detail),
307
           detail: JSON.stringify(this.postData.detail),
307
-          coupon: JSON.stringify(this.postData.coupon)
308
+          customercouponid: JSON.stringify(this.postData.coupon) || '',
309
+          from: this.postData.from
308
         }).then((res) => {
310
         }).then((res) => {
309
           this.ajaxOff = true
311
           this.ajaxOff = true
310
           this.showCalcMenu = false
312
           this.showCalcMenu = false

+ 2
- 1
src/pages/user/placeOrderDetail/index.vue 查看文件

237
         this.toPay({
237
         this.toPay({
238
           info: JSON.stringify(this.postData.info),
238
           info: JSON.stringify(this.postData.info),
239
           detail: JSON.stringify(this.postData.detail),
239
           detail: JSON.stringify(this.postData.detail),
240
-          customercouponid: this.postData.customercouponid
240
+          customercouponid: this.postData.customercouponid || '',
241
+          from: ''
241
         }).then((res) => {
242
         }).then((res) => {
242
           this.showSuccessPopup = true
243
           this.showSuccessPopup = true
243
           // this.$dialog.alert({
244
           // this.$dialog.alert({

+ 8
- 1
src/store/case/case.js 查看文件

7
   state: {
7
   state: {
8
     caseTotal: {},
8
     caseTotal: {},
9
     caseConf: {},
9
     caseConf: {},
10
+    choosedCase: {}
10
   },
11
   },
11
   mutations: {
12
   mutations: {
12
     setCaseTotal (state, data) { // 获取案场下单数量信息
13
     setCaseTotal (state, data) { // 获取案场下单数量信息
15
     setCaseConf (state, data) { // 获取案场下单数量信息
16
     setCaseConf (state, data) { // 获取案场下单数量信息
16
       state.caseConf = data
17
       state.caseConf = data
17
     },
18
     },
19
+    setChoosedCase (state, data) { // 获取案场下单数量信息
20
+      state.choosedCase = data
21
+    },
18
   },
22
   },
19
   actions: {
23
   actions: {
20
     getCaseTotal ({ commit }, { caseid }) {
24
     getCaseTotal ({ commit }, { caseid }) {
32
         })
36
         })
33
       })
37
       })
34
     },
38
     },
35
-    getCaseConf ({ commit },{ caseid }) {
39
+    getCaseConf ({ commit }, { caseid }) {
36
       return new Promise((resolve, reject) => {
40
       return new Promise((resolve, reject) => {
37
         Ajax(api.case.conf.url, {
41
         Ajax(api.case.conf.url, {
38
           method: api.case.conf.method,
42
           method: api.case.conf.method,
46
           reject(err)
50
           reject(err)
47
         })
51
         })
48
       })
52
       })
53
+    },
54
+    changeChoosedCase ({ commit }, data) {
55
+      commit("setChoosedCase", data)
49
     }
56
     }
50
   }
57
   }
51
 }
58
 }

+ 2
- 1
src/store/placeOrderForCoffee/index.js 查看文件

63
         })
63
         })
64
       })
64
       })
65
     },
65
     },
66
-    toPay (context, { info, detail, customercouponid }) { // 下单
66
+    toPay (context, { info, detail, customercouponid, from }) { // 下单
67
       return new Promise((resolve, reject) => {
67
       return new Promise((resolve, reject) => {
68
         Ajax(api.caseForCoffee.placeGoodsOrder.url, {
68
         Ajax(api.caseForCoffee.placeGoodsOrder.url, {
69
           method: api.caseForCoffee.placeGoodsOrder.method,
69
           method: api.caseForCoffee.placeGoodsOrder.method,
71
             info,
71
             info,
72
             detail,
72
             detail,
73
             customercouponid,
73
             customercouponid,
74
+            from
74
           },
75
           },
75
         }).then(res => {
76
         }).then(res => {
76
           resolve(res)
77
           resolve(res)

+ 1
- 0
vue.config.js 查看文件

34
       },
34
       },
35
     },
35
     },
36
     // compress: true,
36
     // compress: true,
37
+    devtool: 'source-map',
37
     disableHostCheck: true,   // That solved it
38
     disableHostCheck: true,   // That solved it
38
   }
39
   }
39
 }
40
 }