yuantianjiao 6 年前
父节点
当前提交
6d9aa0fa34
共有 1 个文件被更改,包括 39 次插入31 次删除
  1. 39
    31
      src/pages/user/mainPage/coffeeIndex/index.vue

+ 39
- 31
src/pages/user/mainPage/coffeeIndex/index.vue 查看文件

@@ -427,37 +427,45 @@ export default {
427 427
       window.location.href = this.getUrl('customerSearch')
428 428
     },
429 429
     locationMapping () {
430
-      wxsdk({ url: encodeURIComponent(window.location.href.split('#')[0]) }, {
431
-        title: '城的空间',
432
-        desc: '城的空间',
433
-        link: `${window.location.origin}${window.location.pathname}/user.html#/mainPage/indexPage`,
434
-        thu_image: `${window.location.origin}${window.location.pathname}${logo}`
435
-      }).then(() => {
436
-        wx.getLocation({
437
-          type: 'gcj02', // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02'
438
-          success: function (res) {
439
-            let latitude1 = res.latitude // 纬度,浮点数,范围为90 ~ -90
440
-            let longitude1 = res.longitude // 经度,浮点数,范围为180 ~ -180。
441
-            for (let i = 0; i < this.CaseList.length; i++) {
442
-              let result = this.CaseList[i].Coordinate.split(",")
443
-              let latitude2 = parseFloat(result[0])
444
-              let longitude2 = parseFloat(result[1])
445
-              if (this.toolClass.getGreatCircleDistance(latitude1, longitude1, latitude2, longitude2) < 500) {
446
-                this.topCaseInfoData.caseName = this.CaseList[i].CaseName
447
-                this.topCaseInfoData.caseId = this.CaseList[i].CaseId
448
-                this.getCaseTableList({
449
-                  caseid: this.topCaseInfoData.caseId
450
-                })
451
-                this.getCaseTotal({
452
-                  caseid: this.topCaseInfoData.caseId
453
-                })
454
-              }
455
-            }
456
-            if (!this.topCaseInfoData.caseId || !this.topCaseInfoData.caseName){
457
-              this.topCaseInfoData.caseName = '当前位置无案场'
458
-            }
459
-          }
460
-        })
430
+      // wxsdk({ url: encodeURIComponent(window.location.href.split('#')[0]) }, {
431
+      //   title: '城的空间',
432
+      //   desc: '城的空间',
433
+      //   link: `${window.location.origin}${window.location.pathname}/user.html#/mainPage/indexPage`,
434
+      //   thu_image: `${window.location.origin}${window.location.pathname}${logo}`
435
+      // }).then(() => {
436
+      //   wx.getLocation({
437
+      //     type: 'gcj02', // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02'
438
+      //     success: function (res) {
439
+      //       let latitude1 = res.latitude // 纬度,浮点数,范围为90 ~ -90
440
+      //       let longitude1 = res.longitude // 经度,浮点数,范围为180 ~ -180。
441
+      //       for (let i = 0; i < this.CaseList.length; i++) {
442
+      //         let result = this.CaseList[i].Coordinate.split(",")
443
+      //         let latitude2 = parseFloat(result[0])
444
+      //         let longitude2 = parseFloat(result[1])
445
+      //         if (this.toolClass.getGreatCircleDistance(latitude1, longitude1, latitude2, longitude2) < 500) {
446
+      //           this.topCaseInfoData.caseName = this.CaseList[i].CaseName
447
+      //           this.topCaseInfoData.caseId = this.CaseList[i].CaseId
448
+      //           this.getCaseTableList({
449
+      //             caseid: this.topCaseInfoData.caseId
450
+      //           })
451
+      //           this.getCaseTotal({
452
+      //             caseid: this.topCaseInfoData.caseId
453
+      //           })
454
+      //         }
455
+      //       }
456
+      //       if (!this.topCaseInfoData.caseId || !this.topCaseInfoData.caseName){
457
+      //         this.topCaseInfoData.caseName = '当前位置无案场'
458
+      //       }
459
+      //     }
460
+      //   })
461
+      // })
462
+      this.topCaseInfoData.caseName = this.CaseList[0].CaseName
463
+      this.topCaseInfoData.caseId = this.CaseList[0].CaseId
464
+      this.getCaseTableList({
465
+        caseid: this.topCaseInfoData.caseId
466
+      })
467
+      this.getCaseTotal({
468
+        caseid: this.topCaseInfoData.caseId
461 469
       })
462 470
     },
463 471
     beforeClose (action, done) {