【优化】优化添加地址,如果是从微信直接获取绑定的地址,则地图选点后不更新掉详细地址。

This commit is contained in:
jianweie code
2023-03-28 00:14:25 +08:00
parent c05aeceef1
commit 6e45eafafb

View File

@@ -100,6 +100,7 @@
export default {
data() {
return {
getType: 1, //1手动输入0从微信获取
id: 0,
form: {
name: '',
@@ -188,7 +189,10 @@
this.region = [location.province, location.district, location.city];
this.form.street = location.name;
this.form.address = location.address;
if (this.getType == 1) {
this.form.address = location.address;
}
console.log("location1:", location);
}
},
@@ -473,6 +477,7 @@
},
// #ifdef MP-WEIXIN
wechatAddress() {
this.getType = 0;
let _that = this;
wx.chooseAddress({
success: res => {