将店铺的座标合成一个字段

This commit is contained in:
zhl 2021-05-13 15:58:31 +08:00
parent f2a052799c
commit 2b8a557ceb
2 changed files with 5 additions and 2 deletions

3
src/api/types.d.ts vendored
View File

@ -26,6 +26,7 @@ export interface IShopData {
lat?: number
showName?: string
extData?: string
category?: string,
category?: string
qtypes: string[]
location?: number[]
}

View File

@ -73,7 +73,7 @@
label="座标点"
prop="lng"
>
{{postForm.lat}} - {{postForm.lng}}
{{postForm.location}}
<el-button
type="success"
v-loading="querying"
@ -279,6 +279,7 @@ export default class extends Vue {
if (result.location) {
this.postForm.lat = result.location.lat
this.postForm.lng = result.location.lng
this.postForm.location = [result.location.lng, result.location.lat]
}
}
}
@ -294,6 +295,7 @@ export default class extends Vue {
if (data.location) {
this.postForm.lat = data.location.lat
this.postForm.lng = data.location.lng
this.postForm.location = [data.location.lng, data.location.lat]
}
}