feat/task1-c-wallet
parent
8b04fd2410
commit
4ef4f9d2e7
|
|
@ -55,6 +55,11 @@ Page({
|
|||
address: cache_address.data,
|
||||
address_id: cache_address.data.id
|
||||
});
|
||||
} else {
|
||||
this.setData({
|
||||
address: null,
|
||||
address_id: 0
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -88,7 +93,7 @@ Page({
|
|||
common_order_is_booking: data.common_order_is_booking || 0,
|
||||
});
|
||||
if (this.data.address == null || this.data.address_id == 0) {
|
||||
if((data.base.address || null) != null && data.base.address.length > 0) {
|
||||
if((data.base.address || null) != null) {
|
||||
this.setData({
|
||||
address: data.base.address,
|
||||
address_id: data.base.address.id,
|
||||
|
|
@ -96,8 +101,6 @@ Page({
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
console.log(this.data.address)
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
|
|
|
|||
|
|
@ -152,6 +152,18 @@ Page({
|
|||
type: "success",
|
||||
content: res.data.msg
|
||||
});
|
||||
|
||||
// 当前删除是否存在缓存中,存在则删除
|
||||
var cache_address = my.getStorageSync({
|
||||
key: app.data.cache_buy_user_address_select_key
|
||||
});
|
||||
if ((cache_address.data || null) != null) {
|
||||
if (cache_address.data.id == value) {
|
||||
// 删除地址缓存
|
||||
my.removeStorageSync({ key: app.data.cache_buy_user_address_select_key });
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
my.showToast({
|
||||
type: "fail",
|
||||
|
|
|
|||
Loading…
Reference in New Issue