更换默认收货地址参数名称

main
xuechunyuan 2 years ago
parent f1e32af7a5
commit dfff5aedc8
  1. 2
      pages/pages_zhentou/homePage/homePage.vue
  2. 2
      pages/pages_zhentou/myPage/myPage.vue
  3. 4
      pages/pages_zhentou/order/confirmOrder.vue

@ -47,7 +47,7 @@
let userInfo = uni.getStorageSync('userInfo'); let userInfo = uni.getStorageSync('userInfo');
if (userInfo) { if (userInfo) {
this.userInfo = JSON.parse(userInfo); this.userInfo = JSON.parse(userInfo);
console.log('home',userInfo) // console.log('home',userInfo)
if(this.userInfo.phone) { if(this.userInfo.phone) {
this.phone = this.userInfo.phone; this.phone = this.userInfo.phone;
this.hasPhone = true; this.hasPhone = true;

@ -84,6 +84,8 @@
let _data = JSON.parse(res.data); let _data = JSON.parse(res.data);
if (_data.code == 200) { if (_data.code == 200) {
this.updateAvatar(_data.data.link); this.updateAvatar(_data.data.link);
}else if(_data.code == 401){
this.doLogin();
} }
} }
}) })

@ -93,6 +93,8 @@
this.addressInfo = JSON.parse(address); this.addressInfo = JSON.parse(address);
uni.removeStorageSync('address'); uni.removeStorageSync('address');
console.log(this.addressInfo) console.log(this.addressInfo)
}else if(this.userInfo){
this.queryAddress();
} }
}, },
methods: { methods: {
@ -169,7 +171,7 @@
consigneePhone: this.addressInfo.phone, consigneePhone: this.addressInfo.phone,
province: this.addressInfo.province, province: this.addressInfo.province,
city: this.addressInfo.city, city: this.addressInfo.city,
district: this.addressInfo.distrit, district: this.addressInfo.area,
address: this.addressInfo.address, address: this.addressInfo.address,
isDefaultAddress: this.addressInfo.isDefault isDefaultAddress: this.addressInfo.isDefault
}, },

Loading…
Cancel
Save