Compare commits
2 Commits
1b0778606e
...
b19e4e0c0a
| Author | SHA1 | Date |
|---|---|---|
|
|
b19e4e0c0a | |
|
|
8a30d4de74 |
|
|
@ -75,11 +75,10 @@ export default {
|
|||
async updateDefaultAddr(item) {
|
||||
try {
|
||||
let param = {
|
||||
"id":item.id,
|
||||
"addrId":item.addrId,
|
||||
"userId":uni.getStorageSync('userId')
|
||||
}
|
||||
const res = await updateDefaultAddrApi(param)
|
||||
console.log('?? ~ getList ~ res:', res)
|
||||
if(res.code==200){
|
||||
uni.$u.toast(`操作成功!`)
|
||||
this.queryCustAddrList()
|
||||
|
|
@ -93,7 +92,6 @@ 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)}`
|
||||
|
|
|
|||
|
|
@ -40,8 +40,7 @@
|
|||
fontValue:uni.getStorageSync('fontSize') || 8,
|
||||
NavbarTitle:"收货地址",
|
||||
address:{
|
||||
id: "",
|
||||
// ifDefault:0,
|
||||
addrId: "",
|
||||
addrFullName: "",
|
||||
detailAddr: "",
|
||||
contactName: "",
|
||||
|
|
@ -102,8 +101,8 @@
|
|||
}else if(this.address.detailAddr==""){
|
||||
uni.$u.toast(`详细地址不能为空`)
|
||||
}else{
|
||||
const id=this.address.id;
|
||||
if(id!=undefined&&id!=""){
|
||||
const addrId=this.address.addrId;
|
||||
if(addrId!=undefined && addrId!=""){
|
||||
this.updatedata();
|
||||
}else{
|
||||
this.insertdata();
|
||||
|
|
@ -113,6 +112,7 @@
|
|||
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.id});
|
||||
const res = await deleteCustAddrForAppApi({id:this.address.addrId});
|
||||
if(res.code==200){
|
||||
uni.$u.toast(`删除成功!`)
|
||||
setTimeout(()=>{
|
||||
|
|
|
|||
Loading…
Reference in New Issue