This commit is contained in:
2020-08-03 14:34:56 +08:00
parent 7ae10c200d
commit af768bff80
11 changed files with 258 additions and 36 deletions

View File

@@ -233,7 +233,6 @@ export default {
uni.navigateTo({
url: '/pageB/photo/index?id=' + id
});
},
},
}

View File

@@ -49,6 +49,7 @@ export default {
area: '', // 详细地址
area_id: '', // 地区id 省
city_id: '', // 城市id
debounce: true,
}
},
props: {
@@ -78,18 +79,20 @@ export default {
},
// 判断是不是编辑页面 调用接口
confirmBtn() {
if(!this.debounce) return;
this.debounce = false;
this.info ? this.editAddress() : this.addAddress();
},
chooseArea() {
uni.chooseLocation({
success: function (res) {
console.log('位置名称:' + res.name);
console.log('详细地址:' + res.address);
console.log('纬度:' + res.latitude);
console.log('经度:' + res.longitude);
}
});
},
// chooseArea() {
// uni.chooseLocation({
// success: function (res) {
// console.log('位置名称:' + res.name);
// console.log('详细地址:' + res.address);
// console.log('纬度:' + res.latitude);
// console.log('经度:' + res.longitude);
// }
// });
// },
// 验证
validateValue() {
if(this.$u.test.isEmpty(this.name)) {
@@ -134,6 +137,7 @@ export default {
back: true,
})
} else {
this.debounce = true;
this.showToast(res.message, 'warning');
}
})
@@ -153,20 +157,13 @@ export default {
// latitude,
}).then((res)=>{
if (res.errCode == 0) {
uni.redirectTo({
url: '/pageE/more/Address'
});
// this.$refs.uToast.show({
// title: res.message,
// type: 'success',
// // url: '/pageE/more/Address',
// callback() {
// uni.redirectTo({
// url: '/pageE/more/Address'
// });
// }
// })
this.$refs.uToast.show({
title: res.message,
type: 'success',
back: true,
})
} else {
this.debounce = true;
this.showToast(res.message, 'warning');
}
})