mirror of
https://gitee.com/zongzhige/shopxo.git
synced 2024-12-02 03:48:47 +08:00
小程序下单地址选择优化
This commit is contained in:
parent
88f5786f70
commit
90b78135dd
@ -19,7 +19,7 @@ return [
|
||||
// 应用地址
|
||||
'app_host' => '',
|
||||
// 应用调试模式
|
||||
'app_debug' => false,
|
||||
'app_debug' => true,
|
||||
// 应用Trace
|
||||
'app_trace' => false,
|
||||
// 是否支持多模块
|
||||
|
@ -78,7 +78,7 @@ Page({
|
||||
{
|
||||
this.setData({
|
||||
address: cache_address.data,
|
||||
address_id: cache_address.data.id || 0,
|
||||
address_id: cache_address.id,
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -303,17 +303,21 @@ Page({
|
||||
|
||||
// 销售+自提 模式选择事件
|
||||
buy_header_nav_event(e) {
|
||||
// 数据设置
|
||||
this.setData({
|
||||
address: null,
|
||||
address_id: null,
|
||||
site_model: e.currentTarget.dataset.value || 0,
|
||||
});
|
||||
|
||||
// 删除地址缓存
|
||||
my.removeStorageSync({key: app.data.cache_buy_user_address_select_key});
|
||||
var value = e.currentTarget.dataset.value || 0;
|
||||
if (value != this.data.site_model)
|
||||
{
|
||||
// 数据设置
|
||||
this.setData({
|
||||
address: null,
|
||||
address_id: null,
|
||||
site_model: value,
|
||||
});
|
||||
|
||||
// 数据初始化
|
||||
this.init();
|
||||
// 删除地址缓存
|
||||
my.removeStorageSync({key: app.data.cache_buy_user_address_select_key});
|
||||
|
||||
// 数据初始化
|
||||
this.init();
|
||||
}
|
||||
},
|
||||
});
|
||||
|
@ -63,7 +63,7 @@ Page({
|
||||
if ((cache_address || null) != null) {
|
||||
this.setData({
|
||||
address: cache_address,
|
||||
address_id: cache_address.id || null
|
||||
address_id: cache_address.id,
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -280,17 +280,21 @@ Page({
|
||||
|
||||
// 销售+自提 模式选择事件
|
||||
buy_header_nav_event(e) {
|
||||
// 数据设置
|
||||
this.setData({
|
||||
address: null,
|
||||
address_id: null,
|
||||
site_model: e.currentTarget.dataset.value || 0,
|
||||
});
|
||||
|
||||
// 删除地址缓存
|
||||
swan.removeStorageSync(app.data.cache_buy_user_address_select_key);
|
||||
var value = e.currentTarget.dataset.value || 0;
|
||||
if (value != this.data.site_model)
|
||||
{
|
||||
// 数据设置
|
||||
this.setData({
|
||||
address: null,
|
||||
address_id: null,
|
||||
site_model: value,
|
||||
});
|
||||
|
||||
// 数据初始化
|
||||
this.init();
|
||||
// 删除地址缓存
|
||||
swan.removeStorageSync(app.data.cache_buy_user_address_select_key);
|
||||
|
||||
// 数据初始化
|
||||
this.init();
|
||||
}
|
||||
},
|
||||
});
|
@ -66,7 +66,7 @@ Page({
|
||||
{
|
||||
this.setData({
|
||||
address: cache_address,
|
||||
address_id: cache_address.id || null,
|
||||
address_id: cache_address.id,
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -289,17 +289,21 @@ Page({
|
||||
|
||||
// 销售+自提 模式选择事件
|
||||
buy_header_nav_event(e) {
|
||||
// 数据设置
|
||||
this.setData({
|
||||
address: null,
|
||||
address_id: null,
|
||||
site_model: e.currentTarget.dataset.value || 0,
|
||||
});
|
||||
|
||||
// 删除地址缓存
|
||||
qq.removeStorageSync(app.data.cache_buy_user_address_select_key);
|
||||
var value = e.currentTarget.dataset.value || 0;
|
||||
if (value != this.data.site_model)
|
||||
{
|
||||
// 数据设置
|
||||
this.setData({
|
||||
address: null,
|
||||
address_id: null,
|
||||
site_model: value,
|
||||
});
|
||||
|
||||
// 数据初始化
|
||||
this.init();
|
||||
// 删除地址缓存
|
||||
qq.removeStorageSync(app.data.cache_buy_user_address_select_key);
|
||||
|
||||
// 数据初始化
|
||||
this.init();
|
||||
}
|
||||
},
|
||||
});
|
||||
|
@ -66,7 +66,7 @@ Page({
|
||||
{
|
||||
this.setData({
|
||||
address: cache_address,
|
||||
address_id: cache_address.id || null,
|
||||
address_id: cache_address.id,
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -289,17 +289,21 @@ Page({
|
||||
|
||||
// 销售+自提 模式选择事件
|
||||
buy_header_nav_event(e) {
|
||||
// 数据设置
|
||||
this.setData({
|
||||
address: null,
|
||||
address_id: null,
|
||||
site_model: e.currentTarget.dataset.value || 0,
|
||||
});
|
||||
|
||||
// 删除地址缓存
|
||||
tt.removeStorageSync(app.data.cache_buy_user_address_select_key);
|
||||
var value = e.currentTarget.dataset.value || 0;
|
||||
if (value != this.data.site_model)
|
||||
{
|
||||
// 数据设置
|
||||
this.setData({
|
||||
address: null,
|
||||
address_id: null,
|
||||
site_model: value,
|
||||
});
|
||||
|
||||
// 数据初始化
|
||||
this.init();
|
||||
// 删除地址缓存
|
||||
tt.removeStorageSync(app.data.cache_buy_user_address_select_key);
|
||||
|
||||
// 数据初始化
|
||||
this.init();
|
||||
}
|
||||
},
|
||||
});
|
||||
|
@ -66,7 +66,7 @@ Page({
|
||||
{
|
||||
this.setData({
|
||||
address: cache_address,
|
||||
address_id: cache_address.id || null,
|
||||
address_id: cache_address.id,
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -289,17 +289,21 @@ Page({
|
||||
|
||||
// 销售+自提 模式选择事件
|
||||
buy_header_nav_event(e) {
|
||||
// 数据设置
|
||||
this.setData({
|
||||
address: null,
|
||||
address_id: null,
|
||||
site_model: e.currentTarget.dataset.value || 0,
|
||||
});
|
||||
|
||||
// 删除地址缓存
|
||||
wx.removeStorageSync(app.data.cache_buy_user_address_select_key);
|
||||
var value = e.currentTarget.dataset.value || 0;
|
||||
if (value != this.data.site_model)
|
||||
{
|
||||
// 数据设置
|
||||
this.setData({
|
||||
address: null,
|
||||
address_id: null,
|
||||
site_model: value,
|
||||
});
|
||||
|
||||
// 数据初始化
|
||||
this.init();
|
||||
// 删除地址缓存
|
||||
wx.removeStorageSync(app.data.cache_buy_user_address_select_key);
|
||||
|
||||
// 数据初始化
|
||||
this.init();
|
||||
}
|
||||
},
|
||||
});
|
||||
|
@ -2,7 +2,7 @@
|
||||
<view wx:if="{{common_app_is_header_nav_fixed == 1}}" class="search-fixed-seat"></view>
|
||||
<view wx:if="{{load_status == 1 && common_app_is_enable_search == 1}}" class="search wh-auto {{common_app_is_header_nav_fixed == 1 ? 'search-fixed' : ''}}">
|
||||
<view class="search-content bg-white oh">
|
||||
<icon type="search" size="16" />
|
||||
<icon type="search" size="32rpx" />
|
||||
<input type="text" confirm-type="search" placeholder="其实搜索很简单^_^!" class="wh-auto cr-888" bindconfirm="search_input_event" confirm-type="search" />
|
||||
</view>
|
||||
</view>
|
||||
|
@ -16,7 +16,7 @@
|
||||
.search icon {
|
||||
position: absolute;
|
||||
left: 15rpx;
|
||||
top: 15rpx;
|
||||
top: 20rpx;
|
||||
}
|
||||
.search input {
|
||||
font-size: 28rpx;
|
||||
|
Loading…
Reference in New Issue
Block a user