Commit 5e1d778bbfbafa0f624faa4745913ef13c13705c

Authored by vking
1 parent 7ff8add7

search

... ... @@ -60,6 +60,7 @@ Component({
})
},
event(data){
data.position=this.position
this.triggerEvent('event',data)
util.cache('CACHE_LOCALTION_KEY',data)
},
... ...
... ... @@ -89,12 +89,28 @@ Page({
meLocation(){
this.selectComponent('#location').rePos({currentTarget:{dataset:{isAddr:true}}});
},
GetRecomList(){
App.Customer.GetRecomList({
pid:this.city.pid,
code:this.city.code,
lat:this.position.latitude,
lng:this.position.longitude,
offset:1,
size:50
}).then(res=>{
this.setData({
sellers:res.data,
})
})
},
locationEvent(e){
console.log('locationEvent',e.detail)
this.city=e.detail.city
this.position=e.detail.position
this.setData({
location:e.detail.isAddr?e.detail.address:e.detail.city.name,
IsSetActivityByFoods:false,
sellers:[],
})
App.Customer.IsSetActivityByFoods({
pid:this.city.pid,
... ... @@ -104,6 +120,7 @@ Page({
IsSetActivityByFoods:res.data,
})
})
this.GetRecomList()
},
filterParams:null,
displayFilter(){
... ...
... ... @@ -5,6 +5,7 @@
"usingComponents": {
"search-how":"/components/2.0/filter/how/index",
"location":"/components/2.0/filter/location",
"filter":"/components/2.0/filter/filter"
"filter":"/components/2.0/filter/filter",
"seller-card":"/components/2.0/seller/card"
}
}
\ No newline at end of file
... ...
... ... @@ -46,6 +46,17 @@
</view>
</view>
</view>
<view wx:if="{{sellers.length>0}}" class="margin-tb-lg" bindtap="goPath"
data-path="/pages/reserve/discount">
<view class="txt-40-h text-bold margin-bottom margin-lr-lg">为你推荐</view>
<view wx:for="{{sellers}}" wx:key="sellers" class="margin-lr-sm" >
<navigator url="/pages/reserve/detail?id={{item.id}}" hover-class="navigator-hover">
<seller-card class="seller-card" id="seller-{{item.id}}"
activeSellerID="{{activeSellerID}}"
seller="{{item}}" bindevent="sellerCardEvent" ></seller-card>
</navigator>
</view>
</view>
<view style="height: 150rpx;"></view>
<search-how id="search-how" findSellerData="{{findSellerData}}" bindevent="howEvent"></search-how>
<location id="location" bindevent="locationEvent"></location>
... ...
... ... @@ -523,6 +523,9 @@ export default {
//根据地理位置获取相应的商家活动列表
'App.Customer.GetActivitySellerListByFoods':null,
//根据code获取指定区域下面的推介的商家列表
'App.Customer.GetRecomList':null,
//根据账单ID获取账单详情
'App.Foodset.GetFoodOrdersDetail':null,
... ...