提交 4ef4f9d2 编写于 作者: D devil_gong

优化

上级 8b04fd24
......@@ -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",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册