flat: 暂存 添加定位处理70%,key达上限未测

This commit is contained in:
Apcallover
2024-04-22 10:43:23 +08:00
parent 3cb42d7be1
commit c662539768
8 changed files with 96 additions and 38 deletions

View File

@@ -209,6 +209,12 @@
import uniMask from '@/components/uni-mask/mask.vue'
import uniPopup from '@/components/uni-popup/uni-popup.vue'
import validCode from '@/components/p-valid-code/p-valid-code.vue'
import {
AddressToLocation
} from '@/untils/addressToLocation.js'
import {
add
} from 'lodash';
export default {
data() {
return {
@@ -220,8 +226,8 @@
maskShow: false,
nextBtn: false,
loading: false,
latitude: 39.909, //中心点
longitude: 116.39742,
latitude: 31.126855, //中心点
longitude: 104.397894,
covers: [{ //marker标记位置
id: 0,
latitude: 0,
@@ -301,10 +307,19 @@
missionDetail(self.missionNo).then(res => {
self.info = res.data.data;
self.status = res.data.data.detailStatus;
self.latitude = self.info.lat;
self.longitude = self.info.lon;
self.covers[0].latitude = self.info.lat;
self.covers[0].longitude = self.info.lon;
AddressToLocation({
smart_address: res.data.data.address
}).then((result) => {
console.log('result', result)
self.latitude = result.location.lat;
self.longitude = result.location.lon;
self.covers[0].latitude = result.location.lat;
self.covers[0].longitude = result.location.lon;
})
// self.latitude = self.info.lat;
// self.longitude = self.info.lon;
// self.covers[0].latitude = self.info.lat;
// self.covers[0].longitude = self.info.lon;
self.showDetail = true;
self.getCollectStatus();
if (self.type === 1) {
@@ -414,7 +429,8 @@
}
},
cityNamed() {
if (this.info && typeof this.info.cityId !== 'undefined' && this.info.cityId !== -1 && this.area.dic) {
if (this.info && typeof this.info.cityId !== 'undefined' && this.info.cityId !== -1 && this.area
.dic) {
return this.area.dic[this.info.cityId].label
} else {
return '无'