Commit cdd94f8d8ae80c3d25ec67f2261e243cc635e0b5

Authored by vking
1 parent 971a4c2c

search

... ... @@ -94,9 +94,10 @@ Page({
size:10,
hasMore:true,
GetCollectionSellerList(){
App.Customer.GetActivitySellerList({
lat:this.options.latitude,
lng:this.options.longitude,
this.city=JSON.parse(this.options.city)
App.Customer.GetActivitySellerListByFoods({
code:this.city.code,
pid:this.city.pid,
offset:this.offset,
size:this.size,
distance:50,
... ...
// pages/reserve/home.js
import App from '../../utils/api';
import util from '../../utils/util'
import PubSub from '../../utils/PubSub'
const {regeneratorRuntime} = global
... ... @@ -92,7 +93,16 @@ Page({
console.log('locationEvent',e.detail)
this.city=e.detail.city
this.setData({
location:e.detail.isAddr?e.detail.address:e.detail.city.name
location:e.detail.isAddr?e.detail.address:e.detail.city.name,
IsSetActivityByFoods:false,
})
App.Customer.IsSetActivityByFoods({
pid:this.city.pid,
code:this.city.code,
}).then(res=>{
this.setData({
IsSetActivityByFoods:res.data,
})
})
},
filterParams:null,
... ...
... ... @@ -35,6 +35,18 @@
查找包间
</view>
</view>
<view wx:if="{{IsSetActivityByFoods}}" class="margin-top-lg padding-lg" bindtap="goPath"
data-path="/pages/reserve/discount">
<view class="txt-40-h text-bold margin-bottom">精选特惠</view>
<view class="flex justify-center align-center">
<view class="view youhui-image image1" style=""></view>
<view class="margin-left-xs">
<view class="view youhui-image image2"></view>
<view class="view youhui-image image3 margin-top-xs"></view>
</view>
</view>
</view>
<view style="height: 150rpx;"></view>
<search-how id="search-how" findSellerData="{{findSellerData}}" bindevent="howEvent"></search-how>
<location id="location" bindevent="locationEvent"></location>
<view class="view filter-mask" hidden="{{!hasFilter}}">
... ...
... ... @@ -58,4 +58,68 @@
.filter{
position: relative;
margin-top: calc(100% + 30rpx);
}
.image1{
background-image: url("http://nosqn.colorcun.com/search/s%20%285%29.png");
width: 330rpx;
height: 346rpx;
}
.image2{
background-image: url("http://nosqn.colorcun.com/search/s%20%286%29.png");
width: 330rpx;
height: 168rpx;
}
.image3{
background-image: url("http://nosqn.colorcun.com/search/s%20%287%29.png");
width: 330rpx;
height: 168rpx;
}
.youhui-image{
position: relative;
}
.youhui-image:before{
position: absolute;
height: 50rpx;
font-size: 36rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #FFFFFF;
line-height: 50rpx;
top:20rpx;
left: 20rpx;
content: "";
display: block;
}
.youhui-image:after{
position: absolute;
height: 34rpx;
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #FFFFFF;
line-height: 34rpx;
top:70rpx;
left: 20rpx;
content: "";
display: block;
}
.image1:before{
content: "预订买单更优惠";
}
.image1:after{
content: "100+优质餐厅";
}
.image2:before{
content: "百万补贴来袭";
}
.image2:after{
content: "限时特惠";
}
.image3:before{
content: "超值套餐";
}
.image3:after{
content: "包间可用";
}
\ No newline at end of file
... ...
... ... @@ -517,6 +517,12 @@ export default {
//根据区域查询指定条件下的商家列表
'App.Customer.GetSellerListByFoods':null,
//用来检测找包间首页优惠板块是否显示
'App.Customer.IsSetActivityByFoods':null,
//根据地理位置获取相应的商家活动列表
'App.Customer.GetActivitySellerListByFoods':null,
//根据账单ID获取账单详情
'App.Foodset.GetFoodOrdersDetail':null,
... ...