将店铺的座标合成一个字段
This commit is contained in:
parent
f2a052799c
commit
2b8a557ceb
3
src/api/types.d.ts
vendored
3
src/api/types.d.ts
vendored
@ -26,6 +26,7 @@ export interface IShopData {
|
|||||||
lat?: number
|
lat?: number
|
||||||
showName?: string
|
showName?: string
|
||||||
extData?: string
|
extData?: string
|
||||||
category?: string,
|
category?: string
|
||||||
qtypes: string[]
|
qtypes: string[]
|
||||||
|
location?: number[]
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@
|
|||||||
label="座标点"
|
label="座标点"
|
||||||
prop="lng"
|
prop="lng"
|
||||||
>
|
>
|
||||||
{{postForm.lat}} - {{postForm.lng}}
|
{{postForm.location}}
|
||||||
<el-button
|
<el-button
|
||||||
type="success"
|
type="success"
|
||||||
v-loading="querying"
|
v-loading="querying"
|
||||||
@ -279,6 +279,7 @@ export default class extends Vue {
|
|||||||
if (result.location) {
|
if (result.location) {
|
||||||
this.postForm.lat = result.location.lat
|
this.postForm.lat = result.location.lat
|
||||||
this.postForm.lng = result.location.lng
|
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) {
|
if (data.location) {
|
||||||
this.postForm.lat = data.location.lat
|
this.postForm.lat = data.location.lat
|
||||||
this.postForm.lng = data.location.lng
|
this.postForm.lng = data.location.lng
|
||||||
|
this.postForm.location = [data.location.lng, data.location.lat]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user