Commit a417957fd69a9230708e50e8a92a0d4d57e6a0a0

Authored by vking
1 parent b4c73888

search

... ... @@ -23,7 +23,9 @@ Component({
created: function () {
// 在组件实例进入页面节点树时执行
this.type='dur'
this.autoChecked()//自动选中
setTimeout(()=>{
this.autoChecked()//自动选中
},0)
},
/**
... ... @@ -31,6 +33,8 @@ Component({
*/
methods: {
autoChecked(){
if(this.data.ckdata) return;
//console.log('findSellerData',this.data.ckdata)
let now=parseInt(new Date()/1000);
let nowHHII=util.unixtoTime(now,'HH:II')
let activeIndex=0
... ...
... ... @@ -11,7 +11,7 @@ Component({
},
findSellerData:{
type:Object,
value:{},
value:null,
}
},
... ... @@ -29,7 +29,9 @@ Component({
hidden:!this.data.hasPage
})
setTimeout(()=>{
this.submit()
if(!this.data.findSellerData){
this.submit()
}
},0)
},
observers: {
... ...
... ... @@ -68,14 +68,17 @@ Page({
if(options.city){
this.city=JSON.parse(options.city)
}
this.findSellerData=null
if(options.hows){
this.hows=JSON.parse(options.hows)
let paramStr=this.hows.paramStr.split(" ");
this.findSellerData=JSON.parse(options.hows)
let paramStr=this.findSellerData.paramStr.split(" ");
this.setData({
findSellerData:this.findSellerData,
headerHows:[
paramStr[0].substr(0,6),
paramStr[1]+' '+paramStr[2],
],
})
}
this.options=options;
... ... @@ -223,7 +226,7 @@ Page({
code:this.city.code,
pid:this.city.pid,
keyword:this.options.keyword||'',
...this.hows.paramObj,
...this.findSellerData.paramObj,
}
console.log('this.location',this.location)
if(this.location){
... ... @@ -364,10 +367,15 @@ Page({
this.selectComponent('#search-how').show();
},
howEvent(e){
this.eventChannel.emit('findSellerData',e.detail)
//this.eventChannel.emit('findSellerData',e.detail)
this.findSellerData=e.detail
let paramStr=this.findSellerData.paramStr.split(" ");
this.setData({
findSellerData:e.detail
findSellerData:e.detail,
headerHows:[
paramStr[0].substr(0,6),
paramStr[1]+' '+paramStr[2],
],
})
setTimeout(()=>{this.getList();},0)
this.selectComponent('#search-how').hide();
... ... @@ -513,7 +521,7 @@ Page({
url:util.http_build_query({
filter:this.filterParams?JSON.stringify(this.filterParams):null,
city:JSON.stringify(this.city),
hows:JSON.stringify(this.hows),
hows:JSON.stringify(this.findSellerData),
},'/pages/reserve/searchKeyword')
})
},
... ...
... ... @@ -7,7 +7,7 @@
"nav":"/components/nav/nav",
"sb-tr":"/components/reserve/seller-box-transverse/seller-box",
"caixi":"/components/reserve/caixi",
"search-how":"/components/reserve/search/how/index",
"search-how":"/components/2.0/filter/how/index",
"hr":"/components/hr",
"filter":"/components/reserve/search/filter",
... ...
<!--pages/reserve/indexList.wxml-->
<nav>
<view class="view header flex align-center justify-center text-blue" style="right:{{right}}px;" wx:if="{{right>0}}">
<view class="view flex flex-direction" style="width: 174rpx;">
<view class="view flex flex-direction" style="width: 174rpx;" bindtap="dispalySearchHow">
<view class="view txt-26-h">{{headerHows[0]}}</view>
<view class="view txt-26-h">{{headerHows[1]}}</view>
</view>
... ... @@ -63,4 +63,5 @@
</block>
</view>
<getpos bindpos="onpos" id="getpos" hasAllowLoading="{{false}}"></getpos>
<as-phone id="as"></as-phone>
\ No newline at end of file
<as-phone id="as"></as-phone>
<search-how id="search-how" findSellerData="{{findSellerData}}" bindevent="howEvent"></search-how>
\ No newline at end of file
... ...