|
|
|
@ -154,7 +154,8 @@ export default { |
|
|
|
cityId: "", |
|
|
|
alertShow: false, |
|
|
|
address: "", |
|
|
|
flag: false |
|
|
|
flag: false, |
|
|
|
state: 0 |
|
|
|
}; |
|
|
|
}, |
|
|
|
components: { |
|
|
|
@ -173,13 +174,13 @@ export default { |
|
|
|
methods: { |
|
|
|
//监听地区选择的完成按钮 |
|
|
|
getName() { |
|
|
|
console.log(1); |
|
|
|
let arr = this.addressValue[2].split("&") || ""; |
|
|
|
this.districtId = arr[0]; |
|
|
|
this.merchantNo = arr[2]; |
|
|
|
this.getGoodsList(); //加载商品列表 |
|
|
|
this.defaultCity = arr[1]; |
|
|
|
this.show = false; |
|
|
|
console.log(this.addressValue); |
|
|
|
localStorage.setItem("cityName", this.addressValue); |
|
|
|
this.ShareWenXin(); |
|
|
|
}, |
|
|
|
@ -206,7 +207,6 @@ export default { |
|
|
|
//获取城市名称 |
|
|
|
change(name) { |
|
|
|
if (this.flag) { |
|
|
|
console.log(1); |
|
|
|
this.addressValue = name; |
|
|
|
} |
|
|
|
}, |
|
|
|
@ -280,14 +280,19 @@ export default { |
|
|
|
// }, |
|
|
|
setShow() { |
|
|
|
let str = localStorage.getItem("cityName") || ""; |
|
|
|
if (!str) { |
|
|
|
if (!str && this.state == -1) { |
|
|
|
this.defaultCity = "天河区"; |
|
|
|
//商户编号 |
|
|
|
this.merchantNo = 2; |
|
|
|
//区id |
|
|
|
this.districtId = "440106000"; |
|
|
|
this.addressValue = []; |
|
|
|
this.addressValue = [ |
|
|
|
"440000000&广东省", |
|
|
|
"440100000&广州市", |
|
|
|
"440106000&天河区&2" |
|
|
|
]; |
|
|
|
this.getGoodsList(); |
|
|
|
this.state = 0; |
|
|
|
} |
|
|
|
this.show = false; |
|
|
|
}, |
|
|
|
@ -381,6 +386,7 @@ export default { |
|
|
|
} else if (data.userAddress.type == 0) { |
|
|
|
this.getGoodsList(); |
|
|
|
} else if (data.userAddress.type == -1) { |
|
|
|
this.state = -1; |
|
|
|
this.$vux.alert.show({ |
|
|
|
title: "自动定位失败", |
|
|
|
onHide: () => { |
|
|
|
|