Showing
7 changed files
with
104 additions
and
32 deletions
| @@ -49,6 +49,7 @@ Page({ | @@ -49,6 +49,7 @@ Page({ | ||
| 49 | {id:3,name:'超大包间'}, | 49 | {id:3,name:'超大包间'}, |
| 50 | ], | 50 | ], |
| 51 | listMoreCount:0, | 51 | listMoreCount:0, |
| 52 | + hasSearchLimit:false, | ||
| 52 | }, | 53 | }, |
| 53 | hasClickMoveToLocation:false,//点击回到我的位置 | 54 | hasClickMoveToLocation:false,//点击回到我的位置 |
| 54 | hasSellerConcat:hasSellerConcat, | 55 | hasSellerConcat:hasSellerConcat, |
| @@ -537,7 +538,8 @@ Page({ | @@ -537,7 +538,8 @@ Page({ | ||
| 537 | this.sellersNow=now_sid; | 538 | this.sellersNow=now_sid; |
| 538 | let obj={ | 539 | let obj={ |
| 539 | hasSellers:now_sid.length>0, | 540 | hasSellers:now_sid.length>0, |
| 540 | - hasGetSellersEnd:true | 541 | + hasGetSellersEnd:true, |
| 542 | + hasSearchLimit:tags.length>0 || this.data.multiIndex[0]>0 | ||
| 541 | } | 543 | } |
| 542 | if(this.hasSellerConcat){ | 544 | if(this.hasSellerConcat){ |
| 543 | obj.markers=this.data.markers.concat(markers); | 545 | obj.markers=this.data.markers.concat(markers); |
| @@ -689,7 +691,7 @@ Page({ | @@ -689,7 +691,7 @@ Page({ | ||
| 689 | }) | 691 | }) |
| 690 | }, | 692 | }, |
| 691 | a2lshow(e){ | 693 | a2lshow(e){ |
| 692 | - console.log('a2lshow',e) | 694 | + //console.log('a2lshow',e) |
| 693 | let ds=this.selectComponent('#ds'); | 695 | let ds=this.selectComponent('#ds'); |
| 694 | if(!ds){ | 696 | if(!ds){ |
| 695 | return setTimeout(()=>{ | 697 | return setTimeout(()=>{ |
| @@ -721,6 +723,7 @@ Page({ | @@ -721,6 +723,7 @@ Page({ | ||
| 721 | return mks; | 723 | return mks; |
| 722 | }, | 724 | }, |
| 723 | tagsChange(e){ | 725 | tagsChange(e){ |
| 726 | + if(this.data.listMoreCount<1 && !this.data.hasSearchLimit) return | ||
| 724 | let id=util.attr(e,'id'); | 727 | let id=util.attr(e,'id'); |
| 725 | let tags=this.data.tags; | 728 | let tags=this.data.tags; |
| 726 | let activeNum=0; | 729 | let activeNum=0; |
| @@ -758,6 +761,7 @@ Page({ | @@ -758,6 +761,7 @@ Page({ | ||
| 758 | }) | 761 | }) |
| 759 | }, | 762 | }, |
| 760 | caixiShow(){ | 763 | caixiShow(){ |
| 764 | + if(this.data.listMoreCount<1 && !this.data.hasSearchLimit) return | ||
| 761 | this.selectComponent('#caixi').show(); | 765 | this.selectComponent('#caixi').show(); |
| 762 | }, | 766 | }, |
| 763 | listEvent(e){ | 767 | listEvent(e){ |
| @@ -785,4 +789,20 @@ Page({ | @@ -785,4 +789,20 @@ Page({ | ||
| 785 | },'./indexList') | 789 | },'./indexList') |
| 786 | }); | 790 | }); |
| 787 | }, | 791 | }, |
| 792 | + setTSLocal(){ | ||
| 793 | + let map=this.data.map; | ||
| 794 | + map.latitude=def_latitude | ||
| 795 | + map.longitude=def_longitude | ||
| 796 | + map.scale=mapScale | ||
| 797 | + this.sellersIds=[] | ||
| 798 | + this.sellers=[] | ||
| 799 | + let sdobj={ | ||
| 800 | + map: map, | ||
| 801 | + hasGetSellersEnd:false, | ||
| 802 | + } | ||
| 803 | + if(!this.hasSellerConcat){ | ||
| 804 | + sdobj.markers=[] | ||
| 805 | + } | ||
| 806 | + this.setData(sdobj) | ||
| 807 | + }, | ||
| 788 | }) | 808 | }) |
| @@ -31,13 +31,13 @@ | @@ -31,13 +31,13 @@ | ||
| 31 | </formids> | 31 | </formids> |
| 32 | </view> | 32 | </view> |
| 33 | <view class="seller-view"> | 33 | <view class="seller-view"> |
| 34 | - <cover-view class="flex-vc transverse-view-top" bindtap="listShow"> | 34 | + <cover-view class="flex-vc transverse-view-top" bindtap="listShow" wx:if="{{hasGetSellersEnd && listMoreCount>0}}"> |
| 35 | <cover-view class="line"></cover-view> | 35 | <cover-view class="line"></cover-view> |
| 36 | <cover-view class="text"> | 36 | <cover-view class="text"> |
| 37 | - <cover-view wx:if="{{hasGetSellersEnd}}">{{hasSellers?'查看其它':'已扩大范围为你找到'}}{{listMoreCount}}家餐厅</cover-view> | 37 | + <cover-view>{{hasSellers?'查看其它':'已扩大范围为你找到'}}{{listMoreCount}}家餐厅</cover-view> |
| 38 | </cover-view> | 38 | </cover-view> |
| 39 | </cover-view> | 39 | </cover-view> |
| 40 | - <view class="transverse-search flex-ll"> | 40 | + <view class="transverse-search flex-ll {{(listMoreCount<1 && !hasSearchLimit)?'disabled':''}}"> |
| 41 | <view | 41 | <view |
| 42 | bindtap="caixiShow" | 42 | bindtap="caixiShow" |
| 43 | class="tags {{multiIndex[0]>0?'active':''}}" | 43 | class="tags {{multiIndex[0]>0?'active':''}}" |
| @@ -87,14 +87,25 @@ | @@ -87,14 +87,25 @@ | ||
| 87 | </swiper> | 87 | </swiper> |
| 88 | <view class="empty-txt flex-vc"> | 88 | <view class="empty-txt flex-vc"> |
| 89 | <view class="seller" wx:if="{{hasGetSellersEnd}}"> | 89 | <view class="seller" wx:if="{{hasGetSellersEnd}}"> |
| 90 | - <view class="empty" bindtap="listShow"> | ||
| 91 | - <view class="info"> | 90 | + <view class="empty"> |
| 91 | + <view class="info" wx:if="{{listMoreCount>0}}" bindtap="listShow"> | ||
| 92 | <view class="info-msg Semibold">已扩大范围为你找到餐厅</view> | 92 | <view class="info-msg Semibold">已扩大范围为你找到餐厅</view> |
| 93 | <view class="info-button flex-lr"> | 93 | <view class="info-button flex-lr"> |
| 94 | <view>去挑选</view> | 94 | <view>去挑选</view> |
| 95 | <view class="info-button-gt"></view> | 95 | <view class="info-button-gt"></view> |
| 96 | </view> | 96 | </view> |
| 97 | </view> | 97 | </view> |
| 98 | + <view class="info" wx:elif="{{hasSearchLimit}}"> | ||
| 99 | + <view class="info-msg Semibold">未找到符合要求的餐厅</view> | ||
| 100 | + <view class="info-txt">修改或减少条件,获取更多餐厅</view> | ||
| 101 | + </view> | ||
| 102 | + <view class="info" wx:else="hasSearchLimit" bindtap="setTSLocal"> | ||
| 103 | + <view class="info-msg Semibold">你可以切换到其他城市看看</view> | ||
| 104 | + <view class="info-button full flex-lr"> | ||
| 105 | + <view>唐山市</view> | ||
| 106 | + <view class="info-button-gt"></view> | ||
| 107 | + </view> | ||
| 108 | + </view> | ||
| 98 | </view> | 109 | </view> |
| 99 | </view> | 110 | </view> |
| 100 | </view> | 111 | </view> |
| @@ -111,10 +111,15 @@ page{ | @@ -111,10 +111,15 @@ page{ | ||
| 111 | height: 16rpx; | 111 | height: 16rpx; |
| 112 | min-width:12rpx; | 112 | min-width:12rpx; |
| 113 | } | 113 | } |
| 114 | +.disabled .tags{ | ||
| 115 | + color: #999; | ||
| 116 | +} | ||
| 114 | .tags.active .picker .more{ | 117 | .tags.active .picker .more{ |
| 115 | background-image: url("http://qn.colorcun.com/reserve/images/%E8%8F%9C%E7%B3%BB%E9%80%89%E4%B8%AD.png"); | 118 | background-image: url("http://qn.colorcun.com/reserve/images/%E8%8F%9C%E7%B3%BB%E9%80%89%E4%B8%AD.png"); |
| 116 | } | 119 | } |
| 117 | - | 120 | +.disabled .picker .more{ |
| 121 | + 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"); | ||
| 122 | +} | ||
| 118 | .searchAddr { | 123 | .searchAddr { |
| 119 | margin-left: 15rpx; | 124 | margin-left: 15rpx; |
| 120 | width: 400rpx; | 125 | width: 400rpx; |
| @@ -198,8 +203,9 @@ page{ | @@ -198,8 +203,9 @@ page{ | ||
| 198 | padding: 0 20rpx; | 203 | padding: 0 20rpx; |
| 199 | color: #F05522; | 204 | color: #F05522; |
| 200 | font-size: 28rpx; | 205 | font-size: 28rpx; |
| 201 | - width: 106rpx; | ||
| 202 | - max-width: 106rpx; | 206 | + width: 146rpx; |
| 207 | + max-width: 146rpx; | ||
| 208 | + box-sizing: border-box; | ||
| 203 | } | 209 | } |
| 204 | .info-button-gt{ | 210 | .info-button-gt{ |
| 205 | background-image: url("http://qn.colorcun.com/reserve/images/gt-cheng.png"); | 211 | background-image: url("http://qn.colorcun.com/reserve/images/gt-cheng.png"); |
| @@ -208,7 +214,13 @@ page{ | @@ -208,7 +214,13 @@ page{ | ||
| 208 | height: 20rpx; | 214 | height: 20rpx; |
| 209 | 215 | ||
| 210 | } | 216 | } |
| 211 | - | 217 | +.info-button.full{ |
| 218 | + background-color: #F05522; | ||
| 219 | + color:#fefefe; | ||
| 220 | +} | ||
| 221 | +.info-button.full .info-button-gt{ | ||
| 222 | + background-image: url("http://qn.colorcun.com/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20190925175650.png"); | ||
| 223 | +} | ||
| 212 | .transverse-search .tags{ | 224 | .transverse-search .tags{ |
| 213 | height: 50rpx; | 225 | height: 50rpx; |
| 214 | line-height: 50rpx; | 226 | line-height: 50rpx; |
| @@ -19,6 +19,7 @@ Page({ | @@ -19,6 +19,7 @@ Page({ | ||
| 19 | ], | 19 | ], |
| 20 | markers:[], | 20 | markers:[], |
| 21 | hasMore:true, | 21 | hasMore:true, |
| 22 | + hasDisabled:true, | ||
| 22 | }, | 23 | }, |
| 23 | 24 | ||
| 24 | /** | 25 | /** |
| @@ -133,10 +134,21 @@ Page({ | @@ -133,10 +134,21 @@ Page({ | ||
| 133 | this.setData({ | 134 | this.setData({ |
| 134 | hasMore:res.data.length==this.size, | 135 | hasMore:res.data.length==this.size, |
| 135 | markers:this.sellerFormat(res.data), | 136 | markers:this.sellerFormat(res.data), |
| 137 | + hasDisabled:this.getHasDisabled(res.data.length>0,this.data.multiIndex[0]>0 || tags.length>0) | ||
| 136 | }) | 138 | }) |
| 137 | this.triggerEvent('event',{type:'getListEnd',total:res.data.length}) | 139 | this.triggerEvent('event',{type:'getListEnd',total:res.data.length}) |
| 138 | }) | 140 | }) |
| 139 | }, | 141 | }, |
| 142 | + /** | ||
| 143 | + * @param hasLimit 是否有搜索条件 | ||
| 144 | + * @returns {boolean} | ||
| 145 | + */ | ||
| 146 | + getHasDisabled(hasData,hasLimit){ | ||
| 147 | + if(this.offset==1 && !hasLimit && !hasData) { | ||
| 148 | + return true | ||
| 149 | + } | ||
| 150 | + return false | ||
| 151 | + }, | ||
| 140 | getListMore(){ | 152 | getListMore(){ |
| 141 | this.param.offset+=1; | 153 | this.param.offset+=1; |
| 142 | let markers=this.data.markers; | 154 | let markers=this.data.markers; |
| @@ -148,6 +160,7 @@ Page({ | @@ -148,6 +160,7 @@ Page({ | ||
| 148 | }) | 160 | }) |
| 149 | }, | 161 | }, |
| 150 | caixiShow(){ | 162 | caixiShow(){ |
| 163 | + if(this.data.hasDisabled) return | ||
| 151 | this.selectComponent('#caixi').show(); | 164 | this.selectComponent('#caixi').show(); |
| 152 | }, | 165 | }, |
| 153 | caixiActive(e){ | 166 | caixiActive(e){ |
| @@ -173,6 +186,7 @@ Page({ | @@ -173,6 +186,7 @@ Page({ | ||
| 173 | setTimeout(()=>{this.getList();},0) | 186 | setTimeout(()=>{this.getList();},0) |
| 174 | }, | 187 | }, |
| 175 | tagsChange(e){ | 188 | tagsChange(e){ |
| 189 | + if(this.data.hasDisabled) return | ||
| 176 | let id=util.attr(e,'id'); | 190 | let id=util.attr(e,'id'); |
| 177 | let tags=this.data.tags; | 191 | let tags=this.data.tags; |
| 178 | let activeNum=0; | 192 | let activeNum=0; |
| 1 | <!--pages/reserve/indexList.wxml--> | 1 | <!--pages/reserve/indexList.wxml--> |
| 2 | <nav>周到安排</nav> | 2 | <nav>周到安排</nav> |
| 3 | <view class="header"> | 3 | <view class="header"> |
| 4 | - <view class="transverse-search flex-ll"> | 4 | + <view class="transverse-search flex-ll {{hasDisabled?'disabled':''}}"> |
| 5 | <view | 5 | <view |
| 6 | bindtap="caixiShow" | 6 | bindtap="caixiShow" |
| 7 | class="tags {{multiIndex[0]>0?'active':''}}" | 7 | class="tags {{multiIndex[0]>0?'active':''}}" |
| @@ -25,21 +25,29 @@ | @@ -25,21 +25,29 @@ | ||
| 25 | <view class="flex-vc empty" wx:if="{{markers.length<1}}"> | 25 | <view class="flex-vc empty" wx:if="{{markers.length<1}}"> |
| 26 | <block wx:if="{{!hasFirstShow}}"> | 26 | <block wx:if="{{!hasFirstShow}}"> |
| 27 | <image src="http://qn.colorcun.com/custom/lite-online/image/follow-empty.png"></image> | 27 | <image src="http://qn.colorcun.com/custom/lite-online/image/follow-empty.png"></image> |
| 28 | - <view>附近未找到任何餐厅哦</view> | 28 | + <block wx:if="{{hasDisabled}}"> |
| 29 | + <view>该地区没有可供预订的餐厅,努力开通中</view> | ||
| 30 | + </block> | ||
| 31 | + <block wx:else=""> | ||
| 32 | + <view class="empry-info1">未找到符合要求的餐厅</view> | ||
| 33 | + <view class="empry-info2">修改或减少条件,获取更多餐厅</view> | ||
| 34 | + </block> | ||
| 29 | </block> | 35 | </block> |
| 30 | </view> | 36 | </view> |
| 31 | - <view class="follow" wx:else=""> | ||
| 32 | - <view class="seller" wx:for="{{markers}}" wx:key="sellers.key" | ||
| 33 | - bindtap="gotoDetail" data-sid="{{item.id}}"> | ||
| 34 | - <sb-tr seller="{{item}}" | ||
| 35 | - hasActivityTags="{{false}}" | ||
| 36 | - hasActivityShort="{{true}}" | ||
| 37 | - hasBrand="true" hasActivityTese="true" | ||
| 38 | - hasSlogan="{{false}}" | ||
| 39 | - sellerStyle="noborder noshadow noradius"></sb-tr> | 37 | + <block wx:else=""> |
| 38 | + <view class="follow" > | ||
| 39 | + <view class="seller" wx:for="{{markers}}" wx:key="sellers.key" | ||
| 40 | + bindtap="gotoDetail" data-sid="{{item.id}}"> | ||
| 41 | + <sb-tr seller="{{item}}" | ||
| 42 | + hasActivityTags="{{false}}" | ||
| 43 | + hasActivityShort="{{true}}" | ||
| 44 | + hasBrand="true" hasActivityTese="true" | ||
| 45 | + hasSlogan="{{false}}" | ||
| 46 | + sellerStyle="noborder noshadow noradius"></sb-tr> | ||
| 47 | + </view> | ||
| 40 | </view> | 48 | </view> |
| 41 | - <hr class="flex-vc nomore" wx:if="{{!hasMore}}" bgColor="#f5f5f5">我是有底线的</hr> | ||
| 42 | - </view> | 49 | + <hr class="flex-vc nomore" wx:if="{{!hasMore}}" bgColor="#ffffff">我是有底线的</hr> |
| 50 | + </block> | ||
| 43 | </view> | 51 | </view> |
| 44 | <caixi multiArray="{{multiArray}}" multiIndex="{{multiIndex}}" | 52 | <caixi multiArray="{{multiArray}}" multiIndex="{{multiIndex}}" |
| 45 | bindactive="caixiActive" id="caixi" | 53 | bindactive="caixiActive" id="caixi" |
| @@ -47,12 +47,14 @@ | @@ -47,12 +47,14 @@ | ||
| 47 | height: 16rpx; | 47 | height: 16rpx; |
| 48 | min-width:12rpx; | 48 | min-width:12rpx; |
| 49 | } | 49 | } |
| 50 | +.disabled .tags{ | ||
| 51 | + color: #999; | ||
| 52 | +} | ||
| 50 | .tags.active .picker .more{ | 53 | .tags.active .picker .more{ |
| 51 | background-image: url("http://qn.colorcun.com/reserve/images/%E8%8F%9C%E7%B3%BB%E9%80%89%E4%B8%AD.png"); | 54 | background-image: url("http://qn.colorcun.com/reserve/images/%E8%8F%9C%E7%B3%BB%E9%80%89%E4%B8%AD.png"); |
| 52 | } | 55 | } |
| 53 | - | ||
| 54 | -page{ | ||
| 55 | - background-color: #F5F5F5; | 56 | +.disabled .picker .more{ |
| 57 | + 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"); | ||
| 56 | } | 58 | } |
| 57 | .pages{ | 59 | .pages{ |
| 58 | width: 100%; | 60 | width: 100%; |
| @@ -62,22 +64,24 @@ page{ | @@ -62,22 +64,24 @@ page{ | ||
| 62 | } | 64 | } |
| 63 | .follow { | 65 | .follow { |
| 64 | padding-top: 0; | 66 | padding-top: 0; |
| 65 | - padding-bottom: 40rpx; | 67 | + padding-bottom: 10rpx; |
| 66 | } | 68 | } |
| 67 | .follow .seller{ | 69 | .follow .seller{ |
| 68 | background-color: #ffffff; | 70 | background-color: #ffffff; |
| 69 | overflow: hidden; | 71 | overflow: hidden; |
| 70 | - margin: 0 0 20rpx; | 72 | + border-bottom: 20rpx solid #f5f5f5; |
| 73 | +} | ||
| 74 | +.follow .seller:last-child{ | ||
| 75 | + border-bottom: 20rpx solid #ffffff; | ||
| 71 | } | 76 | } |
| 72 | .nomore{ | 77 | .nomore{ |
| 73 | color: #999; | 78 | color: #999; |
| 74 | font-size: 28rpx; | 79 | font-size: 28rpx; |
| 75 | width: calc(100% - 36rpx); | 80 | width: calc(100% - 36rpx); |
| 76 | - margin: 40rpx auto 0; | 81 | + margin: 0rpx auto 40rpx; |
| 77 | } | 82 | } |
| 78 | .hr{ | 83 | .hr{ |
| 79 | height: 2rpx; | 84 | height: 2rpx; |
| 80 | - background-color: #F5F5F5; | ||
| 81 | width: 90%; | 85 | width: 90%; |
| 82 | margin: 19rpx auto 0; | 86 | margin: 19rpx auto 0; |
| 83 | } | 87 | } |
| @@ -89,4 +93,7 @@ page{ | @@ -89,4 +93,7 @@ page{ | ||
| 89 | .empty view{ | 93 | .empty view{ |
| 90 | font-size: 28rpx; | 94 | font-size: 28rpx; |
| 91 | margin-top: 86rpx; | 95 | margin-top: 86rpx; |
| 96 | +} | ||
| 97 | +.empty view.empry-info2{ | ||
| 98 | + margin-top: 20rpx; | ||
| 92 | } | 99 | } |
| @@ -443,7 +443,7 @@ | @@ -443,7 +443,7 @@ | ||
| 443 | "id": 52, | 443 | "id": 52, |
| 444 | "name": "pages/reserve/indexList", | 444 | "name": "pages/reserve/indexList", |
| 445 | "pathName": "pages/reserve/indexList", | 445 | "pathName": "pages/reserve/indexList", |
| 446 | - "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=", | 446 | + "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", |
| 447 | "scene": null | 447 | "scene": null |
| 448 | }, | 448 | }, |
| 449 | { | 449 | { |
-
Please register or login to post a comment