Commit 5a9ec1a85fd51b5182a61bb76aa76e47bb77972a

Authored by vking
1 parent 74f3a2be

new 2.0

... ... @@ -2472,7 +2472,7 @@ button.icon.lg {
right: 0;
bottom: 0;
left: 0;
z-index: 10000;
z-index: 99999;
opacity: 0;
outline: 0;
text-align: center;
... ...
... ... @@ -8,7 +8,7 @@
border-radius: 0rpx 0rpx 40rpx 40rpx;
padding: 0rpx 40rpx 30rpx;
color: #666666;
margin-top: 20rpx;
padding-top: 20rpx;
}
.caixi-view{
... ...
... ... @@ -16,8 +16,14 @@ Component({
},
attached(){
this.init()
//this.init()
},
observers: {
'detail': function() {
this.init()
},
},
/**
* 组件的方法列表
*/
... ... @@ -42,7 +48,7 @@ Component({
detail.tableFirst=tableFirst
detail.tableSubInfo=tableSubInfo
this.setData({
detail:detail,
reserve:detail,
})
}
}
... ...
... ... @@ -3,30 +3,30 @@
<view class="view margin-lr-lg margin-top-sm solid radius padding padding-bottom-lg" style="box-shadow: 0px 0px 20rpx 0px #EEF0F2;">
<view class="view flex padding-bottom-sm solid-bottom">
<view class="view round margin-right-sm"
style="width: 44rpx;height: 44rpx; background-image: url('{{detail.seller.seller_image}}');">
style="width: 44rpx;height: 44rpx; background-image: url('{{reserve.seller.seller_image}}');">
</view>
<view class="view text-cut flex-treble">
<view class="view text-lg text-cut" style="margin-bottom: 16rpx;">{{detail.seller.sellername}}</view>
<view class="view text-df bg-white text-cut">{{detail.seller.map_address}}</view>
<view class="view text-lg text-cut" style="margin-bottom: 16rpx;">{{reserve.seller.sellername}}</view>
<view class="view text-df bg-white text-cut">{{reserve.seller.map_address}}</view>
</view>
<view class="view margin-left-sm text-blue text-lg" style="min-width: 100rpx;">
{{detail.getStatusStr}}
{{reserve.getStatusStr}}
</view>
</view>
<view class="view margin-top-sm">
<view class="view flex margin-bottom-sm align-center">
<view class="view flex-sub bg-white">预订时间</view>
<view class="view flex-treble text-bold" style="font-size: 36rpx;">
<view class="value" wx:if="{{detail.hasOnlineReserve || detail.hasUpdateDate}}">
<text wx:if="{{detail.ddate>0}}">{{util.unixtoTime(detail.ddate||'','MM月DD日')}} {{detail.soltName}}</text>
<view class="value" wx:if="{{reserve.hasOnlineReserve || reserve.hasUpdateDate}}">
<text wx:if="{{reserve.ddate>0}}">{{util.unixtoTime(reserve.ddate||'','MM月DD日')}} {{reserve.soltName}}</text>
</view>
<view class="value" wx:else="">{{detail.rdateStr}}</view>
<view class="value" wx:else="">{{reserve.rdateStr}}</view>
</view>
</view>
<view class="view flex align-center">
<view class="view flex-sub bg-white" style="min-width: 140rpx;">包间类型</view>
<view class="view flex-treble text-bold text-cut" style="font-size: 36rpx;">
{{detail.tableFirst||util.getRoomName(detail.room_demand)}}
{{reserve.tableFirst||util.getRoomName(reserve.room_demand)}}
</view>
</view>
</view>
... ...
... ... @@ -16,7 +16,12 @@ Component({
},
attached(){
this.initSeller()
//this.initSeller()
},
observers: {
'seller': function() {
this.initSeller()
}
},
/**
* 组件的方法列表
... ... @@ -33,7 +38,7 @@ Component({
seller.cateStr=seller.cateStr.join('/')
}
this.setData({
seller:seller,
sellerx:seller,
})
},
reserve(e){
... ...
<!--components/2.0/seller/card.wxml-->
<wxs src="../../../utils/util.wxs" module="util" />
<view class="view seller padding-sm padding-bottom-xs margin-sm {{activeSellerID==seller.id?'active':''}}">
<view class="view seller padding-sm padding-bottom-xs margin-sm {{activeSellerID==sellerx.id?'active':''}}">
<view class="view flex avatar-block">
<view class="view avatar">
<image src="{{seller.seller_image?seller.seller_image+'?imageView2/2/w/320/interlace/0/q/100':'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png'}}" class="avatar-image" mode="aspectFill" lazy-load></image>
<view class="avatar-txt text-white text-xs text-center text-cut" wx:if="{{seller.brand.name}}">{{seller.brand.name}}</view>
<image src="{{sellerx.seller_image?sellerx.seller_image+'?imageView2/2/w/320/interlace/0/q/100':'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png'}}" class="avatar-image" mode="aspectFill" lazy-load></image>
<view class="avatar-txt text-white text-xs text-center text-cut" wx:if="{{sellerx.brand.name}}">{{sellerx.brand.name}}</view>
</view>
<view class="view detail margin-left-sm flex-treble margin-top-sm text-cut">
<view class="view flex align-center justify-between" style="height: 52rpx;">
<view class="view title text-bold text-cut margin-right-sm">{{seller.sellername}}</view>
<view class="view text-gray" style="font-size: 26rpx;">{{util.distance(seller.distance||seller.distance_centre)}}</view>
<view class="view title text-bold text-cut margin-right-sm">{{sellerx.sellername}}</view>
<view class="view text-gray" style="font-size: 26rpx;">{{util.distance(sellerx.distance||sellerx.distance_centre)}}</view>
</view>
<view class="view flex align-center justify-between text-gray margin-top-xs" style="height: 36rpx;">
<view class="view caixi text-cut">
<view class="view text-cut">{{seller.cateStr}}</view>
<view class="view text-cut">{{sellerx.cateStr}}</view>
</view>
<view class="view renjun flex margin-left-lg align-center" wx:if="{{seller.average>0}}">
<view class="view renjun flex margin-left-lg align-center" wx:if="{{sellerx.average>0}}">
<view class="text-22">¥</view>
<view class="text-26" style="margin: 0 4rpx;">{{seller.average}}</view>
<view class="text-26" style="margin: 0 4rpx;">{{sellerx.average}}</view>
<view class="text-22">/人</view>
</view>
</view>
<view class="view flex align-center margin-top-xs active" style="height: 36rpx;">
<block wx:for="{{seller.activity}}" wx:key="selleractivitykey" wx:if="{{index<3}}">
<block wx:for="{{sellerx.activity}}" wx:key="selleractivitykey" wx:if="{{index<3}}">
<view class="cu-tag line-yellow view">
<text class="text-orange">{{(item.type==2?'满赠':item.title)}}</text>
</view>
... ... @@ -32,7 +32,7 @@
</view>
<view class="view flex align-center justify-between margin-top-sm reserve-view" catchtap="catchtap">
<view class="view rooms flex-treble flex" style="overflow-x: auto">
<block wx:for="{{seller.class}}" wx:key="seclass">
<block wx:for="{{sellerx.class}}" wx:key="seclass">
<view
bindtap="reserve" data-cid="{{item.id}}" data-cname="{{item.name}}"
class="cu-tag round line-blue text-blue view">{{item.name}}</view>
... ...
... ... @@ -24,6 +24,7 @@ Page({
placeholder:'您好,几位,什么时候',
search_placeholder:"搜索餐厅/位置,快速订包间",
hasLoading:true,
height:1000,
},
/**
... ... @@ -41,6 +42,14 @@ Page({
* &keyword=
* &filterParams={"consumeStr":"¥200-300","min":"200","max":"300","active":"200,300"}
*/
wx.getSystemInfo({
success:res=>{
console.log('wx.getSystemInfo',res)
this.setData({
height:res.windowHeight-80
})
},
})
this.filterParams=null
if(options.filterParams){
this.filterParams=JSON.parse(options.filterParams)
... ... @@ -170,6 +179,9 @@ Page({
hasGetSellerEnd:false,
hasCleanSuggestion:false,
async getList(){
this.setData({
hasLoading:true,
})
let mapParam=this.options
this.offset=1 //page
this.size=20 //page size
... ... @@ -228,51 +240,28 @@ Page({
}
}
if(this.data.multiIndex[0]>0){
this.param.cuisine=await DA.getCatesID(this.data.multiIndex[0]-1);
this.hasFilterData=false
if(this.filterGroupData.tags){
this.param.tags = this.filterGroupData.tags;
this.hasFilterData=true
}
let tags=[];
this.data.tags.forEach(t=>{
if(t.active){
tags.push(t.id)
}
})
if(tags.length>0){
this.param.tags=tags;
if (this.filterGroupData.cuisine) {
this.param.cuisine = this.filterGroupData.cuisine;
this.hasFilterData=true
}
let placeholder='您好,几位,什么时候';
if(this.findSellerData){
console.log(this.findSellerData)
this.param=Object.assign(this.param,this.findSellerData.paramObj)
//4位 今天 午餐
let sp=this.findSellerData.params
if(sp.pnum.val>30){
placeholder = '30 位以上 '
}else{
placeholder = sp.pnum.val+' 位 '
}
placeholder += util.unixtoTime(sp.date.val,' `DAY/MM-DD` ')
if(sp.dur){
placeholder+=' '+['','早餐','午餐','晚餐','夜宵'][sp.dur.val]
}
}
this.setData({
placeholder:placeholder,
})
if(this.filterParams){//人均过滤
let filterParams=this.filterParams.min+','+this.filterParams.max
if(this.filterParams.min==this.filterParams.max && this.filterParams.min==300){
filterParams=this.filterParams.min+','+parseInt(new Date()/1000)
}
this.param.average=filterParams
if(this.filterGroupData.average){
this.param.average = this.filterGroupData.average;
this.hasFilterData=true
}
App.Customer.SellerLists(this.param).then(res=>{
this.setData({
rsl:[],
hasMore:res.data.length==this.size,
sellers:this.sellerFormat(res.data),
hasLoading:false,
hasDisabled:this.getHasDisabled(res.data.length>0,this.data.multiIndex[0]>0 || tags.length>0 || this.findSellerData)
//hasDisabled:this.getHasDisabled(res.data.length>0,this.data.multiIndex[0]>0 || tags.length>0 || this.findSellerData)
hasFilterData:this.hasFilterData,
})
this.hasGetSellerEnd=true
this.triggerEvent('event',{type:'getListEnd',total:res.data.length})
... ... @@ -503,6 +492,22 @@ Page({
)
}
},
debounceTimer:null,
debounce(func,wait){
if(this.debounceTimer){
clearTimeout(this.debounceTimer)
}
this.debounceTimer=setTimeout(()=>{
this.debounceTimer=null;
func()
},wait);
},
filterGroupData:{},
filterGroupEvent(e){
console.log('filterGroupEvent',e.detail)
this.filterGroupData=e.detail
this.debounce(this.getList,500)
},
sellerCardEvent(e){
if(e.detail.type=='phone'){
this.selectComponent('#as').show(e.detail.seller);
... ...
<!--pages/reserve/indexList.wxml-->
<nav>周到安排</nav>
<view class="view content">
<view class="searchAddrView searchKeyword" bindtap="gotoSearch">
<view class="view content" style="height: calc(100vh - 65px);">
<view class="searchAddrView searchKeyword bg-white" bindtap="gotoSearch">
<view class="searchAddr flex-ll">
<image class="icon" src="http://nosqn.colorcun.com/custom/lite-online/image/search26.png"></image>
<input style="width: 100%;" placeholder="{{search_placeholder}}"
... ... @@ -21,32 +21,11 @@
</view>
</block>
<block wx:elif="{{sellers.length<1}}">
<view class="view flex flex-direction justify-center align-center empty-box margin-sm" wx:if="{{!hasSellers}}">
<view class="view text-lg">该地区没有可提供服务的餐厅</view>
<view class="view" style="margin-top: 16rpx;">您可以切换到其他城市看看</view>
<view style="margin-top: 80rpx;"
bindtap="setLoacl" data-val="39.684670,118.176300"
class="cu-btn round view text-def text-white bg-blue-blue">去唐山市</view>
</view>
<view class="view flex flex-direction justify-center align-center empty-box margin-sm" wx:elif="{{hasFilterData}}">
<view class="view text-lg">未找到符合要求的餐厅</view>
<view class="view" style="margin-top: 16rpx;">修改或减少条件,获得更多餐厅</view>
<chatbot>
<view style="margin-top: 80rpx;"
bindtap="setLoacl" data-val="39.684670,118.176300"
class="cu-btn round view text-def text-white bg-blue-blue">人工抢订</view>
</chatbot>
</view>
<view class="view flex flex-direction justify-center align-center empty-box empty-box-move margin-sm"
wx:else="">
<view class="view flex text-df tips align-center text-orange">
<view class="view icon"></view>
<view class="view">往任意方向拖动地图,可查找不同范围的餐厅</view>
</view>
<view class="view text-lg">地图显示范围无餐厅</view>
<view style="margin-top: 80rpx;"
bindtap="reduceMapScale" data-val="39.684670,118.176300"
class="cu-btn round view text-def text-white bg-blue-blue">扩大搜索范围</view>
<view class="view flex flex-direction justify-center align-center empty-box margin-sm">
<image class="margin-top"
src="http://nosqn.colorcun.com/2.0/home%20%2818%29.png" style="width: 520rpx; height: 384rpx;"></image>
<view class="view margin-top-lg text-df">抱歉,没有找到符合的内容</view>
<view class="view margin-top-xs text-df">试试搜搜别的</view>
</view>
</block>
<block wx:else="">
... ...
/* pages/reserve/indexList.wxss */
@import "/colorui/main.wxss";
.content{
overflow: hidden;
}
.searchAddrView{
position: relative;
z-index: 99998;
}
.header{
height: 81rpx;
position: fixed;
... ... @@ -112,7 +119,6 @@
width: 100%;
height: 70rpx;
background-color: #ffffff;
z-index: 9;
}
.searchAddr {
width: 90%;
... ...