Showing
6 changed files
with
86 additions
and
14 deletions
| @@ -85,10 +85,10 @@ Component({ | @@ -85,10 +85,10 @@ Component({ | ||
| 85 | this.param.cuisine=mapParam.cuisine | 85 | this.param.cuisine=mapParam.cuisine |
| 86 | } | 86 | } |
| 87 | App.Customer.SellerLists(this.param).then(res=>{ | 87 | App.Customer.SellerLists(this.param).then(res=>{ |
| 88 | - this.setData({ | ||
| 89 | - hasMore:res.data.length==this.size, | ||
| 90 | - markers:res.data, | ||
| 91 | - }) | 88 | + // this.setData({ |
| 89 | + // hasMore:res.data.length==this.size, | ||
| 90 | + // markers:res.data, | ||
| 91 | + // }) | ||
| 92 | this.triggerEvent('event',{type:'getListEnd',total:res.data.length}) | 92 | this.triggerEvent('event',{type:'getListEnd',total:res.data.length}) |
| 93 | }) | 93 | }) |
| 94 | }, | 94 | }, |
| 1 | <!--components/reserve/caixi.wxml--> | 1 | <!--components/reserve/caixi.wxml--> |
| 2 | +<!-- | ||
| 2 | <cover-view class="mask" hidden="{{hidden}}"> | 3 | <cover-view class="mask" hidden="{{hidden}}"> |
| 3 | <cover-view class="header flex-lr" style="height: {{titleBarHeight}}px;padding-top: {{statusBarHeight}}px;" catchtap="hide"> | 4 | <cover-view class="header flex-lr" style="height: {{titleBarHeight}}px;padding-top: {{statusBarHeight}}px;" catchtap="hide"> |
| 4 | <cover-view class="searchList flex-ll"> | 5 | <cover-view class="searchList flex-ll"> |
| @@ -37,3 +38,4 @@ | @@ -37,3 +38,4 @@ | ||
| 37 | </cover-view> | 38 | </cover-view> |
| 38 | </cover-view> | 39 | </cover-view> |
| 39 | </cover-view> | 40 | </cover-view> |
| 41 | +--> |
| @@ -4,6 +4,7 @@ import util from '../../utils/util'; | @@ -4,6 +4,7 @@ import util from '../../utils/util'; | ||
| 4 | import App from '../../utils/api'; | 4 | import App from '../../utils/api'; |
| 5 | import DA from './data'; | 5 | import DA from './data'; |
| 6 | import reddot from '../../utils/reddot'; | 6 | import reddot from '../../utils/reddot'; |
| 7 | +import PubSub from '../../utils/PubSub' | ||
| 7 | const {regeneratorRuntime} = global | 8 | const {regeneratorRuntime} = global |
| 8 | const mapScale=15//18; | 9 | const mapScale=15//18; |
| 9 | const transverseViewHeight=232; | 10 | const transverseViewHeight=232; |
| @@ -82,6 +83,18 @@ Page({ | @@ -82,6 +83,18 @@ Page({ | ||
| 82 | "statReachBottom": true, | 83 | "statReachBottom": true, |
| 83 | "lauchOpts": options, //渠道分析 | 84 | "lauchOpts": options, //渠道分析 |
| 84 | }); | 85 | }); |
| 86 | + PubSub.on( | ||
| 87 | + 'searchParam', | ||
| 88 | + data=>{ | ||
| 89 | + console.log('searchParam.msg',data) | ||
| 90 | + if(data.fun=='tagsChange'){ | ||
| 91 | + this.tagsChange(data.e); | ||
| 92 | + } | ||
| 93 | + if(data.fun=='caixiActive'){ | ||
| 94 | + this.caixiActive(data.e); | ||
| 95 | + } | ||
| 96 | + } | ||
| 97 | + ) | ||
| 85 | reddot.init() | 98 | reddot.init() |
| 86 | }, | 99 | }, |
| 87 | 100 | ||
| @@ -537,6 +550,7 @@ Page({ | @@ -537,6 +550,7 @@ Page({ | ||
| 537 | let sdobj={ | 550 | let sdobj={ |
| 538 | map: map, | 551 | map: map, |
| 539 | hasSuggestion:false, | 552 | hasSuggestion:false, |
| 553 | + hasGetSellersEnd:false, | ||
| 540 | } | 554 | } |
| 541 | if(!this.hasSellerConcat){ | 555 | if(!this.hasSellerConcat){ |
| 542 | sdobj.markers=[] | 556 | sdobj.markers=[] |
| @@ -578,6 +592,7 @@ Page({ | @@ -578,6 +592,7 @@ Page({ | ||
| 578 | map: map, | 592 | map: map, |
| 579 | hasSuggestion:true, | 593 | hasSuggestion:true, |
| 580 | suggestion:suggestion, | 594 | suggestion:suggestion, |
| 595 | + hasGetSellersEnd:false, | ||
| 581 | } | 596 | } |
| 582 | if(!this.hasSellerConcat){ | 597 | if(!this.hasSellerConcat){ |
| 583 | sdobj.markers=[] | 598 | sdobj.markers=[] |
| @@ -652,7 +667,6 @@ Page({ | @@ -652,7 +667,6 @@ Page({ | ||
| 652 | } | 667 | } |
| 653 | }) | 668 | }) |
| 654 | } | 669 | } |
| 655 | - if(mks.length<1) return mks; | ||
| 656 | //if(this.data.hasSuggestion){ | 670 | //if(this.data.hasSuggestion){ |
| 657 | let map = this.data.map; | 671 | let map = this.data.map; |
| 658 | mks.push({ | 672 | mks.push({ |
| @@ -67,7 +67,7 @@ | @@ -67,7 +67,7 @@ | ||
| 67 | </view> | 67 | </view> |
| 68 | </swiper-item> | 68 | </swiper-item> |
| 69 | </block> | 69 | </block> |
| 70 | - <swiper-item bindtap="gotoDetail2"> | 70 | + <swiper-item bindtap="gotoDetail2" wx:if="{{hasGetSellersEnd}}"> |
| 71 | <view class="seller seller-last" id="seller-last"> | 71 | <view class="seller seller-last" id="seller-last"> |
| 72 | <view class="empty"> | 72 | <view class="empty"> |
| 73 | <view class="info"> | 73 | <view class="info"> |
| @@ -83,10 +83,13 @@ | @@ -83,10 +83,13 @@ | ||
| 83 | <view class="seller" wx:if="{{hasGetSellersEnd}}"> | 83 | <view class="seller" wx:if="{{hasGetSellersEnd}}"> |
| 84 | <view class="empty" bindtap="listShow"> | 84 | <view class="empty" bindtap="listShow"> |
| 85 | <view class="info"> | 85 | <view class="info"> |
| 86 | - <view class="info-msg Semibold">已扩大范围为你找到餐厅,去查看</view> | 86 | + <view class="info-msg Semibold">已扩大范围为你找到餐厅</view> |
| 87 | <view class="info-txt">当前范围没有找到符合条件的餐厅</view> | 87 | <view class="info-txt">当前范围没有找到符合条件的餐厅</view> |
| 88 | + <view class="info-button flex-lr"> | ||
| 89 | + 去挑选 | ||
| 90 | + <view class="info-button-gt"></view> | ||
| 91 | + </view> | ||
| 88 | </view> | 92 | </view> |
| 89 | - <view class="icon"></view> | ||
| 90 | </view> | 93 | </view> |
| 91 | </view> | 94 | </view> |
| 92 | </view> | 95 | </view> |
| @@ -63,7 +63,6 @@ | @@ -63,7 +63,6 @@ | ||
| 63 | border-radius: 6rpx; | 63 | border-radius: 6rpx; |
| 64 | box-shadow: 0 4rpx 8rpx 0 #E0E0E0; | 64 | box-shadow: 0 4rpx 8rpx 0 #E0E0E0; |
| 65 | position: relative; | 65 | position: relative; |
| 66 | - margin: 20rpx auto 0; | ||
| 67 | } | 66 | } |
| 68 | .transverse-list .seller-last .empty{ | 67 | .transverse-list .seller-last .empty{ |
| 69 | width: 100%; | 68 | width: 100%; |
| @@ -131,12 +130,12 @@ | @@ -131,12 +130,12 @@ | ||
| 131 | border-radius: 30rpx; | 130 | border-radius: 30rpx; |
| 132 | line-height: 60rpx; | 131 | line-height: 60rpx; |
| 133 | color:#999999; | 132 | color:#999999; |
| 134 | - font-size: 28rpx; | 133 | + font-size: 24rpx; |
| 135 | } | 134 | } |
| 136 | .searchAddr .icon{ | 135 | .searchAddr .icon{ |
| 137 | - min-width: 26rpx; | ||
| 138 | - width: 26rpx; | ||
| 139 | - height: 26rpx; | 136 | + min-width: 22rpx; |
| 137 | + width: 22rpx; | ||
| 138 | + height: 22rpx; | ||
| 140 | margin: 0 20rpx; | 139 | margin: 0 20rpx; |
| 141 | } | 140 | } |
| 142 | .searchAddr .title{ | 141 | .searchAddr .title{ |
| @@ -159,7 +158,7 @@ | @@ -159,7 +158,7 @@ | ||
| 159 | .searchList .icon{ | 158 | .searchList .icon{ |
| 160 | min-width: 24rpx; | 159 | min-width: 24rpx; |
| 161 | width: 24rpx; | 160 | width: 24rpx; |
| 162 | - height: 18rpx; | 161 | + height: 24rpx; |
| 163 | margin: 0 8rpx 0 14rpx; | 162 | margin: 0 8rpx 0 14rpx; |
| 164 | } | 163 | } |
| 165 | .searchList .title{ | 164 | .searchList .title{ |
| @@ -174,6 +173,45 @@ | @@ -174,6 +173,45 @@ | ||
| 174 | line-height: 300rpx; | 173 | line-height: 300rpx; |
| 175 | font-size: 34rpx; | 174 | font-size: 34rpx; |
| 176 | } | 175 | } |
| 176 | +.empty-txt .seller{ | ||
| 177 | + | ||
| 178 | +} | ||
| 179 | +.empty-txt .seller .empty{ | ||
| 180 | + background-image: url("http://qn.colorcun.com/reserve/images/empty-seller.png"); | ||
| 181 | + background-size: 100% 100%; | ||
| 182 | + border-left-width: 0; | ||
| 183 | + margin: 20rpx auto 0; | ||
| 184 | +} | ||
| 185 | +.empty-txt .seller .empty .info{ | ||
| 186 | + margin-top: 52rpx; | ||
| 187 | + margin-left: 30rpx; | ||
| 188 | +} | ||
| 189 | +.empty-txt .seller .empty .info .info-msg{ | ||
| 190 | + margin-bottom: 14rpx; | ||
| 191 | + font-size: 34rpx; | ||
| 192 | +} | ||
| 193 | +.empty-txt .seller .empty .info .info-txt{ | ||
| 194 | + font-size: 24rpx; | ||
| 195 | +} | ||
| 196 | +.info-button{ | ||
| 197 | + margin-top: 50rpx; | ||
| 198 | + border: 2rpx solid #F05522; | ||
| 199 | + border-radius: 28rpx; | ||
| 200 | + height: 56rpx; | ||
| 201 | + line-height: 56rpx; | ||
| 202 | + padding: 0 20rpx; | ||
| 203 | + color: #F05522; | ||
| 204 | + font-size: 28rpx; | ||
| 205 | + width: 106rpx; | ||
| 206 | + max-width: 106rpx; | ||
| 207 | +} | ||
| 208 | +.info-button-gt{ | ||
| 209 | + background-image: url("http://qn.colorcun.com/reserve/images/gt-cheng.png"); | ||
| 210 | + background-size: 100% 100%; | ||
| 211 | + width: 10rpx; | ||
| 212 | + height: 20rpx; | ||
| 213 | + | ||
| 214 | +} | ||
| 177 | 215 | ||
| 178 | .transverse-search .tags{ | 216 | .transverse-search .tags{ |
| 179 | height: 50rpx; | 217 | height: 50rpx; |
| @@ -3,6 +3,7 @@ import util from '../../utils/util'; | @@ -3,6 +3,7 @@ import util from '../../utils/util'; | ||
| 3 | import App from '../../utils/api'; | 3 | import App from '../../utils/api'; |
| 4 | import DA from './data'; | 4 | import DA from './data'; |
| 5 | const {regeneratorRuntime} = global | 5 | const {regeneratorRuntime} = global |
| 6 | +import PubSub from '../../utils/PubSub' | ||
| 6 | Page({ | 7 | Page({ |
| 7 | 8 | ||
| 8 | /** | 9 | /** |
| @@ -144,6 +145,13 @@ Page({ | @@ -144,6 +145,13 @@ Page({ | ||
| 144 | value:[e.detail] | 145 | value:[e.detail] |
| 145 | } | 146 | } |
| 146 | }) | 147 | }) |
| 148 | + PubSub.emit( | ||
| 149 | + 'searchParam', | ||
| 150 | + { | ||
| 151 | + fun:'caixiActive', | ||
| 152 | + e:e, | ||
| 153 | + } | ||
| 154 | + ) | ||
| 147 | }, | 155 | }, |
| 148 | bindMultiPickerChange(e){ | 156 | bindMultiPickerChange(e){ |
| 149 | console.log(e); | 157 | console.log(e); |
| @@ -168,6 +176,13 @@ Page({ | @@ -168,6 +176,13 @@ Page({ | ||
| 168 | this.setData({ | 176 | this.setData({ |
| 169 | tags:tags, | 177 | tags:tags, |
| 170 | }) | 178 | }) |
| 179 | + PubSub.emit( | ||
| 180 | + 'searchParam', | ||
| 181 | + { | ||
| 182 | + fun:'tagsChange', | ||
| 183 | + e:e, | ||
| 184 | + } | ||
| 185 | + ) | ||
| 171 | setTimeout(()=>{this.getList();},0) | 186 | setTimeout(()=>{this.getList();},0) |
| 172 | }, | 187 | }, |
| 173 | }) | 188 | }) |
-
Please register or login to post a comment