提交 90b78135 编写于 作者: D devil

小程序下单地址选择优化

上级 88f5786f
...@@ -19,7 +19,7 @@ return [ ...@@ -19,7 +19,7 @@ return [
// 应用地址 // 应用地址
'app_host' => '', 'app_host' => '',
// 应用调试模式 // 应用调试模式
'app_debug' => false, 'app_debug' => true,
// 应用Trace // 应用Trace
'app_trace' => false, 'app_trace' => false,
// 是否支持多模块 // 是否支持多模块
......
...@@ -78,7 +78,7 @@ Page({ ...@@ -78,7 +78,7 @@ Page({
{ {
this.setData({ this.setData({
address: cache_address.data, address: cache_address.data,
address_id: cache_address.data.id || 0, address_id: cache_address.id,
}); });
} }
} }
...@@ -303,11 +303,14 @@ Page({ ...@@ -303,11 +303,14 @@ Page({
// 销售+自提 模式选择事件 // 销售+自提 模式选择事件
buy_header_nav_event(e) { buy_header_nav_event(e) {
var value = e.currentTarget.dataset.value || 0;
if (value != this.data.site_model)
{
// 数据设置 // 数据设置
this.setData({ this.setData({
address: null, address: null,
address_id: null, address_id: null,
site_model: e.currentTarget.dataset.value || 0, site_model: value,
}); });
// 删除地址缓存 // 删除地址缓存
...@@ -315,5 +318,6 @@ Page({ ...@@ -315,5 +318,6 @@ Page({
// 数据初始化 // 数据初始化
this.init(); this.init();
}
}, },
}); });
...@@ -63,7 +63,7 @@ Page({ ...@@ -63,7 +63,7 @@ Page({
if ((cache_address || null) != null) { if ((cache_address || null) != null) {
this.setData({ this.setData({
address: cache_address, address: cache_address,
address_id: cache_address.id || null address_id: cache_address.id,
}); });
} }
} }
...@@ -280,11 +280,14 @@ Page({ ...@@ -280,11 +280,14 @@ Page({
// 销售+自提 模式选择事件 // 销售+自提 模式选择事件
buy_header_nav_event(e) { buy_header_nav_event(e) {
var value = e.currentTarget.dataset.value || 0;
if (value != this.data.site_model)
{
// 数据设置 // 数据设置
this.setData({ this.setData({
address: null, address: null,
address_id: null, address_id: null,
site_model: e.currentTarget.dataset.value || 0, site_model: value,
}); });
// 删除地址缓存 // 删除地址缓存
...@@ -292,5 +295,6 @@ Page({ ...@@ -292,5 +295,6 @@ Page({
// 数据初始化 // 数据初始化
this.init(); this.init();
}
}, },
}); });
\ No newline at end of file
...@@ -66,7 +66,7 @@ Page({ ...@@ -66,7 +66,7 @@ Page({
{ {
this.setData({ this.setData({
address: cache_address, address: cache_address,
address_id: cache_address.id || null, address_id: cache_address.id,
}); });
} }
} }
...@@ -289,11 +289,14 @@ Page({ ...@@ -289,11 +289,14 @@ Page({
// 销售+自提 模式选择事件 // 销售+自提 模式选择事件
buy_header_nav_event(e) { buy_header_nav_event(e) {
var value = e.currentTarget.dataset.value || 0;
if (value != this.data.site_model)
{
// 数据设置 // 数据设置
this.setData({ this.setData({
address: null, address: null,
address_id: null, address_id: null,
site_model: e.currentTarget.dataset.value || 0, site_model: value,
}); });
// 删除地址缓存 // 删除地址缓存
...@@ -301,5 +304,6 @@ Page({ ...@@ -301,5 +304,6 @@ Page({
// 数据初始化 // 数据初始化
this.init(); this.init();
}
}, },
}); });
...@@ -66,7 +66,7 @@ Page({ ...@@ -66,7 +66,7 @@ Page({
{ {
this.setData({ this.setData({
address: cache_address, address: cache_address,
address_id: cache_address.id || null, address_id: cache_address.id,
}); });
} }
} }
...@@ -289,11 +289,14 @@ Page({ ...@@ -289,11 +289,14 @@ Page({
// 销售+自提 模式选择事件 // 销售+自提 模式选择事件
buy_header_nav_event(e) { buy_header_nav_event(e) {
var value = e.currentTarget.dataset.value || 0;
if (value != this.data.site_model)
{
// 数据设置 // 数据设置
this.setData({ this.setData({
address: null, address: null,
address_id: null, address_id: null,
site_model: e.currentTarget.dataset.value || 0, site_model: value,
}); });
// 删除地址缓存 // 删除地址缓存
...@@ -301,5 +304,6 @@ Page({ ...@@ -301,5 +304,6 @@ Page({
// 数据初始化 // 数据初始化
this.init(); this.init();
}
}, },
}); });
...@@ -66,7 +66,7 @@ Page({ ...@@ -66,7 +66,7 @@ Page({
{ {
this.setData({ this.setData({
address: cache_address, address: cache_address,
address_id: cache_address.id || null, address_id: cache_address.id,
}); });
} }
} }
...@@ -289,11 +289,14 @@ Page({ ...@@ -289,11 +289,14 @@ Page({
// 销售+自提 模式选择事件 // 销售+自提 模式选择事件
buy_header_nav_event(e) { buy_header_nav_event(e) {
var value = e.currentTarget.dataset.value || 0;
if (value != this.data.site_model)
{
// 数据设置 // 数据设置
this.setData({ this.setData({
address: null, address: null,
address_id: null, address_id: null,
site_model: e.currentTarget.dataset.value || 0, site_model: value,
}); });
// 删除地址缓存 // 删除地址缓存
...@@ -301,5 +304,6 @@ Page({ ...@@ -301,5 +304,6 @@ Page({
// 数据初始化 // 数据初始化
this.init(); this.init();
}
}, },
}); });
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view wx:if="{{common_app_is_header_nav_fixed == 1}}" class="search-fixed-seat"></view> <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 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"> <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" /> <input type="text" confirm-type="search" placeholder="其实搜索很简单^_^!" class="wh-auto cr-888" bindconfirm="search_input_event" confirm-type="search" />
</view> </view>
</view> </view>
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
.search icon { .search icon {
position: absolute; position: absolute;
left: 15rpx; left: 15rpx;
top: 15rpx; top: 20rpx;
} }
.search input { .search input {
font-size: 28rpx; font-size: 28rpx;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册