Commit b364ea7a0e3335169c800259d1b3c74bb2c65e64

Authored by vking
1 parent 0c145bbe

data is 0

... ... @@ -49,6 +49,7 @@ Page({
{id:3,name:'超大包间'},
],
listMoreCount:0,
hasSearchLimit:false,
},
hasClickMoveToLocation:false,//点击回到我的位置
hasSellerConcat:hasSellerConcat,
... ... @@ -537,7 +538,8 @@ Page({
this.sellersNow=now_sid;
let obj={
hasSellers:now_sid.length>0,
hasGetSellersEnd:true
hasGetSellersEnd:true,
hasSearchLimit:tags.length>0 || this.data.multiIndex[0]>0
}
if(this.hasSellerConcat){
obj.markers=this.data.markers.concat(markers);
... ... @@ -689,7 +691,7 @@ Page({
})
},
a2lshow(e){
console.log('a2lshow',e)
//console.log('a2lshow',e)
let ds=this.selectComponent('#ds');
if(!ds){
return setTimeout(()=>{
... ... @@ -721,6 +723,7 @@ Page({
return mks;
},
tagsChange(e){
if(this.data.listMoreCount<1 && !this.data.hasSearchLimit) return
let id=util.attr(e,'id');
let tags=this.data.tags;
let activeNum=0;
... ... @@ -758,6 +761,7 @@ Page({
})
},
caixiShow(){
if(this.data.listMoreCount<1 && !this.data.hasSearchLimit) return
this.selectComponent('#caixi').show();
},
listEvent(e){
... ... @@ -785,4 +789,20 @@ Page({
},'./indexList')
});
},
setTSLocal(){
let map=this.data.map;
map.latitude=def_latitude
map.longitude=def_longitude
map.scale=mapScale
this.sellersIds=[]
this.sellers=[]
let sdobj={
map: map,
hasGetSellersEnd:false,
}
if(!this.hasSellerConcat){
sdobj.markers=[]
}
this.setData(sdobj)
},
})
\ No newline at end of file
... ...
... ... @@ -31,13 +31,13 @@
</formids>
</view>
<view class="seller-view">
<cover-view class="flex-vc transverse-view-top" bindtap="listShow">
<cover-view class="flex-vc transverse-view-top" bindtap="listShow" wx:if="{{hasGetSellersEnd && listMoreCount>0}}">
<cover-view class="line"></cover-view>
<cover-view class="text">
<cover-view wx:if="{{hasGetSellersEnd}}">{{hasSellers?'查看其它':'已扩大范围为你找到'}}{{listMoreCount}}家餐厅</cover-view>
<cover-view>{{hasSellers?'查看其它':'已扩大范围为你找到'}}{{listMoreCount}}家餐厅</cover-view>
</cover-view>
</cover-view>
<view class="transverse-search flex-ll">
<view class="transverse-search flex-ll {{(listMoreCount<1 && !hasSearchLimit)?'disabled':''}}">
<view
bindtap="caixiShow"
class="tags {{multiIndex[0]>0?'active':''}}"
... ... @@ -87,14 +87,25 @@
</swiper>
<view class="empty-txt flex-vc">
<view class="seller" wx:if="{{hasGetSellersEnd}}">
<view class="empty" bindtap="listShow">
<view class="info">
<view class="empty">
<view class="info" wx:if="{{listMoreCount>0}}" bindtap="listShow">
<view class="info-msg Semibold">已扩大范围为你找到餐厅</view>
<view class="info-button flex-lr">
<view>去挑选</view>
<view class="info-button-gt"></view>
</view>
</view>
<view class="info" wx:elif="{{hasSearchLimit}}">
<view class="info-msg Semibold">未找到符合要求的餐厅</view>
<view class="info-txt">修改或减少条件,获取更多餐厅</view>
</view>
<view class="info" wx:else="hasSearchLimit" bindtap="setTSLocal">
<view class="info-msg Semibold">你可以切换到其他城市看看</view>
<view class="info-button full flex-lr">
<view>唐山市</view>
<view class="info-button-gt"></view>
</view>
</view>
</view>
</view>
</view>
... ...
... ... @@ -111,10 +111,15 @@ page{
height: 16rpx;
min-width:12rpx;
}
.disabled .tags{
color: #999;
}
.tags.active .picker .more{
background-image: url("http://qn.colorcun.com/reserve/images/%E8%8F%9C%E7%B3%BB%E9%80%89%E4%B8%AD.png");
}
.disabled .picker .more{
background-image: url("http://qn.colorcun.com/custom/lite-yd/image/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20190925174046.png");
}
.searchAddr {
margin-left: 15rpx;
width: 400rpx;
... ... @@ -198,8 +203,9 @@ page{
padding: 0 20rpx;
color: #F05522;
font-size: 28rpx;
width: 106rpx;
max-width: 106rpx;
width: 146rpx;
max-width: 146rpx;
box-sizing: border-box;
}
.info-button-gt{
background-image: url("http://qn.colorcun.com/reserve/images/gt-cheng.png");
... ... @@ -208,7 +214,13 @@ page{
height: 20rpx;
}
.info-button.full{
background-color: #F05522;
color:#fefefe;
}
.info-button.full .info-button-gt{
background-image: url("http://qn.colorcun.com/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20190925175650.png");
}
.transverse-search .tags{
height: 50rpx;
line-height: 50rpx;
... ...
... ... @@ -19,6 +19,7 @@ Page({
],
markers:[],
hasMore:true,
hasDisabled:true,
},
/**
... ... @@ -133,10 +134,21 @@ Page({
this.setData({
hasMore:res.data.length==this.size,
markers:this.sellerFormat(res.data),
hasDisabled:this.getHasDisabled(res.data.length>0,this.data.multiIndex[0]>0 || tags.length>0)
})
this.triggerEvent('event',{type:'getListEnd',total:res.data.length})
})
},
/**
* @param hasLimit 是否有搜索条件
* @returns {boolean}
*/
getHasDisabled(hasData,hasLimit){
if(this.offset==1 && !hasLimit && !hasData) {
return true
}
return false
},
getListMore(){
this.param.offset+=1;
let markers=this.data.markers;
... ... @@ -148,6 +160,7 @@ Page({
})
},
caixiShow(){
if(this.data.hasDisabled) return
this.selectComponent('#caixi').show();
},
caixiActive(e){
... ... @@ -173,6 +186,7 @@ Page({
setTimeout(()=>{this.getList();},0)
},
tagsChange(e){
if(this.data.hasDisabled) return
let id=util.attr(e,'id');
let tags=this.data.tags;
let activeNum=0;
... ...
<!--pages/reserve/indexList.wxml-->
<nav>周到安排</nav>
<view class="header">
<view class="transverse-search flex-ll">
<view class="transverse-search flex-ll {{hasDisabled?'disabled':''}}">
<view
bindtap="caixiShow"
class="tags {{multiIndex[0]>0?'active':''}}"
... ... @@ -25,21 +25,29 @@
<view class="flex-vc empty" wx:if="{{markers.length<1}}">
<block wx:if="{{!hasFirstShow}}">
<image src="http://qn.colorcun.com/custom/lite-online/image/follow-empty.png"></image>
<view>附近未找到任何餐厅哦</view>
<block wx:if="{{hasDisabled}}">
<view>该地区没有可供预订的餐厅,努力开通中</view>
</block>
<block wx:else="">
<view class="empry-info1">未找到符合要求的餐厅</view>
<view class="empry-info2">修改或减少条件,获取更多餐厅</view>
</block>
</block>
</view>
<view class="follow" wx:else="">
<view class="seller" wx:for="{{markers}}" wx:key="sellers.key"
bindtap="gotoDetail" data-sid="{{item.id}}">
<sb-tr seller="{{item}}"
hasActivityTags="{{false}}"
hasActivityShort="{{true}}"
hasBrand="true" hasActivityTese="true"
hasSlogan="{{false}}"
sellerStyle="noborder noshadow noradius"></sb-tr>
<block wx:else="">
<view class="follow" >
<view class="seller" wx:for="{{markers}}" wx:key="sellers.key"
bindtap="gotoDetail" data-sid="{{item.id}}">
<sb-tr seller="{{item}}"
hasActivityTags="{{false}}"
hasActivityShort="{{true}}"
hasBrand="true" hasActivityTese="true"
hasSlogan="{{false}}"
sellerStyle="noborder noshadow noradius"></sb-tr>
</view>
</view>
<hr class="flex-vc nomore" wx:if="{{!hasMore}}" bgColor="#f5f5f5">我是有底线的</hr>
</view>
<hr class="flex-vc nomore" wx:if="{{!hasMore}}" bgColor="#ffffff">我是有底线的</hr>
</block>
</view>
<caixi multiArray="{{multiArray}}" multiIndex="{{multiIndex}}"
bindactive="caixiActive" id="caixi"
... ...
... ... @@ -47,12 +47,14 @@
height: 16rpx;
min-width:12rpx;
}
.disabled .tags{
color: #999;
}
.tags.active .picker .more{
background-image: url("http://qn.colorcun.com/reserve/images/%E8%8F%9C%E7%B3%BB%E9%80%89%E4%B8%AD.png");
}
page{
background-color: #F5F5F5;
.disabled .picker .more{
background-image: url("http://qn.colorcun.com/custom/lite-yd/image/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20190925174046.png");
}
.pages{
width: 100%;
... ... @@ -62,22 +64,24 @@ page{
}
.follow {
padding-top: 0;
padding-bottom: 40rpx;
padding-bottom: 10rpx;
}
.follow .seller{
background-color: #ffffff;
overflow: hidden;
margin: 0 0 20rpx;
border-bottom: 20rpx solid #f5f5f5;
}
.follow .seller:last-child{
border-bottom: 20rpx solid #ffffff;
}
.nomore{
color: #999;
font-size: 28rpx;
width: calc(100% - 36rpx);
margin: 40rpx auto 0;
margin: 0rpx auto 40rpx;
}
.hr{
height: 2rpx;
background-color: #F5F5F5;
width: 90%;
margin: 19rpx auto 0;
}
... ... @@ -89,4 +93,7 @@ page{
.empty view{
font-size: 28rpx;
margin-top: 86rpx;
}
.empty view.empry-info2{
margin-top: 20rpx;
}
\ No newline at end of file
... ...
... ... @@ -443,7 +443,7 @@
"id": 52,
"name": "pages/reserve/indexList",
"pathName": "pages/reserve/indexList",
"query": "lat=34.21719&lng=108.89155&map={\"errMsg\":\"getMapRegion:ok\",\"southwest\":{\"longitude\":108.87545674591064,\"latitude\":35.204520114013846},\"northeast\":{\"longitude\":108.90764325408935,\"latitude\":35.229857981005225},\"scale\":15}&multiIndex=1&tags=",
"query": "lat=34.216529&lng=108.891677&map={\"errMsg\":\"getMapRegion:ok\",\"southwest\":{\"longitude\":108.85949049182128,\"latitude\":34.18927020234597},\"northeast\":{\"longitude\":108.9238635081787,\"latitude\":34.24377898163213},\"scale\":14}&multiIndex=0&tags=1,2",
"scene": null
},
{
... ...