mirror of
https://gitee.com/zongzhige/shopxo.git
synced 2026-06-06 16:21:54 +08:00
小程序搜索优化
This commit is contained in:
@ -74,7 +74,7 @@ App({
|
||||
// 请求地址
|
||||
request_url: "{{request_url}}",
|
||||
request_url: 'http://shopxo.com/',
|
||||
// request_url: 'https://dev.shopxo.net/',
|
||||
request_url: 'https://dev.shopxo.net/',
|
||||
|
||||
// 基础信息
|
||||
application_title: "{{application_title}}",
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
{
|
||||
"pages": [
|
||||
"pages": ["pages/goods-search/goods-search",
|
||||
"pages/index/index",
|
||||
"pages/goods-category/goods-category",
|
||||
"pages/cart/cart",
|
||||
@ -8,7 +8,7 @@
|
||||
"pages/web-view/web-view",
|
||||
"pages/login/login",
|
||||
"pages/paytips/paytips",
|
||||
"pages/goods-search/goods-search",
|
||||
|
||||
"pages/goods-detail/goods-detail",
|
||||
"pages/goods-comment/goods-comment",
|
||||
"pages/user-address/user-address",
|
||||
|
||||
@ -230,10 +230,7 @@ Page({
|
||||
index++;
|
||||
}
|
||||
}
|
||||
if(app.get_length(temp) > 0)
|
||||
{
|
||||
post_data[data.map_fields_list[i]['form_key']] = JSON.stringify(temp);
|
||||
}
|
||||
post_data[data.map_fields_list[i]['form_key']] = (app.get_length(temp) > 0) ? JSON.stringify(temp) : '';
|
||||
}
|
||||
}
|
||||
|
||||
@ -323,6 +320,33 @@ Page({
|
||||
this.setData(data);
|
||||
}
|
||||
},
|
||||
|
||||
// 条件-清空
|
||||
map_remove_event(e) {
|
||||
var data = this.data;
|
||||
// 关键字
|
||||
data['post_data']['wd'] = '';
|
||||
|
||||
// 品牌、分类、价格、属性、规格
|
||||
for(var i in data.map_fields_list)
|
||||
{
|
||||
if((data[i] != null) != null && data[i].length > 0)
|
||||
{
|
||||
for(var k in data[i])
|
||||
{
|
||||
data[i][k]['active'] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 关闭条件弹层
|
||||
this.popup_form_event_close();
|
||||
|
||||
// 分页恢复1页、重新获取数据
|
||||
data['data_page'] = 1;
|
||||
this.setData(data);
|
||||
this.get_data_list(1);
|
||||
},
|
||||
|
||||
// 自定义分享
|
||||
onShareAppMessage() {
|
||||
|
||||
@ -44,6 +44,7 @@
|
||||
<text>筛选出</text>
|
||||
<text class="cr-main"> {{data_total}} </text>
|
||||
<text>条数据</text>
|
||||
<text class="map-remove-submit fr" bindtap="map_remove_event">清除</text>
|
||||
</view>
|
||||
|
||||
<!-- 搜索关键字 -->
|
||||
|
||||
@ -133,6 +133,10 @@
|
||||
bottom: 0;
|
||||
border-radius: 0;
|
||||
}
|
||||
.map-remove-submit {
|
||||
color: #e23f36;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/**
|
||||
* 品牌基础信息
|
||||
|
||||
Reference in New Issue
Block a user