启用导入微信地址
This commit is contained in:
@ -46,7 +46,7 @@ import CitySelect from '@/components/CitySelect'
|
|||||||
import { getAddress, postAddress, getCity } from '@/api/user'
|
import { getAddress, postAddress, getCity } from '@/api/user'
|
||||||
import attrs, { required, chs_phone } from '@/utils/validate'
|
import attrs, { required, chs_phone } from '@/utils/validate'
|
||||||
import { validatorDefaultCatch } from '@/utils/dialog'
|
import { validatorDefaultCatch } from '@/utils/dialog'
|
||||||
// import { openAddress } from "@/libs/wechat";
|
import { openAddress } from "@/libs/wechat";
|
||||||
import { isWeixin } from '@/utils'
|
import { isWeixin } from '@/utils'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -114,7 +114,45 @@ export default {
|
|||||||
that.address.district = res.data.district
|
that.address.district = res.data.district
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getAddress() {},
|
getAddress() {
|
||||||
|
console.log('aaaaaaaaaa')
|
||||||
|
openAddress().then(userInfo => {
|
||||||
|
uni.showLoading({ title: "加载中" });
|
||||||
|
postAddress({
|
||||||
|
real_name: userInfo.userName,
|
||||||
|
phone: userInfo.telNumber,
|
||||||
|
address: {
|
||||||
|
province: userInfo.provinceName,
|
||||||
|
city: userInfo.cityName,
|
||||||
|
district: userInfo.countryName
|
||||||
|
},
|
||||||
|
detail: userInfo.detailInfo,
|
||||||
|
post_code: userInfo.postalCode,
|
||||||
|
wx_export: 1
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.page = 1;
|
||||||
|
this.loading = false;
|
||||||
|
this.loadend = false;
|
||||||
|
this.addressList = [];
|
||||||
|
this.AddressList();
|
||||||
|
uni.hideLoading();
|
||||||
|
uni.showToast({
|
||||||
|
title: "添加成功",
|
||||||
|
icon: 'success',
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
uni.hideLoading();
|
||||||
|
uni.showToast({
|
||||||
|
title: err.msg || err.response.data.msg|| err.response.data.message,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
async submit() {
|
async submit() {
|
||||||
let name = this.userAddress.realName,
|
let name = this.userAddress.realName,
|
||||||
phone = this.userAddress.phone,
|
phone = this.userAddress.phone,
|
||||||
|
Reference in New Issue
Block a user