提交 847b4ce4 编写于 作者: Shine-zwj's avatar Shine-zwj

update:更新

上级 dcc5f9b9
...@@ -170,12 +170,10 @@ export default class AppMobMapPage extends Vue { ...@@ -170,12 +170,10 @@ export default class AppMobMapPage extends Vue {
} else { } else {
o.getCurrentPosition((status: any, result: any) => { o.getCurrentPosition((status: any, result: any) => {
if (result && result.status != 0) { if (result && result.status != 0) {
alert('定位成功')
this.center = [result.position.lng, result.position.lat]; this.center = [result.position.lng, result.position.lat];
this.address = result.formattedAddress; this.address = result.formattedAddress;
Object.assign(this.marker, { position: this.center, address: this.address, visible: true }); Object.assign(this.marker, { position: this.center, address: this.address, visible: true });
} else { } else {
alert('定位失败')
this.address = this.marker.address; this.address = this.marker.address;
console.warn('定位失败'); console.warn('定位失败');
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册