Showing
5 changed files
with
27 additions
and
12 deletions
| @@ -23,7 +23,9 @@ Component({ | @@ -23,7 +23,9 @@ Component({ | ||
| 23 | created: function () { | 23 | created: function () { |
| 24 | // 在组件实例进入页面节点树时执行 | 24 | // 在组件实例进入页面节点树时执行 |
| 25 | this.type='dur' | 25 | this.type='dur' |
| 26 | - this.autoChecked()//自动选中 | 26 | + setTimeout(()=>{ |
| 27 | + this.autoChecked()//自动选中 | ||
| 28 | + },0) | ||
| 27 | }, | 29 | }, |
| 28 | 30 | ||
| 29 | /** | 31 | /** |
| @@ -31,6 +33,8 @@ Component({ | @@ -31,6 +33,8 @@ Component({ | ||
| 31 | */ | 33 | */ |
| 32 | methods: { | 34 | methods: { |
| 33 | autoChecked(){ | 35 | autoChecked(){ |
| 36 | + if(this.data.ckdata) return; | ||
| 37 | + //console.log('findSellerData',this.data.ckdata) | ||
| 34 | let now=parseInt(new Date()/1000); | 38 | let now=parseInt(new Date()/1000); |
| 35 | let nowHHII=util.unixtoTime(now,'HH:II') | 39 | let nowHHII=util.unixtoTime(now,'HH:II') |
| 36 | let activeIndex=0 | 40 | let activeIndex=0 |
| @@ -11,7 +11,7 @@ Component({ | @@ -11,7 +11,7 @@ Component({ | ||
| 11 | }, | 11 | }, |
| 12 | findSellerData:{ | 12 | findSellerData:{ |
| 13 | type:Object, | 13 | type:Object, |
| 14 | - value:{}, | 14 | + value:null, |
| 15 | } | 15 | } |
| 16 | }, | 16 | }, |
| 17 | 17 | ||
| @@ -29,7 +29,9 @@ Component({ | @@ -29,7 +29,9 @@ Component({ | ||
| 29 | hidden:!this.data.hasPage | 29 | hidden:!this.data.hasPage |
| 30 | }) | 30 | }) |
| 31 | setTimeout(()=>{ | 31 | setTimeout(()=>{ |
| 32 | - this.submit() | 32 | + if(!this.data.findSellerData){ |
| 33 | + this.submit() | ||
| 34 | + } | ||
| 33 | },0) | 35 | },0) |
| 34 | }, | 36 | }, |
| 35 | observers: { | 37 | observers: { |
| @@ -68,14 +68,17 @@ Page({ | @@ -68,14 +68,17 @@ Page({ | ||
| 68 | if(options.city){ | 68 | if(options.city){ |
| 69 | this.city=JSON.parse(options.city) | 69 | this.city=JSON.parse(options.city) |
| 70 | } | 70 | } |
| 71 | + this.findSellerData=null | ||
| 71 | if(options.hows){ | 72 | if(options.hows){ |
| 72 | - this.hows=JSON.parse(options.hows) | ||
| 73 | - let paramStr=this.hows.paramStr.split(" "); | 73 | + this.findSellerData=JSON.parse(options.hows) |
| 74 | + let paramStr=this.findSellerData.paramStr.split(" "); | ||
| 74 | this.setData({ | 75 | this.setData({ |
| 76 | + findSellerData:this.findSellerData, | ||
| 75 | headerHows:[ | 77 | headerHows:[ |
| 76 | paramStr[0].substr(0,6), | 78 | paramStr[0].substr(0,6), |
| 77 | paramStr[1]+' '+paramStr[2], | 79 | paramStr[1]+' '+paramStr[2], |
| 78 | ], | 80 | ], |
| 81 | + | ||
| 79 | }) | 82 | }) |
| 80 | } | 83 | } |
| 81 | this.options=options; | 84 | this.options=options; |
| @@ -223,7 +226,7 @@ Page({ | @@ -223,7 +226,7 @@ Page({ | ||
| 223 | code:this.city.code, | 226 | code:this.city.code, |
| 224 | pid:this.city.pid, | 227 | pid:this.city.pid, |
| 225 | keyword:this.options.keyword||'', | 228 | keyword:this.options.keyword||'', |
| 226 | - ...this.hows.paramObj, | 229 | + ...this.findSellerData.paramObj, |
| 227 | } | 230 | } |
| 228 | console.log('this.location',this.location) | 231 | console.log('this.location',this.location) |
| 229 | if(this.location){ | 232 | if(this.location){ |
| @@ -364,10 +367,15 @@ Page({ | @@ -364,10 +367,15 @@ Page({ | ||
| 364 | this.selectComponent('#search-how').show(); | 367 | this.selectComponent('#search-how').show(); |
| 365 | }, | 368 | }, |
| 366 | howEvent(e){ | 369 | howEvent(e){ |
| 367 | - this.eventChannel.emit('findSellerData',e.detail) | 370 | + //this.eventChannel.emit('findSellerData',e.detail) |
| 368 | this.findSellerData=e.detail | 371 | this.findSellerData=e.detail |
| 372 | + let paramStr=this.findSellerData.paramStr.split(" "); | ||
| 369 | this.setData({ | 373 | this.setData({ |
| 370 | - findSellerData:e.detail | 374 | + findSellerData:e.detail, |
| 375 | + headerHows:[ | ||
| 376 | + paramStr[0].substr(0,6), | ||
| 377 | + paramStr[1]+' '+paramStr[2], | ||
| 378 | + ], | ||
| 371 | }) | 379 | }) |
| 372 | setTimeout(()=>{this.getList();},0) | 380 | setTimeout(()=>{this.getList();},0) |
| 373 | this.selectComponent('#search-how').hide(); | 381 | this.selectComponent('#search-how').hide(); |
| @@ -513,7 +521,7 @@ Page({ | @@ -513,7 +521,7 @@ Page({ | ||
| 513 | url:util.http_build_query({ | 521 | url:util.http_build_query({ |
| 514 | filter:this.filterParams?JSON.stringify(this.filterParams):null, | 522 | filter:this.filterParams?JSON.stringify(this.filterParams):null, |
| 515 | city:JSON.stringify(this.city), | 523 | city:JSON.stringify(this.city), |
| 516 | - hows:JSON.stringify(this.hows), | 524 | + hows:JSON.stringify(this.findSellerData), |
| 517 | },'/pages/reserve/searchKeyword') | 525 | },'/pages/reserve/searchKeyword') |
| 518 | }) | 526 | }) |
| 519 | }, | 527 | }, |
| @@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
| 7 | "nav":"/components/nav/nav", | 7 | "nav":"/components/nav/nav", |
| 8 | "sb-tr":"/components/reserve/seller-box-transverse/seller-box", | 8 | "sb-tr":"/components/reserve/seller-box-transverse/seller-box", |
| 9 | "caixi":"/components/reserve/caixi", | 9 | "caixi":"/components/reserve/caixi", |
| 10 | - "search-how":"/components/reserve/search/how/index", | 10 | + "search-how":"/components/2.0/filter/how/index", |
| 11 | "hr":"/components/hr", | 11 | "hr":"/components/hr", |
| 12 | "filter":"/components/reserve/search/filter", | 12 | "filter":"/components/reserve/search/filter", |
| 13 | 13 |
| 1 | <!--pages/reserve/indexList.wxml--> | 1 | <!--pages/reserve/indexList.wxml--> |
| 2 | <nav> | 2 | <nav> |
| 3 | <view class="view header flex align-center justify-center text-blue" style="right:{{right}}px;" wx:if="{{right>0}}"> | 3 | <view class="view header flex align-center justify-center text-blue" style="right:{{right}}px;" wx:if="{{right>0}}"> |
| 4 | - <view class="view flex flex-direction" style="width: 174rpx;"> | 4 | + <view class="view flex flex-direction" style="width: 174rpx;" bindtap="dispalySearchHow"> |
| 5 | <view class="view txt-26-h">{{headerHows[0]}}</view> | 5 | <view class="view txt-26-h">{{headerHows[0]}}</view> |
| 6 | <view class="view txt-26-h">{{headerHows[1]}}</view> | 6 | <view class="view txt-26-h">{{headerHows[1]}}</view> |
| 7 | </view> | 7 | </view> |
| @@ -63,4 +63,5 @@ | @@ -63,4 +63,5 @@ | ||
| 63 | </block> | 63 | </block> |
| 64 | </view> | 64 | </view> |
| 65 | <getpos bindpos="onpos" id="getpos" hasAllowLoading="{{false}}"></getpos> | 65 | <getpos bindpos="onpos" id="getpos" hasAllowLoading="{{false}}"></getpos> |
| 66 | -<as-phone id="as"></as-phone> | ||
| 66 | +<as-phone id="as"></as-phone> | ||
| 67 | +<search-how id="search-how" findSellerData="{{findSellerData}}" bindevent="howEvent"></search-how> |
-
Please register or login to post a comment