Commit b4c7388827f65a41000004eddc2d9b1067e7e432

Authored by vking
1 parent f9fbd27e

search

@@ -8,6 +8,7 @@ Component({ @@ -8,6 +8,7 @@ Component({
8 properties: { 8 properties: {
9 height:Number, 9 height:Number,
10 disabled:Boolean, 10 disabled:Boolean,
  11 + filterParams:Object,//人均过滤初始值
11 }, 12 },
12 13
13 /** 14 /**
@@ -37,6 +38,7 @@ Component({ @@ -37,6 +38,7 @@ Component({
37 this.setData({ 38 this.setData({
38 multiArray: [['全部菜系'].concat(await DA.getCates())] 39 multiArray: [['全部菜系'].concat(await DA.getCates())]
39 }) 40 })
  41 + this.filterParams= this.data.filterParams
40 }, 42 },
41 caixiActive(e) { 43 caixiActive(e) {
42 console.log('caixiActive', e); 44 console.log('caixiActive', e);
@@ -45,6 +45,8 @@ Page({ @@ -45,6 +45,8 @@ Page({
45 /** 45 /**
46 hasSuggestion=1&keyword=橡树湾&lat=39.662877&lng=118.130962&centre_pos=39.662877,118.130962&multiIndex=0&filter={"consumeStr":"¥200-300","min":"200","max":"300","active":"200,300"}&city={"code":"610100","pid":"610000","name":"西安市","status":"1","last_date":"1598949575"}&hows={"params":{"pnum":{"index":3,"val":4,"type":"pnum"},"date":{"index":0,"val":1606983211,"type":"date"},"dur":{"index":2,"val":3,"type":"dur"}},"paramObj":{"when_date":"2020-12-03","several":4,"daily":3},"paramStr":"12月03日(今天) 晚餐 4位"} 46 hasSuggestion=1&keyword=橡树湾&lat=39.662877&lng=118.130962&centre_pos=39.662877,118.130962&multiIndex=0&filter={"consumeStr":"¥200-300","min":"200","max":"300","active":"200,300"}&city={"code":"610100","pid":"610000","name":"西安市","status":"1","last_date":"1598949575"}&hows={"params":{"pnum":{"index":3,"val":4,"type":"pnum"},"date":{"index":0,"val":1606983211,"type":"date"},"dur":{"index":2,"val":3,"type":"dur"}},"paramObj":{"when_date":"2020-12-03","several":4,"daily":3},"paramStr":"12月03日(今天) 晚餐 4位"}
47 47
  48 + lat=39.65157&lng=118.15044&keyword=1&multiIndex=0&city={"code":"130200","pid":"130000","name":"唐山市","status":"1","last_date":"1598949575"}&hows={"params":{"pnum":{"index":5,"val":6,"type":"pnum"},"date":{"index":1,"val":1607399207,"type":"date"},"dur":{"index":2,"val":3,"type":"dur"}},"paramObj":{"when_date":"2020-12-08","several":6,"daily":3},"paramStr":"12月08日(明天) 晚餐 6位"}&filter={"consumeStr":"¥101-220","min":"101","max":"220","active":"101,220"}
  49 +
48 city={"code":"130200","pid":"130000","name":"唐山市","status":"1","last_date":"1598949575"}&hows={"params":{"pnum":{"index":3,"val":4,"type":"pnum"},"date":{"index":0,"val":1606984766,"type":"date"},"dur":{"index":2,"val":3,"type":"dur"}},"paramObj":{"when_date":"2020-12-03","several":4,"daily":3},"paramStr":"12月03日(今天) 晚餐 4位"} 50 city={"code":"130200","pid":"130000","name":"唐山市","status":"1","last_date":"1598949575"}&hows={"params":{"pnum":{"index":3,"val":4,"type":"pnum"},"date":{"index":0,"val":1606984766,"type":"date"},"dur":{"index":2,"val":3,"type":"dur"}},"paramObj":{"when_date":"2020-12-03","several":4,"daily":3},"paramStr":"12月03日(今天) 晚餐 4位"}
49 */ 51 */
50 wx.getSystemInfo({ 52 wx.getSystemInfo({
@@ -61,6 +63,7 @@ Page({ @@ -61,6 +63,7 @@ Page({
61 this.setData({ 63 this.setData({
62 filterParams:this.filterParams, 64 filterParams:this.filterParams,
63 }) 65 })
  66 + this.filterGroupData.average=this.filterParams.active
64 } 67 }
65 if(options.city){ 68 if(options.city){
66 this.city=JSON.parse(options.city) 69 this.city=JSON.parse(options.city)
@@ -85,9 +88,14 @@ Page({ @@ -85,9 +88,14 @@ Page({
85 } 88 }
86 this.setData({ 89 this.setData({
87 hasSuggestion:true, 90 hasSuggestion:true,
88 - suggestion:this.suggestion 91 + suggestion:this.suggestion,
  92 + keyword:this.options.keyword,
89 }) 93 })
90 delete this.options.keyword 94 delete this.options.keyword
  95 + }else if(this.options.keyword){
  96 + this.setData({
  97 + keyword:options.keyword,
  98 + })
91 } 99 }
92 let tags=[ 100 let tags=[
93 {id:1,name:'环境好'}, 101 {id:1,name:'环境好'},
@@ -247,9 +255,11 @@ Page({ @@ -247,9 +255,11 @@ Page({
247 }) 255 })
248 this.hasGetSellerEnd=true 256 this.hasGetSellerEnd=true
249 this.triggerEvent('event',{type:'getListEnd',total:res.data.length}) 257 this.triggerEvent('event',{type:'getListEnd',total:res.data.length})
  258 + /*
250 if(res.data.length==0 && this.offset==1 && this.location){ 259 if(res.data.length==0 && this.offset==1 && this.location){
251 - this.onpos({detail:this.location}) 260 + this.GetRecommendSellerList()
252 } 261 }
  262 + */
253 }) 263 })
254 }, 264 },
255 /** 265 /**
@@ -28,6 +28,7 @@ @@ -28,6 +28,7 @@
28 <view class="view content" style="height: calc(100vh - 65px);"> 28 <view class="view content" style="height: calc(100vh - 65px);">
29 <filter-group height="{{height}}" 29 <filter-group height="{{height}}"
30 id="filter-group" 30 id="filter-group"
  31 + filterParams="{{filterParams}}"
31 bindevent="filterGroupEvent" 32 bindevent="filterGroupEvent"
32 disabled="{{(sellers.length<1 && !hasFilterData) || hasLoading}}"></filter-group> 33 disabled="{{(sellers.length<1 && !hasFilterData) || hasLoading}}"></filter-group>
33 <block wx:if="{{hasLoading}}"> 34 <block wx:if="{{hasLoading}}">
@@ -223,6 +223,9 @@ Page({ @@ -223,6 +223,9 @@ Page({
223 lng:this.location.longitude, 223 lng:this.location.longitude,
224 keyword:this.inputVal, 224 keyword:this.inputVal,
225 multiIndex:0, 225 multiIndex:0,
  226 + city:this.options.city,
  227 + hows:this.options.hows,
  228 + filter:this.options.filter,
226 },'./indexList') 229 },'./indexList')
227 }) 230 })
228 }, 231 },
@@ -468,7 +468,7 @@ @@ -468,7 +468,7 @@
468 { 468 {
469 "name": "pages/reserve/indexList", 469 "name": "pages/reserve/indexList",
470 "pathName": "pages/reserve/indexList", 470 "pathName": "pages/reserve/indexList",
471 - "query": "city={\"code\":\"130200\",\"pid\":\"130000\",\"name\":\"唐山市\",\"status\":\"1\",\"last_date\":\"1598949575\"}&hows={\"params\":{\"pnum\":{\"index\":3,\"val\":4,\"type\":\"pnum\"},\"date\":{\"index\":0,\"val\":1606984766,\"type\":\"date\"},\"dur\":{\"index\":2,\"val\":3,\"type\":\"dur\"}},\"paramObj\":{\"when_date\":\"2020-12-03\",\"several\":4,\"daily\":3},\"paramStr\":\"12月03日(今天) 晚餐 4位\"}", 471 + "query": "lat=39.65157&lng=118.15044&keyword=1&multiIndex=0&city={\"code\":\"130200\",\"pid\":\"130000\",\"name\":\"唐山市\",\"status\":\"1\",\"last_date\":\"1598949575\"}&hows={\"params\":{\"pnum\":{\"index\":5,\"val\":6,\"type\":\"pnum\"},\"date\":{\"index\":1,\"val\":1607399207,\"type\":\"date\"},\"dur\":{\"index\":2,\"val\":3,\"type\":\"dur\"}},\"paramObj\":{\"when_date\":\"2020-12-08\",\"several\":6,\"daily\":3},\"paramStr\":\"12月08日(明天) 晚餐 6位\"}&filter={\"consumeStr\":\"¥101-220\",\"min\":\"101\",\"max\":\"220\",\"active\":\"101,220\"}",
472 "scene": null 472 "scene": null
473 }, 473 },
474 { 474 {