Compare commits

..

No commits in common. "b19e4e0c0af515ebeb497712e1116d8f40b30143" and "1b0778606e38fd86c045f6b624875baf34834f77" have entirely different histories.

2 changed files with 8 additions and 6 deletions

View File

@ -75,10 +75,11 @@ export default {
async updateDefaultAddr(item) {
try {
let param = {
"addrId":item.addrId,
"id":item.id,
"userId":uni.getStorageSync('userId')
}
const res = await updateDefaultAddrApi(param)
console.log('?? ~ getList ~ res:', res)
if(res.code==200){
uni.$u.toast(`操作成功!`)
this.queryCustAddrList()
@ -92,6 +93,7 @@ export default {
handleEdit(address) {
//
// uni.$u.toast(`${index + 1}`)
console.log('?? ==='+address)
uni.navigateTo({
// url: `/pages/mine/me/upAddress?address=${encodeURIComponent(JSON.stringify(address))}`
url: `/pages/mine/me/upAddress?address=${JSON.stringify(address)}`

View File

@ -40,7 +40,8 @@
fontValue:uni.getStorageSync('fontSize') || 8,
NavbarTitle:"收货地址",
address:{
addrId: "",
id: "",
// ifDefault:0,
addrFullName: "",
detailAddr: "",
contactName: "",
@ -101,8 +102,8 @@
}else if(this.address.detailAddr==""){
uni.$u.toast(`详细地址不能为空`)
}else{
const addrId=this.address.addrId;
if(addrId!=undefined && addrId!=""){
const id=this.address.id;
if(id!=undefined&&id!=""){
this.updatedata();
}else{
this.insertdata();
@ -112,7 +113,6 @@
async updatedata(){
let param = {
"id":this.address.id,
"addrId":this.address.addrId,
"userId":uni.getStorageSync('userId'),
"contactName": this.address.contactName,
"mobile": this.address.mobile,
@ -154,7 +154,7 @@
}
},
async delAddress(){
const res = await deleteCustAddrForAppApi({id:this.address.addrId});
const res = await deleteCustAddrForAppApi({id:this.address.id});
if(res.code==200){
uni.$u.toast(`删除成功!`)
setTimeout(()=>{