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