Showing
10 changed files
with
2107 additions
and
0 deletions
| @@ -10,6 +10,7 @@ | @@ -10,6 +10,7 @@ | ||
| 10 | "pages/customer/list", | 10 | "pages/customer/list", |
| 11 | "pages/customer/remind", | 11 | "pages/customer/remind", |
| 12 | "pages/reserve/index", | 12 | "pages/reserve/index", |
| 13 | + "pages/reserve/index_yy", | ||
| 13 | "pages/me/index", | 14 | "pages/me/index", |
| 14 | "pages/me/concat", | 15 | "pages/me/concat", |
| 15 | "pages/me/setting", | 16 | "pages/me/setting", |
| @@ -29,6 +30,7 @@ | @@ -29,6 +30,7 @@ | ||
| 29 | "pages/reserve/activity", | 30 | "pages/reserve/activity", |
| 30 | "pages/reserve/discount", | 31 | "pages/reserve/discount", |
| 31 | "pages/reserve/indexList", | 32 | "pages/reserve/indexList", |
| 33 | + "pages/reserve/indexList_yy", | ||
| 32 | "pages/reserve/share", | 34 | "pages/reserve/share", |
| 33 | "pages/reserve/submit", | 35 | "pages/reserve/submit", |
| 34 | "pages/me/history", | 36 | "pages/me/history", |
| @@ -104,6 +104,16 @@ | @@ -104,6 +104,16 @@ | ||
| 104 | <view class="more"></view> | 104 | <view class="more"></view> |
| 105 | </view> | 105 | </view> |
| 106 | </navigator> | 106 | </navigator> |
| 107 | + <navigator | ||
| 108 | + url="/pages/reserve/index_yy" open-type="redirect" hover-class="other-navigator-hover"> | ||
| 109 | + <view class="item flex-lr"> | ||
| 110 | + <view class="item-name flex-ll"> | ||
| 111 | + <view class="tuco"></view> | ||
| 112 | + <view>查找餐厅</view> | ||
| 113 | + </view> | ||
| 114 | + <view class="more"></view> | ||
| 115 | + </view> | ||
| 116 | + </navigator> | ||
| 107 | </view> | 117 | </view> |
| 108 | </view> | 118 | </view> |
| 109 | </layout> | 119 | </layout> |
pages/reserve/indexList_yy.js
0 → 100644
| 1 | +// pages/reserve/indexList.js | ||
| 2 | +import util from '../../utils/util'; | ||
| 3 | +import App from '../../utils/api'; | ||
| 4 | +import DA from './data'; | ||
| 5 | +const {regeneratorRuntime} = global | ||
| 6 | +import PubSub from '../../utils/PubSub' | ||
| 7 | +Page({ | ||
| 8 | + | ||
| 9 | + /** | ||
| 10 | + * 页面的初始数据 | ||
| 11 | + */ | ||
| 12 | + data: { | ||
| 13 | + multiArray: ['全部菜系'], | ||
| 14 | + multiIndex: [0], | ||
| 15 | + tags:[ | ||
| 16 | + {id:1,name:'环境好'}, | ||
| 17 | + {id:2,name:'菜品有特色'}, | ||
| 18 | + {id:3,name:'超大包间'}, | ||
| 19 | + ], | ||
| 20 | + markers:[], | ||
| 21 | + hasMore:true, | ||
| 22 | + hasDisabled:true, | ||
| 23 | + hasSuggestion:false, | ||
| 24 | + placeholder:'您好,几位,什么时候', | ||
| 25 | + }, | ||
| 26 | + | ||
| 27 | + /** | ||
| 28 | + * 生命周期函数--监听页面加载 | ||
| 29 | + */ | ||
| 30 | + eventChannel:null, | ||
| 31 | + onLoad: async function (options) { | ||
| 32 | + //lat=34.21719&lng=108.89155&map={"errMsg":"getMapRegion:ok","southwest":{"longitude":108.87545674591064,"latitude":34.204520114013846},"northeast":{"longitude":108.90764325408935,"latitude":34.229857981005225},"scale":15}&multiIndex=1&tags=1,2 | ||
| 33 | + this.options=options; | ||
| 34 | + if(options.hasSuggestion){ | ||
| 35 | + this.setData({ | ||
| 36 | + hasSuggestion:true | ||
| 37 | + }) | ||
| 38 | + } | ||
| 39 | + let tags=[ | ||
| 40 | + {id:1,name:'环境好'}, | ||
| 41 | + {id:2,name:'菜品有特色'}, | ||
| 42 | + {id:3,name:'超大包间'}, | ||
| 43 | + ]; | ||
| 44 | + if(options.tags){ | ||
| 45 | + let ts=options.tags.split(','); | ||
| 46 | + tags.forEach(t=>{ | ||
| 47 | + if(ts._indexOf(t.id)>-1){ | ||
| 48 | + t.active=true; | ||
| 49 | + } | ||
| 50 | + }) | ||
| 51 | + } | ||
| 52 | + this.setData({ | ||
| 53 | + multiArray:[['全部菜系'].concat(await DA.getCates())], | ||
| 54 | + multiIndex:[options.multiIndex], | ||
| 55 | + tags:tags, | ||
| 56 | + }) | ||
| 57 | + try{ | ||
| 58 | + this.eventChannel = this.getOpenerEventChannel() | ||
| 59 | + // 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据 | ||
| 60 | + this.eventChannel.on('acceptDataFromMapPage', findSellerData=> { | ||
| 61 | + if(findSellerData){ | ||
| 62 | + this.findSellerData=findSellerData | ||
| 63 | + console.log('findSellerData',findSellerData) | ||
| 64 | + this.setData({ | ||
| 65 | + findSellerData:findSellerData, | ||
| 66 | + }) | ||
| 67 | + } | ||
| 68 | + }) | ||
| 69 | + }catch(e){} | ||
| 70 | + setTimeout(()=>{this.getList()},300) | ||
| 71 | + }, | ||
| 72 | + | ||
| 73 | + /** | ||
| 74 | + * 生命周期函数--监听页面初次渲染完成 | ||
| 75 | + */ | ||
| 76 | + onReady: function () { | ||
| 77 | + this.selectComponent('#getpos').getPos(); | ||
| 78 | + }, | ||
| 79 | + | ||
| 80 | + /** | ||
| 81 | + * 生命周期函数--监听页面显示 | ||
| 82 | + */ | ||
| 83 | + onShow: function () { | ||
| 84 | + | ||
| 85 | + }, | ||
| 86 | + | ||
| 87 | + /** | ||
| 88 | + * 生命周期函数--监听页面隐藏 | ||
| 89 | + */ | ||
| 90 | + onHide: function () { | ||
| 91 | + | ||
| 92 | + }, | ||
| 93 | + | ||
| 94 | + /** | ||
| 95 | + * 生命周期函数--监听页面卸载 | ||
| 96 | + */ | ||
| 97 | + onUnload: function () { | ||
| 98 | + | ||
| 99 | + }, | ||
| 100 | + | ||
| 101 | + /** | ||
| 102 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
| 103 | + */ | ||
| 104 | + onPullDownRefresh: function () { | ||
| 105 | + | ||
| 106 | + }, | ||
| 107 | + | ||
| 108 | + /** | ||
| 109 | + * 页面上拉触底事件的处理函数 | ||
| 110 | + */ | ||
| 111 | + onReachBottom: function () { | ||
| 112 | + this.getListMore() | ||
| 113 | + }, | ||
| 114 | + hasGetSellerEnd:false, | ||
| 115 | + async getList(){ | ||
| 116 | + let mapParam=this.options | ||
| 117 | + this.offset=1 //page | ||
| 118 | + this.size=20 //page size | ||
| 119 | + if(mapParam.keyword){ | ||
| 120 | + this.param={ | ||
| 121 | + lat_extend:mapParam.lat, | ||
| 122 | + lng_extend:mapParam.lng, | ||
| 123 | + keyword:mapParam.keyword.trim(), | ||
| 124 | + offset:this.offset, | ||
| 125 | + size:this.size, | ||
| 126 | + distance:500000, | ||
| 127 | + }; | ||
| 128 | + if(mapParam.lat){ | ||
| 129 | + this.param.centre_pos=`${mapParam.lat},${mapParam.lng}` | ||
| 130 | + } | ||
| 131 | + if(mapParam.isopen_md){ | ||
| 132 | + this.param.isopen_md=1 | ||
| 133 | + } | ||
| 134 | + }else{ | ||
| 135 | + //计算视窗中心 | ||
| 136 | + let map=JSON.parse(mapParam.map); | ||
| 137 | + let lat=map.northeast.latitude-(map.northeast.latitude-map.southwest.latitude)/2; | ||
| 138 | + let lng=map.northeast.longitude-(map.northeast.longitude-map.southwest.longitude)/2; | ||
| 139 | + this.param={ | ||
| 140 | + lat:lat, | ||
| 141 | + lng:lng, | ||
| 142 | + lat_extend:mapParam.lat, | ||
| 143 | + lng_extend:mapParam.lng, | ||
| 144 | + offset:this.offset, | ||
| 145 | + size:this.size, | ||
| 146 | + distance:50, | ||
| 147 | + }; | ||
| 148 | + if(mapParam.centre_pos){ | ||
| 149 | + this.param.centre_pos=mapParam.centre_pos | ||
| 150 | + } | ||
| 151 | + } | ||
| 152 | + | ||
| 153 | + if(this.data.multiIndex[0]>0){ | ||
| 154 | + this.param.cuisine=await DA.getCatesID(this.data.multiIndex[0]-1); | ||
| 155 | + } | ||
| 156 | + let tags=[]; | ||
| 157 | + this.data.tags.forEach(t=>{ | ||
| 158 | + if(t.active){ | ||
| 159 | + tags.push(t.id) | ||
| 160 | + } | ||
| 161 | + }) | ||
| 162 | + if(tags.length>0){ | ||
| 163 | + this.param.tags=tags; | ||
| 164 | + } | ||
| 165 | + let placeholder='您好,几位,什么时候'; | ||
| 166 | + if(this.findSellerData){ | ||
| 167 | + console.log(this.findSellerData) | ||
| 168 | + this.param=Object.assign(this.param,this.findSellerData.paramObj) | ||
| 169 | + //4位 今天 午餐 | ||
| 170 | + let sp=this.findSellerData.params | ||
| 171 | + if(sp.pnum.val>30){ | ||
| 172 | + placeholder = '30 位以上 ' | ||
| 173 | + }else{ | ||
| 174 | + placeholder = sp.pnum.val+' 位 ' | ||
| 175 | + } | ||
| 176 | + placeholder += util.unixtoTime(sp.date.val,' `DAY/MM-DD` ') | ||
| 177 | + if(sp.dur){ | ||
| 178 | + placeholder+=' '+['','早餐','午餐','晚餐','夜宵'][sp.dur.val] | ||
| 179 | + } | ||
| 180 | + } | ||
| 181 | + this.setData({ | ||
| 182 | + placeholder:placeholder, | ||
| 183 | + }) | ||
| 184 | + App.Customer.SellerLists(this.param).then(res=>{ | ||
| 185 | + this.setData({ | ||
| 186 | + rsl:[], | ||
| 187 | + hasMore:res.data.length==this.size, | ||
| 188 | + markers:this.sellerFormat(res.data), | ||
| 189 | + hasDisabled:this.getHasDisabled(res.data.length>0,this.data.multiIndex[0]>0 || tags.length>0 || this.findSellerData) | ||
| 190 | + }) | ||
| 191 | + this.triggerEvent('event',{type:'getListEnd',total:res.data.length}) | ||
| 192 | + this.hasGetSellerEnd=true | ||
| 193 | + if(res.data.length==0 && this.offset==1 && this.location){ | ||
| 194 | + this.onpos({detail:this.location}) | ||
| 195 | + } | ||
| 196 | + }) | ||
| 197 | + }, | ||
| 198 | + /** | ||
| 199 | + * @param hasLimit 是否有搜索条件 | ||
| 200 | + * @returns {boolean} | ||
| 201 | + */ | ||
| 202 | + getHasDisabled(hasData,hasLimit){ | ||
| 203 | + if(this.offset==1 && !hasLimit && !hasData) { | ||
| 204 | + return true | ||
| 205 | + } | ||
| 206 | + return false | ||
| 207 | + }, | ||
| 208 | + getListMore(){ | ||
| 209 | + this.param.offset+=1; | ||
| 210 | + let markers=this.data.markers; | ||
| 211 | + App.Customer.SellerLists(this.param).then(res=>{ | ||
| 212 | + this.setData({ | ||
| 213 | + hasMore:res.data.length==this.size, | ||
| 214 | + markers:markers.concat(this.sellerFormat(res.data)), | ||
| 215 | + }) | ||
| 216 | + }) | ||
| 217 | + }, | ||
| 218 | + caixiShow(){ | ||
| 219 | + if(this.data.hasDisabled) return | ||
| 220 | + this.selectComponent('#caixi').show(); | ||
| 221 | + }, | ||
| 222 | + caixiActive(e){ | ||
| 223 | + this.bindMultiPickerChange({ | ||
| 224 | + detail:{ | ||
| 225 | + value:[e.detail] | ||
| 226 | + } | ||
| 227 | + }) | ||
| 228 | + PubSub.emit( | ||
| 229 | + 'searchParam', | ||
| 230 | + { | ||
| 231 | + fun:'caixiActive', | ||
| 232 | + e:e, | ||
| 233 | + } | ||
| 234 | + ) | ||
| 235 | + }, | ||
| 236 | + bindMultiPickerChange(e){ | ||
| 237 | + console.log(e); | ||
| 238 | + let val=util.val(e); | ||
| 239 | + this.setData({ | ||
| 240 | + multiIndex:val | ||
| 241 | + }) | ||
| 242 | + setTimeout(()=>{this.getList();},0) | ||
| 243 | + }, | ||
| 244 | + tagsChange(e){ | ||
| 245 | + if(this.data.hasDisabled) return | ||
| 246 | + let id=util.attr(e,'id'); | ||
| 247 | + let tags=this.data.tags; | ||
| 248 | + let activeNum=0; | ||
| 249 | + tags.forEach(t=>{ | ||
| 250 | + if(t.id==id){ | ||
| 251 | + t.active=!t.active | ||
| 252 | + } | ||
| 253 | + if(t.active){ | ||
| 254 | + activeNum++ | ||
| 255 | + } | ||
| 256 | + }) | ||
| 257 | + this.setData({ | ||
| 258 | + tags:tags, | ||
| 259 | + }) | ||
| 260 | + PubSub.emit( | ||
| 261 | + 'searchParam', | ||
| 262 | + { | ||
| 263 | + fun:'tagsChange', | ||
| 264 | + e:e, | ||
| 265 | + } | ||
| 266 | + ) | ||
| 267 | + setTimeout(()=>{this.getList();},0) | ||
| 268 | + }, | ||
| 269 | + gotoDetail(e){ | ||
| 270 | + wx.navigateTo({ | ||
| 271 | + url:'/pages/reserve/detail?id='+util.attr(e,'sid') | ||
| 272 | + }) | ||
| 273 | + }, | ||
| 274 | + sellerFormat(sellers){ | ||
| 275 | + // sellers.forEach((seller) => { | ||
| 276 | + // if(seller.distance || seller.distance===0) { | ||
| 277 | + // seller.distance = parseInt(seller.distance); | ||
| 278 | + // if (seller.distance > 1000) { | ||
| 279 | + // seller.distance = (seller.distance / 1000).toFixed(2) + 'km' | ||
| 280 | + // } else { | ||
| 281 | + // seller.distance += 'm'; | ||
| 282 | + // } | ||
| 283 | + // } | ||
| 284 | + // }) | ||
| 285 | + sellers.forEach(seller=>{ | ||
| 286 | + if(this.findSellerData){ | ||
| 287 | + seller.findSellerParamObj=this.findSellerData.paramObj | ||
| 288 | + } | ||
| 289 | + }) | ||
| 290 | + return sellers; | ||
| 291 | + }, | ||
| 292 | + dispalySearchHow(){ | ||
| 293 | + this.selectComponent('#search-how').show(); | ||
| 294 | + }, | ||
| 295 | + howEvent(e){ | ||
| 296 | + this.eventChannel.emit('findSellerData',e.detail) | ||
| 297 | + this.findSellerData=e.detail | ||
| 298 | + this.setData({ | ||
| 299 | + findSellerData:e.detail | ||
| 300 | + }) | ||
| 301 | + setTimeout(()=>{this.getList();},0) | ||
| 302 | + this.selectComponent('#search-how').hide(); | ||
| 303 | + }, | ||
| 304 | + location:null, | ||
| 305 | + onpos(e){ | ||
| 306 | + console.log('onpos',this.hasGetSellerEnd,e); | ||
| 307 | + this.location=e.detail | ||
| 308 | + if(!this.hasGetSellerEnd){ | ||
| 309 | + return setTimeout(()=>{ | ||
| 310 | + this.onpos(e) | ||
| 311 | + },500) | ||
| 312 | + } | ||
| 313 | + if(this.data.markers.length<1){ | ||
| 314 | + this.GetRecommendSellerList() | ||
| 315 | + } | ||
| 316 | + }, | ||
| 317 | + GetRecommendSellerList(){ | ||
| 318 | + let param={sid:'sid'} | ||
| 319 | + if(this.location){ | ||
| 320 | + param.lat=this.location.latitude | ||
| 321 | + param.lng=this.location.longitude | ||
| 322 | + } | ||
| 323 | + App.Customer.GetRecommendSellerList(param).then(res=>{ | ||
| 324 | + this.setData({ | ||
| 325 | + rsl:res.data | ||
| 326 | + }) | ||
| 327 | + }) | ||
| 328 | + }, | ||
| 329 | + hasGoto:false, | ||
| 330 | + bindtransition(e){ | ||
| 331 | + if('change'==e.type){ | ||
| 332 | + this.hasGoto=false | ||
| 333 | + } | ||
| 334 | + if('animationfinish'==e.type){ | ||
| 335 | + if(this.hasGoto){ | ||
| 336 | + wx.switchTab({ | ||
| 337 | + url: '/pages/reserve/index' | ||
| 338 | + }) | ||
| 339 | + return; | ||
| 340 | + }else{ | ||
| 341 | + this.hasGoto=true | ||
| 342 | + } | ||
| 343 | + } | ||
| 344 | + }, | ||
| 345 | +}) |
pages/reserve/indexList_yy.json
0 → 100644
| 1 | +{ | ||
| 2 | + "navigationBarBackgroundColor": "#ffffff", | ||
| 3 | + "navigationBarTextStyle": "black", | ||
| 4 | + "navigationBarTitleText":"周到安排", | ||
| 5 | + "usingComponents": { | ||
| 6 | + "formids":"/components/formids/formids", | ||
| 7 | + "nav":"/components/nav/nav", | ||
| 8 | + "getpos":"/components/userinfo/getpos", | ||
| 9 | + "sb-tr":"/components/reserve/seller-box-transverse/seller-box", | ||
| 10 | + "caixi":"/components/reserve/caixi", | ||
| 11 | + "search-how":"/components/reserve/search/how/index", | ||
| 12 | + "hr":"/components/hr" | ||
| 13 | + } | ||
| 14 | +} |
pages/reserve/indexList_yy.wxml
0 → 100644
| 1 | +<!--pages/reserve/indexList.wxml--> | ||
| 2 | +<nav>周到安排</nav> | ||
| 3 | +<view class="header"> | ||
| 4 | + <!-- | ||
| 5 | + <view class="searchAddrView" bindtap="dispalySearchHow"> | ||
| 6 | + <view class="searchAddr flex-ll"> | ||
| 7 | + <image class="icon" src="http://nosqn.colorcun.com/reserve/images/find-black.png"></image> | ||
| 8 | + <input style="width: 100%;" placeholder="{{placeholder}}" | ||
| 9 | + type="text" disabled | ||
| 10 | + value="{{keyword}}"/> | ||
| 11 | + </view> | ||
| 12 | + </view> | ||
| 13 | + --> | ||
| 14 | + <view class="transverse-search flex-ll {{hasDisabled?'disabled':''}}"> | ||
| 15 | + <view | ||
| 16 | + bindtap="caixiShow" | ||
| 17 | + class="tags {{multiIndex[0]>0?'active':''}}" | ||
| 18 | + > | ||
| 19 | + <view class="picker flex-lr"> | ||
| 20 | + <view class="input"> | ||
| 21 | + <block wx:if="{{multiIndex[0]==0}}">菜系</block> | ||
| 22 | + <block wx:else="">{{multiArray[0][multiIndex[0]]}}</block> | ||
| 23 | + </view> | ||
| 24 | + <view class="more"></view> | ||
| 25 | + </view> | ||
| 26 | + </view> | ||
| 27 | + <block wx:for="{{tags}}" wx:key="tags.key"> | ||
| 28 | + <view class="tags {{item.active?'active':''}}" | ||
| 29 | + bindtap="tagsChange" | ||
| 30 | + data-id="{{item.id}}">{{item.name}}</view> | ||
| 31 | + </block> | ||
| 32 | + </view> | ||
| 33 | +</view> | ||
| 34 | +<view class="pages"> | ||
| 35 | + <view class="flex-vc empty" wx:if="{{markers.length<1}}"> | ||
| 36 | + <block wx:if="{{!hasFirstShow}}"> | ||
| 37 | + <image src="http://nosqn.colorcun.com/custom/lite-online/image/follow-empty.png"></image> | ||
| 38 | + <block wx:if="{{hasDisabled}}"> | ||
| 39 | + <view>该地区没有可供预订的餐厅,努力开通中</view> | ||
| 40 | + </block> | ||
| 41 | + <block wx:else=""> | ||
| 42 | + <view class="empry-info1">未找到符合要求的餐厅</view> | ||
| 43 | + <view class="empry-info2">修改或减少条件,获取更多餐厅</view> | ||
| 44 | + </block> | ||
| 45 | + <button class="button-none info-button" | ||
| 46 | + open-type="contact"> | ||
| 47 | + 人工帮订 | ||
| 48 | + </button> | ||
| 49 | + </block> | ||
| 50 | + </view> | ||
| 51 | + <block wx:else=""> | ||
| 52 | + <view class="follow" > | ||
| 53 | + <view class="seller" wx:for="{{markers}}" wx:key="sellers.key" | ||
| 54 | + bindtap="gotoDetail" data-sid="{{item.id}}"> | ||
| 55 | + <sb-tr seller="{{item}}" | ||
| 56 | + hasActivityTags="{{false}}" | ||
| 57 | + hasActivityShort="{{true}}" | ||
| 58 | + hasBrand="true" hasActivityRed="true" | ||
| 59 | + hasSlogan="{{false}}" | ||
| 60 | + hasSuggestion="{{hasSuggestion}}" | ||
| 61 | + sellerStyle="noborder noshadow noradius"></sb-tr> | ||
| 62 | + </view> | ||
| 63 | + </view> | ||
| 64 | + <hr class="flex-vc nomore" wx:if="{{!hasMore}}" bgColor="#ffffff">我是有底线的</hr> | ||
| 65 | + </block> | ||
| 66 | +</view> | ||
| 67 | +<caixi multiArray="{{multiArray}}" multiIndex="{{multiIndex}}" | ||
| 68 | + bindactive="caixiActive" id="caixi" | ||
| 69 | +></caixi> | ||
| 70 | +<search-how id="search-how" findSellerData="{{findSellerData}}" bindevent="howEvent"></search-how> | ||
| 71 | +<block wx:if="{{rsl.length>0}}"> | ||
| 72 | + <view class="transverse-flxed"> | ||
| 73 | + <view class="line-push">为你推荐</view> | ||
| 74 | + <view class="transverse-list"> | ||
| 75 | + <swiper | ||
| 76 | + indicator-dots="{{false}}" autoplay="{{false}}" circular="{{false}}" vertical="{{false}}" | ||
| 77 | + interval="2000" duration="500" | ||
| 78 | + previous-margin="{{10}}px" next-margin="{{10}}px" style="height: 330rpx;" | ||
| 79 | + current="{{current}}" bindchange="bindtransition" bindanimationfinish="bindtransition"> | ||
| 80 | + <block wx:for="{{rsl}}" wx:key="rsl.key"> | ||
| 81 | + <swiper-item bindtap="gotoSellerDetail" id="{{item.id}}"> | ||
| 82 | + <view class="seller" id="seller-{{item.id}}"> | ||
| 83 | + <sb-tr seller="{{item}}" | ||
| 84 | + hasActivityTags="{{false}}" | ||
| 85 | + hasActivityShort="{{true}}" | ||
| 86 | + hasBrand="true" hasActivityTese="true" | ||
| 87 | + hasSlogan="{{false}}"></sb-tr> | ||
| 88 | + </view> | ||
| 89 | + </swiper-item> | ||
| 90 | + </block> | ||
| 91 | + </swiper> | ||
| 92 | + </view> | ||
| 93 | + </view> | ||
| 94 | +</block> | ||
| 95 | +<getpos bindpos="onpos" id="getpos" hasAllowFail hasAllowLoading="{{false}}"></getpos> |
pages/reserve/indexList_yy.wxss
0 → 100644
| 1 | +/* pages/reserve/indexList.wxss */ | ||
| 2 | +.header{ | ||
| 3 | + height: 81rpx; | ||
| 4 | + position: fixed; | ||
| 5 | + width: 100%; | ||
| 6 | + z-index: 10; | ||
| 7 | + background-color: #fefefe; | ||
| 8 | + border-bottom: 1rpx solid #F5F5F5; | ||
| 9 | +} | ||
| 10 | +.transverse-search{ | ||
| 11 | + background-color: #fefefe; | ||
| 12 | + height: 60rpx; | ||
| 13 | + width: 100%; | ||
| 14 | + margin: 0 auto; | ||
| 15 | + font-size: 24rpx; | ||
| 16 | + padding-left: 20rpx; | ||
| 17 | +} | ||
| 18 | +.transverse-search .tags{ | ||
| 19 | + height: 50rpx; | ||
| 20 | + line-height: 50rpx; | ||
| 21 | + background-color: #F0F0F9; | ||
| 22 | + border-radius: 4rpx; | ||
| 23 | + margin-right: 30rpx; | ||
| 24 | + padding: 0 16rpx; | ||
| 25 | +} | ||
| 26 | +.transverse-search .tags:last-child{ | ||
| 27 | + margin-right: 0; | ||
| 28 | +} | ||
| 29 | +.transverse-search .tags.active{ | ||
| 30 | + background-color: #F4DAB9; | ||
| 31 | + color:#8B5318; | ||
| 32 | + font-weight: 900; | ||
| 33 | +} | ||
| 34 | + | ||
| 35 | +.picker{ | ||
| 36 | + height: 50rpx; | ||
| 37 | + line-height: 50rpx; | ||
| 38 | +} | ||
| 39 | +.picker .input{ | ||
| 40 | + height: 50rpx; | ||
| 41 | + line-height: 50rpx; | ||
| 42 | + margin-right: 10rpx; | ||
| 43 | +} | ||
| 44 | +.picker .more{ | ||
| 45 | + background-image: url("http://nosqn.colorcun.com/reserve/images/%E8%8F%9C%E7%B3%BB.png"); | ||
| 46 | + width: 12rpx; | ||
| 47 | + height: 16rpx; | ||
| 48 | + min-width:12rpx; | ||
| 49 | +} | ||
| 50 | +.disabled .tags{ | ||
| 51 | + color: #999; | ||
| 52 | +} | ||
| 53 | +.tags.active .picker .more{ | ||
| 54 | + background-image: url("http://nosqn.colorcun.com/reserve/images/%E8%8F%9C%E7%B3%BB%E9%80%89%E4%B8%AD.png"); | ||
| 55 | +} | ||
| 56 | +.disabled .picker .more{ | ||
| 57 | + background-image: url("http://nosqn.colorcun.com/custom/lite-yd/image/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20190925174046.png"); | ||
| 58 | +} | ||
| 59 | +.pages{ | ||
| 60 | + width: 100%; | ||
| 61 | + margin: 81rpx auto 0; | ||
| 62 | + color:#fff; | ||
| 63 | + font-size: 28rpx; | ||
| 64 | +} | ||
| 65 | +.follow { | ||
| 66 | + padding-top: 0; | ||
| 67 | + padding-bottom: 10rpx; | ||
| 68 | +} | ||
| 69 | +.follow .seller{ | ||
| 70 | + background-color: #ffffff; | ||
| 71 | + overflow: hidden; | ||
| 72 | + border-bottom: 20rpx solid #f5f5f5; | ||
| 73 | +} | ||
| 74 | +.follow .seller:last-child{ | ||
| 75 | + border-bottom: 20rpx solid #ffffff; | ||
| 76 | +} | ||
| 77 | +.nomore{ | ||
| 78 | + color: #999; | ||
| 79 | + font-size: 28rpx; | ||
| 80 | + width: calc(100% - 36rpx); | ||
| 81 | + margin: 0rpx auto 40rpx; | ||
| 82 | +} | ||
| 83 | +.hr{ | ||
| 84 | + height: 2rpx; | ||
| 85 | + width: 90%; | ||
| 86 | + margin: 19rpx auto 0; | ||
| 87 | +} | ||
| 88 | +.empty{margin-top: 151rpx; color: #353535} | ||
| 89 | +.empty image{ | ||
| 90 | + width: 191px; | ||
| 91 | + height: 158px; | ||
| 92 | +} | ||
| 93 | +.empty view{ | ||
| 94 | + font-size: 28rpx; | ||
| 95 | + margin-top: 60rpx; | ||
| 96 | +} | ||
| 97 | +.empty view.empry-info2{ | ||
| 98 | + margin-top: 20rpx; | ||
| 99 | +} | ||
| 100 | + | ||
| 101 | +.searchAddrView{ | ||
| 102 | + width: 100%; | ||
| 103 | + height: 70rpx; | ||
| 104 | + background-color: #ffffff; | ||
| 105 | + z-index: 9; | ||
| 106 | +} | ||
| 107 | +.searchAddr { | ||
| 108 | + width: 90%; | ||
| 109 | + height: 60rpx; | ||
| 110 | + background-color: #F5F5F5; | ||
| 111 | + border-radius: 30rpx; | ||
| 112 | + line-height: 60rpx; | ||
| 113 | + color:#999999; | ||
| 114 | + line-height: 60rpx; | ||
| 115 | + font-size: 28rpx; | ||
| 116 | + margin:0 auto; | ||
| 117 | +} | ||
| 118 | +.searchAddr .icon{ | ||
| 119 | + min-width: 32rpx; | ||
| 120 | + width:32rpx; | ||
| 121 | + height: 30rpx; | ||
| 122 | + margin: 0 20rpx; | ||
| 123 | +} | ||
| 124 | +.info-button{ | ||
| 125 | + width:140rpx; | ||
| 126 | + height:50rpx; | ||
| 127 | + background:rgba(192,163,105,1); | ||
| 128 | + border-radius:25rpx; | ||
| 129 | + font-size:24rpx; | ||
| 130 | + font-weight:500; | ||
| 131 | + color:rgba(255,255,255,1); | ||
| 132 | + line-height: 50rpx; | ||
| 133 | + margin-top: 42rpx; | ||
| 134 | +} | ||
| 135 | + | ||
| 136 | +.transverse-flxed{ | ||
| 137 | + position: fixed; | ||
| 138 | + bottom: 0; | ||
| 139 | + width: 100%; | ||
| 140 | + z-index: 99; | ||
| 141 | +} | ||
| 142 | +.line-push{ | ||
| 143 | + background-image: url("http://nosqn.colorcun.com/reserve/images/line-push.png"); | ||
| 144 | + width: 328rpx; | ||
| 145 | + height: 42rpx; | ||
| 146 | + background-size: 100% 24rpx; | ||
| 147 | + margin: 0 auto; | ||
| 148 | + font-size:30rpx; | ||
| 149 | + color: #C0A369; | ||
| 150 | + line-height: 24rpx; | ||
| 151 | + background-repeat: no-repeat; | ||
| 152 | + text-align: center; | ||
| 153 | +} | ||
| 154 | +.transverse-list{ | ||
| 155 | + background-color: #fefefe; | ||
| 156 | + margin-top: 20rpx; | ||
| 157 | +} | ||
| 158 | +.transverse-list .seller{ | ||
| 159 | + width: 98%; | ||
| 160 | + margin: 0 auto; | ||
| 161 | +} |
pages/reserve/index_yy.js
0 → 100644
| 1 | +// pages/reservr/index.js | ||
| 2 | +var mta = require('mta-wechat-analysis') | ||
| 3 | +import util from '../../utils/util'; | ||
| 4 | +import App from '../../utils/api'; | ||
| 5 | +import DA from './data'; | ||
| 6 | +import reddot from '../../utils/reddot'; | ||
| 7 | +import PubSub from '../../utils/PubSub' | ||
| 8 | +const {regeneratorRuntime} = global | ||
| 9 | +const mapScale=15//18; | ||
| 10 | +const barHeight=50; | ||
| 11 | +const transverseViewHeight=253+barHeight; | ||
| 12 | + | ||
| 13 | +const renNum=function(){ | ||
| 14 | + let arr=[] | ||
| 15 | + for(let i=1;i<=30;i++){ | ||
| 16 | + arr.push(i+'位') | ||
| 17 | + } | ||
| 18 | + return arr; | ||
| 19 | +} | ||
| 20 | +const cates_version='?1.2'; | ||
| 21 | +const hasSellerConcat=false;//变量存储所有商户 | ||
| 22 | +const def_latitude=39.684670; | ||
| 23 | +const def_longitude=118.176300; | ||
| 24 | +Page({ | ||
| 25 | + | ||
| 26 | + /** | ||
| 27 | + * 页面的初始数据 | ||
| 28 | + */ | ||
| 29 | + data: { | ||
| 30 | + map: { | ||
| 31 | + latitude: def_latitude+0.0001, | ||
| 32 | + longitude: def_longitude+0.0001, | ||
| 33 | + scale: mapScale, | ||
| 34 | + height: 300, | ||
| 35 | + }, | ||
| 36 | + markers: [], | ||
| 37 | + //polygons:{}, | ||
| 38 | + //sellers:[], | ||
| 39 | + multiArray: ['全部菜系'], | ||
| 40 | + multiIndex: [0], | ||
| 41 | + //scrollIntoView:'', | ||
| 42 | + suggestion:{}, | ||
| 43 | + hasSuggestion:false,//搜索返回 | ||
| 44 | + current:0, | ||
| 45 | + hasSellers:false, | ||
| 46 | + hasGetSellersEnd:false, | ||
| 47 | + hasSetActivity:false, | ||
| 48 | + tags:[ | ||
| 49 | + {id:1,name:'环境好'}, | ||
| 50 | + {id:2,name:'菜品有特色'}, | ||
| 51 | + {id:3,name:'超大包间'}, | ||
| 52 | + ], | ||
| 53 | + listMoreCount:0, | ||
| 54 | + hasSearchLimit:false, | ||
| 55 | + hasGetPos:false, | ||
| 56 | + }, | ||
| 57 | + hasClickMoveToLocation:false,//点击回到我的位置 | ||
| 58 | + hasSellerConcat:hasSellerConcat, | ||
| 59 | + transverseViewHeight:transverseViewHeight,//横向滚动高度,苹果要比安卓多20 | ||
| 60 | + //qqmapsdk:null, | ||
| 61 | + sellers: [], | ||
| 62 | + sellersIds:[], | ||
| 63 | + sellersNow:[],//本次视图内商户 | ||
| 64 | + searchAddrTop:50, | ||
| 65 | + user:{ | ||
| 66 | + latitude: def_latitude, | ||
| 67 | + longitude: def_longitude, | ||
| 68 | + }, | ||
| 69 | + /** | ||
| 70 | + * 生命周期函数--监听页面加载 | ||
| 71 | + */ | ||
| 72 | + hasOnLoad:false, | ||
| 73 | + hasGetLocation:false,//定位信息 | ||
| 74 | + hasAppHide:false,//app切至后台 | ||
| 75 | + param:{}, | ||
| 76 | + onLoad: async function (options) { | ||
| 77 | + this.reportTime=new Date() | ||
| 78 | + | ||
| 79 | + this.hasOnLoad=true; | ||
| 80 | + // this.qqmapsdk=new QQMapWX({ | ||
| 81 | + // key: 'SDEBZ-I74W4-QLGUX-XXYXU-HIR23-3QFBJ' | ||
| 82 | + // }); | ||
| 83 | + this.setData({ | ||
| 84 | + multiArray:[['全部菜系'].concat(await DA.getCates())] | ||
| 85 | + }) | ||
| 86 | + mta.Page.init({ | ||
| 87 | + "appID": "500667280", | ||
| 88 | + "eventID": "500667287", | ||
| 89 | + "statPullDownFresh": true, | ||
| 90 | + "statShareApp": true, | ||
| 91 | + "statReachBottom": true, | ||
| 92 | + "lauchOpts": options, //渠道分析 | ||
| 93 | + }); | ||
| 94 | + PubSub.on( | ||
| 95 | + 'searchParam', | ||
| 96 | + data=>{ | ||
| 97 | + console.log('searchParam.msg',data) | ||
| 98 | + if(data.fun=='tagsChange'){ | ||
| 99 | + this.tagsChange(data.e); | ||
| 100 | + } | ||
| 101 | + if(data.fun=='caixiActive'){ | ||
| 102 | + this.caixiActive(data.e); | ||
| 103 | + } | ||
| 104 | + } | ||
| 105 | + ) | ||
| 106 | + PubSub.on( | ||
| 107 | + 'appHide', | ||
| 108 | + data=>{ | ||
| 109 | + console.log('appHide'); | ||
| 110 | + let pages=getCurrentPages(); | ||
| 111 | + if(pages.length==1){//用户停留在首页 | ||
| 112 | + this.hasGetLocation=false | ||
| 113 | + this.hasClickMoveToLocation=false | ||
| 114 | + this.hasAppHide=true | ||
| 115 | + } | ||
| 116 | + } | ||
| 117 | + ) | ||
| 118 | + reddot.init() | ||
| 119 | + }, | ||
| 120 | + | ||
| 121 | + /** | ||
| 122 | + * 生命周期函数--监听页面初次渲染完成 | ||
| 123 | + */ | ||
| 124 | + mapCtx: null, | ||
| 125 | + mapData:{ | ||
| 126 | + lat:'', | ||
| 127 | + lng:'', | ||
| 128 | + latitude: 0, | ||
| 129 | + longitude: 0, | ||
| 130 | + scale: 18, | ||
| 131 | + hasRegionchange:false, | ||
| 132 | + region:{ | ||
| 133 | + southwest:{}, | ||
| 134 | + northeast:{}, | ||
| 135 | + }, | ||
| 136 | + }, | ||
| 137 | + mapDataLast:null,//最后一次成功视角,防止地图视角丢失 | ||
| 138 | + onReady: function () { | ||
| 139 | + if (wx.canIUse('reportPerformance')) { | ||
| 140 | + wx.reportPerformance(2002, new Date()-this.reportTime) | ||
| 141 | + } | ||
| 142 | + this.mapCtx = wx.createMapContext('map') | ||
| 143 | + // this.mapCtx.moveToLocation({ | ||
| 144 | + // success:(res)=>{ | ||
| 145 | + // console.log('moveToLocation',res) | ||
| 146 | + // } | ||
| 147 | + // }) | ||
| 148 | + }, | ||
| 149 | + /** | ||
| 150 | + * 生命周期函数--监听页面显示 | ||
| 151 | + */ | ||
| 152 | + onShow: async function (e) { | ||
| 153 | + if (typeof this.getTabBar === 'function' && | ||
| 154 | + this.getTabBar()) { | ||
| 155 | + this.getTabBar().setData({ | ||
| 156 | + selected: 0 | ||
| 157 | + }) | ||
| 158 | + } | ||
| 159 | + console.log({ | ||
| 160 | + 'this.hasGetLocation':this.hasGetLocation, | ||
| 161 | + 'this.hasOnLoad':this.hasOnLoad, | ||
| 162 | + 'this.hasClickMoveToLocation':this.hasClickMoveToLocation, | ||
| 163 | + 'this.data.hasSuggestion':this.data.hasSuggestion, | ||
| 164 | + }) | ||
| 165 | + this.getClassNameFlag=true; | ||
| 166 | + //this.getPos(); | ||
| 167 | + if(this.data.hasSuggestion) return; | ||
| 168 | + if(!this.hasOnLoad && this.hasGetLocation) return; | ||
| 169 | + this.hasOnLoad=false; | ||
| 170 | + //导航栏自适应 | ||
| 171 | + let systemInfo = wx.getSystemInfoSync(); | ||
| 172 | + console.log('systemInfo:',systemInfo) | ||
| 173 | + let reg = /ios/i; | ||
| 174 | + let pt = 20;//导航状态栏上内边距 | ||
| 175 | + let h = 44;//导航状态栏高度 | ||
| 176 | + if(reg.test(systemInfo.system)){ | ||
| 177 | + pt = systemInfo.statusBarHeight; | ||
| 178 | + h = 44; | ||
| 179 | + if(systemInfo.pixelRatio>2){ | ||
| 180 | + this.transverseViewHeight=transverseViewHeight+26; | ||
| 181 | + } | ||
| 182 | + }else{ | ||
| 183 | + if(/xiaomi/i.test(systemInfo.brand)){ | ||
| 184 | + this.transverseViewHeight=transverseViewHeight+15; | ||
| 185 | + }else{ | ||
| 186 | + //this.transverseViewHeight=transverseViewHeight+20; | ||
| 187 | + } | ||
| 188 | + pt = systemInfo.statusBarHeight; | ||
| 189 | + h = 48; | ||
| 190 | + } | ||
| 191 | + console.log('onShow',systemInfo,systemInfo.windowHeight,systemInfo.windowHeight-this.transverseViewHeight) | ||
| 192 | + this.setData({ | ||
| 193 | + [`map.height`]: systemInfo.windowHeight-this.transverseViewHeight, | ||
| 194 | + statusBarHeight: pt, | ||
| 195 | + titleBarHeight:h, | ||
| 196 | + }) | ||
| 197 | + //this.getPos(systemInfo); | ||
| 198 | + this.systemInfo=systemInfo | ||
| 199 | + //this.selectComponent('#getpos').getPos(); | ||
| 200 | + if(!this.hasClickMoveToLocation){ | ||
| 201 | + //this.getMarkers(); | ||
| 202 | + //this.timeoutGetMarkers(); | ||
| 203 | + } | ||
| 204 | + | ||
| 205 | + }, | ||
| 206 | + | ||
| 207 | + /** | ||
| 208 | + * 生命周期函数--监听页面隐藏 | ||
| 209 | + */ | ||
| 210 | + onHide: function (e) { | ||
| 211 | + util.elog(null,'离开地图页') | ||
| 212 | + }, | ||
| 213 | + | ||
| 214 | + /** | ||
| 215 | + * 生命周期函数--监听页面卸载 | ||
| 216 | + */ | ||
| 217 | + onUnload: function () { | ||
| 218 | + PubSub.off('searchParam') | ||
| 219 | + PubSub.off('appHide') | ||
| 220 | + }, | ||
| 221 | + | ||
| 222 | + /** | ||
| 223 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
| 224 | + */ | ||
| 225 | + onPullDownRefresh: function () { | ||
| 226 | + | ||
| 227 | + }, | ||
| 228 | + | ||
| 229 | + /** | ||
| 230 | + * 页面上拉触底事件的处理函数 | ||
| 231 | + */ | ||
| 232 | + onReachBottom: function () { | ||
| 233 | + | ||
| 234 | + }, | ||
| 235 | + | ||
| 236 | + /** | ||
| 237 | + * 用户点击右上角分享 | ||
| 238 | + */ | ||
| 239 | + onShareAppMessage: function () { | ||
| 240 | + return{ | ||
| 241 | + title:'请客订包间,就上周到安排' | ||
| 242 | + } | ||
| 243 | + }, | ||
| 244 | + onpos(e){ | ||
| 245 | + console.log('onpos',e); | ||
| 246 | + let res=e.detail; | ||
| 247 | + if(!res.latitude) return this.timeoutGetMarkers(); | ||
| 248 | + this.hasGetLocation=true; | ||
| 249 | + this.sellersIds=[] | ||
| 250 | + this.sellers=[] | ||
| 251 | + let map = this.data.map; | ||
| 252 | + map.latitude = res.latitude; | ||
| 253 | + map.longitude = res.longitude; | ||
| 254 | + map.scale=mapScale; | ||
| 255 | + this.user.latitude = res.latitude; | ||
| 256 | + this.user.longitude = res.longitude; | ||
| 257 | + map.height = this.systemInfo.windowHeight-this.transverseViewHeight | ||
| 258 | + let sdobj={ | ||
| 259 | + map: map, | ||
| 260 | + hasSuggestion:false, | ||
| 261 | + } | ||
| 262 | + if(!this.hasSellerConcat){ | ||
| 263 | + sdobj.markers=[] | ||
| 264 | + } | ||
| 265 | + this.setData(sdobj) | ||
| 266 | + this.timeoutGetMarkers() | ||
| 267 | + /* | ||
| 268 | + if(this.mapCtx){ | ||
| 269 | + //this.mapCtx.moveToLocation(); | ||
| 270 | + this.mapCtx.getRegion({ | ||
| 271 | + success:(res)=>{ | ||
| 272 | + console.log('onpos.getRegion',res) | ||
| 273 | + if(this.mapData.region.southwest.latitude) { | ||
| 274 | + this.mapData.region = res | ||
| 275 | + this.timeoutGetMarkers() | ||
| 276 | + } | ||
| 277 | + }, | ||
| 278 | + }) | ||
| 279 | + } | ||
| 280 | + */ | ||
| 281 | + }, | ||
| 282 | + regionchange(e){ | ||
| 283 | + if(e.type!='end') return; | ||
| 284 | + console.log('regionchange', e) | ||
| 285 | + if(typeof this.mapCtx=='undefined' || !this.mapCtx) return; | ||
| 286 | + this.getClassNameFlag=true; | ||
| 287 | + this.mapCtx.getScale({ | ||
| 288 | + success: (res) => { | ||
| 289 | + this.mapData.scale = res.scale; | ||
| 290 | + console.log('regionchange.getScale', res, this.data.map.scale) | ||
| 291 | + }, | ||
| 292 | + }) | ||
| 293 | + this.mapCtx.getCenterLocation({ | ||
| 294 | + success:(res)=>{ | ||
| 295 | + console.log('regionchange.getCenterLocation',res) | ||
| 296 | + this.mapData.latitude=res.latitude; | ||
| 297 | + this.mapData.longitude=res.longitude; | ||
| 298 | + if(this.mapData.lat=='' && res.latitude.toString().length>6 && res.longitude.toString().length>6){ | ||
| 299 | + this.mapData.lat=res.latitude; | ||
| 300 | + this.mapData.lng=res.longitude; | ||
| 301 | + } | ||
| 302 | + }, | ||
| 303 | + }); | ||
| 304 | + this.mapCtx.getRegion({ | ||
| 305 | + success:(res)=>{ | ||
| 306 | + console.log('regionchange.getRegion',res.southwest.latitude,this.mapData.region.southwest.latitude,res) | ||
| 307 | + this.hasClickMoveToLocation=false | ||
| 308 | + if(res.southwest.latitude) { | ||
| 309 | + this.mapData.region = res | ||
| 310 | + }; | ||
| 311 | + this.timeoutGetMarkers(); | ||
| 312 | + }, | ||
| 313 | + }) | ||
| 314 | + }, | ||
| 315 | + setTimeoutGetMarkers:'', | ||
| 316 | + timeoutGetMarkers(){//延时获取 | ||
| 317 | + if(this.setTimeoutGetMarkers){ | ||
| 318 | + clearTimeout(this.setTimeoutGetMarkers); | ||
| 319 | + this.setTimeoutGetMarkers=''; | ||
| 320 | + } | ||
| 321 | + this.setTimeoutGetMarkers=setTimeout(()=>{ | ||
| 322 | + this.getMarkers(); | ||
| 323 | + },300) | ||
| 324 | + }, | ||
| 325 | + mapUpdated(e){ | ||
| 326 | + console.log('mapUpdated', e) | ||
| 327 | + if(typeof this.mapCtx=='undefined' || !this.mapCtx) return; | ||
| 328 | + this.getClassNameFlag=true; | ||
| 329 | + this.mapCtx.getScale({ | ||
| 330 | + success:(res)=>{ | ||
| 331 | + this.mapData.scale=res.scale; | ||
| 332 | + console.log('mapUpdated.getScale',res,this.data.map.scale) | ||
| 333 | + }, | ||
| 334 | + }) | ||
| 335 | + this.mapCtx.getCenterLocation({ | ||
| 336 | + success:(res)=>{ | ||
| 337 | + console.log('mapUpdated.getCenterLocation',res) | ||
| 338 | + this.mapData.latitude=res.latitude; | ||
| 339 | + this.mapData.longitude=res.longitude; | ||
| 340 | + if(this.mapData.lat=='' && res.latitude.toString().length>6 && res.longitude.toString().length>6){ | ||
| 341 | + this.mapData.lat=res.latitude; | ||
| 342 | + this.mapData.lng=res.longitude; | ||
| 343 | + } | ||
| 344 | + }, | ||
| 345 | + }); | ||
| 346 | + this.mapCtx.getRegion({ | ||
| 347 | + success:(res)=>{ | ||
| 348 | + if(this.mapData.region.southwest.latitude=='' || !res.southwest.latitude) return; | ||
| 349 | + console.log('mapUpdated.getRegion',[res.southwest.latitude,this.mapData.region.southwest.latitude]) | ||
| 350 | + this.mapData.region=res | ||
| 351 | + //this.timeoutGetMarkers(); | ||
| 352 | + }, | ||
| 353 | + }) | ||
| 354 | + }, | ||
| 355 | + hasMarkertap:false, | ||
| 356 | + markertap(e,flag=true){ | ||
| 357 | + if(e.markerId=='location' || e.markerId=='locationMe')return; | ||
| 358 | + this.hasMarkertap=false | ||
| 359 | + let markers=this.data.markers; | ||
| 360 | + console.log('markertap',e) | ||
| 361 | + this.activeSellerID=e.markerId | ||
| 362 | + let bl=1.2; | ||
| 363 | + let current=0,hasCurrent=true; | ||
| 364 | + markers.forEach((m,i)=>{ | ||
| 365 | + m.iconPath=m.iconPath.replace('/cates-active/','/cates/') | ||
| 366 | + m.zIndex=m.zIndexBak | ||
| 367 | + if(m.width==20*bl){ | ||
| 368 | + m.width=20; | ||
| 369 | + m.height=25; | ||
| 370 | + } | ||
| 371 | + if(m.width==12){ | ||
| 372 | + m.width=8; | ||
| 373 | + m.height=8; | ||
| 374 | + } | ||
| 375 | + if(m.callout){ | ||
| 376 | + m.callout.borderColor= '#cccccc'; | ||
| 377 | + m.callout.bgColor= '#fefefe'; | ||
| 378 | + m.callout.color= '#353535'; | ||
| 379 | + m.callout.display=m.calloutDisplay; | ||
| 380 | + } | ||
| 381 | + if(m.id==e.markerId){ | ||
| 382 | + m.iconPath=m.iconPath.replace('/cates/','/cates-active/') | ||
| 383 | + if(m.width==20){ | ||
| 384 | + m.width=20*bl; | ||
| 385 | + m.height=25*bl; | ||
| 386 | + }else{ | ||
| 387 | + m.width=12; | ||
| 388 | + m.height=12; | ||
| 389 | + } | ||
| 390 | + m.zIndex=9999 | ||
| 391 | + if(m.callout){ | ||
| 392 | + m.callout.borderColor= '#F05522'; | ||
| 393 | + m.callout.bgColor= '#F05522'; | ||
| 394 | + m.callout.color= '#fefefe'; | ||
| 395 | + m.callout.display='ALWAYS'; | ||
| 396 | + } | ||
| 397 | + hasCurrent=false | ||
| 398 | + if("markertap"==e.type){ | ||
| 399 | + util.elog({id:m.seller.id,sellername:m.seller.sellername},'点击地图区域的店铺标记') | ||
| 400 | + } | ||
| 401 | + | ||
| 402 | + } | ||
| 403 | + if(m.display!='none' && hasCurrent){ | ||
| 404 | + current++ | ||
| 405 | + } | ||
| 406 | + }) | ||
| 407 | + let obj={ | ||
| 408 | + markers:markers, | ||
| 409 | + }; | ||
| 410 | + console.log('markertap::current,',current); | ||
| 411 | + if(flag){ | ||
| 412 | + //obj.scrollIntoView='seller-'+e.markerId; | ||
| 413 | + obj.current=current; | ||
| 414 | + //this.hasMarkertap=true; | ||
| 415 | + } | ||
| 416 | + this.setData(obj) | ||
| 417 | + }, | ||
| 418 | + hasInRegionFlag:false, | ||
| 419 | + hasInRegion(){//定位是否在地图视野内 | ||
| 420 | + let map = this.mapData; | ||
| 421 | + if(!map.region.northeast.latitude || !map.region.northeast.longitude) {//未获得视野 | ||
| 422 | + if(this.mapDataLast){ | ||
| 423 | + this.mapData=this.mapDataLast | ||
| 424 | + } | ||
| 425 | + return {flag:false,msg:'未获得视野',map:map,mapDataLast:this.mapDataLast}; | ||
| 426 | + } | ||
| 427 | + if(!map.region.southwest.latitude || !map.region.southwest.longitude) {//未获得视野 | ||
| 428 | + if(this.mapDataLast){ | ||
| 429 | + this.mapData=this.mapDataLast | ||
| 430 | + } | ||
| 431 | + return {flag:false,msg:'未获得视野',map:map,mapDataLast:this.mapDataLast}; | ||
| 432 | + } | ||
| 433 | + this.mapDataLast=JSON.parse(JSON.stringify(this.mapData)); | ||
| 434 | + if(this.hasInRegionFlag) return {flag:true,msg:'二次获取'}; | ||
| 435 | + if(!this.user.latitude) return {flag:false,msg:'用户无定位'};//用户无定位 | ||
| 436 | + //if(this.user.latitude==def_latitude && this.user.longitude==def_longitude) return false;//默认位置 | ||
| 437 | + ///判断定位 首次 进入视野 | ||
| 438 | + if((this.user.latitude>map.region.southwest.latitude | ||
| 439 | + && this.user.longitude>map.region.southwest.longitude | ||
| 440 | + && this.user.latitude<map.region.northeast.latitude | ||
| 441 | + && this.user.longitude<map.region.northeast.longitude) || this.data.hasSuggestion){ | ||
| 442 | + this.hasInRegionFlag=true; | ||
| 443 | + return {flag:true,msg:'用户首次或搜索地标'}; | ||
| 444 | + }else{ | ||
| 445 | + //视野不匹配 | ||
| 446 | + this.mapCtx.getRegion({ | ||
| 447 | + success:(res)=>{ | ||
| 448 | + console.log('hasInRegion.getRegion',res) | ||
| 449 | + this.mapData.region=res | ||
| 450 | + }, | ||
| 451 | + }) | ||
| 452 | + } | ||
| 453 | + return {flag:false,msg:'视野不匹配'}; | ||
| 454 | + }, | ||
| 455 | + async getMarkers(){ | ||
| 456 | + let cmap=this.data.map; | ||
| 457 | + let map = this.mapData; | ||
| 458 | + //console.log('getMarkers',map.region); | ||
| 459 | + let region=this.hasInRegion(); | ||
| 460 | + console.log('this.hasInRegion',region) | ||
| 461 | + if(!region.flag) { | ||
| 462 | + return setTimeout(()=>{ | ||
| 463 | + this.getMarkers(); | ||
| 464 | + },300) | ||
| 465 | + } | ||
| 466 | + let markers = []; | ||
| 467 | + let param={ | ||
| 468 | + lat: this.user.latitude==def_latitude?'':this.user.latitude, | ||
| 469 | + lng: this.user.longitude==def_longitude?'':this.user.longitude, | ||
| 470 | + offset: 0, | ||
| 471 | + rows: 50, | ||
| 472 | + distance: 100000, | ||
| 473 | + map:JSON.stringify({...this.mapData.region,scale:this.mapData.scale>=19?20:this.mapData.scale}) | ||
| 474 | + } | ||
| 475 | + if(this.data.multiIndex[0]>0){ | ||
| 476 | + param.cuisine=await DA.getCatesID(this.data.multiIndex[0]-1); | ||
| 477 | + } | ||
| 478 | + let tags=[]; | ||
| 479 | + this.data.tags.forEach(t=>{ | ||
| 480 | + if(t.active){ | ||
| 481 | + tags.push(t.id) | ||
| 482 | + } | ||
| 483 | + }) | ||
| 484 | + if(tags.length>0){ | ||
| 485 | + param.tags=tags; | ||
| 486 | + } | ||
| 487 | + if(param.lat){ | ||
| 488 | + param.centre_pos=`${param.lat},${param.lng}` | ||
| 489 | + }else{ | ||
| 490 | + let lat=(this.mapData.region.southwest.latitude+this.mapData.region.northeast.latitude)/2 | ||
| 491 | + let lng=(this.mapData.region.southwest.longitude+this.mapData.region.northeast.longitude)/2 | ||
| 492 | + param.centre_pos=`${lat},${lng}` | ||
| 493 | + } | ||
| 494 | + if(this.data.hasSuggestion){ | ||
| 495 | + param.centre_pos=`${this.data.suggestion.latitude},${this.data.suggestion.longitude}` | ||
| 496 | + } | ||
| 497 | + if(this.findSellerData){ | ||
| 498 | + param=Object.assign(param,this.findSellerData.paramObj) | ||
| 499 | + } | ||
| 500 | + this.selectComponent('#list').getList(param); | ||
| 501 | + this.param=param; | ||
| 502 | + let now_sid=[]; | ||
| 503 | + App.Customer.SellerList(param).then(async res => { | ||
| 504 | + //this.mapData.region.southwest.latitude=''; | ||
| 505 | + if (res.ret == 200) { | ||
| 506 | + let sellersList=res.data; | ||
| 507 | + let sellersLength=sellersList.length; | ||
| 508 | + sellersList.forEach((seller,si) => { | ||
| 509 | + now_sid.push(seller.id); | ||
| 510 | + let hasMark=false; | ||
| 511 | + if(this.sellersIds._indexOf(seller.id)<0){ | ||
| 512 | + // if(seller.distance || seller.distance===0){ | ||
| 513 | + // seller.distance=parseInt(seller.distance); | ||
| 514 | + // if(seller.distance>1000){ | ||
| 515 | + // seller.distance=(seller.distance/1000).toFixed(2)+'km' | ||
| 516 | + // }else{ | ||
| 517 | + // seller.distance+='m'; | ||
| 518 | + // } | ||
| 519 | + // } | ||
| 520 | + if(this.hasSellerConcat){ | ||
| 521 | + this.sellersIds.push(seller.id); | ||
| 522 | + } | ||
| 523 | + hasMark=true; | ||
| 524 | + } | ||
| 525 | + if(hasMark){ | ||
| 526 | + if(this.findSellerData){ | ||
| 527 | + seller.findSellerParamObj=this.findSellerData.paramObj | ||
| 528 | + } | ||
| 529 | + let marker={ | ||
| 530 | + id: seller.id, | ||
| 531 | + iconPath: "http://nosqn.colorcun.com/custom/lite-online/cates/circle1x5.png"+cates_version, | ||
| 532 | + latitude: seller.lat, | ||
| 533 | + longitude: seller.long, | ||
| 534 | + width: 8, | ||
| 535 | + height: 8, | ||
| 536 | + //title:seller.seller_name, | ||
| 537 | + zIndex:sellersLength-si, | ||
| 538 | + zIndexBak:sellersLength-si, | ||
| 539 | + seller:seller, | ||
| 540 | + }; | ||
| 541 | + marker.callout={ | ||
| 542 | + content: ' ' + seller.sellername + ' ', | ||
| 543 | + color: '#353535', | ||
| 544 | + fontSize: 12, | ||
| 545 | + borderWidth: 1, | ||
| 546 | + borderColor: '#cccccc', | ||
| 547 | + borderRadius: 50, | ||
| 548 | + bgColor: '#fefefe', | ||
| 549 | + padding: 5, | ||
| 550 | + textAlign: 'left', | ||
| 551 | + display:'BYCLICK', | ||
| 552 | + }; | ||
| 553 | + marker.calloutDisplay='BYCLICK'; | ||
| 554 | + if(seller.mode.length>0){ | ||
| 555 | + seller.mode.forEach(x=>{ | ||
| 556 | + if(x.id==1){//大图标 | ||
| 557 | + marker.iconPath="http://nosqn.colorcun.com/custom/lite-online/cates/其他菜品.png"; | ||
| 558 | + if(seller.cate.length>0){ | ||
| 559 | + marker.iconPath=seller.cate[0].icon | ||
| 560 | + } | ||
| 561 | + marker.iconPath=marker.iconPath.replace(/\/cates\/(.*)\.png/,function ($0,$1) { | ||
| 562 | + return '/cates/'+encodeURI($1)+'.png' | ||
| 563 | + }) | ||
| 564 | + marker.iconPath+=cates_version | ||
| 565 | + marker.width=20; | ||
| 566 | + marker.height=25; | ||
| 567 | + } | ||
| 568 | + if(x.id==2){//商家名 | ||
| 569 | + marker.callout.display='ALWAYS'; | ||
| 570 | + marker.calloutDisplay='ALWAYS'; | ||
| 571 | + } | ||
| 572 | + }) | ||
| 573 | + } | ||
| 574 | + markers.push(marker) | ||
| 575 | + } | ||
| 576 | + }) | ||
| 577 | + } else { | ||
| 578 | + console.log('接口报错了'); | ||
| 579 | + } | ||
| 580 | + this.sellersNow=now_sid; | ||
| 581 | + let obj={ | ||
| 582 | + hasSellers:now_sid.length>0, | ||
| 583 | + hasGetSellersEnd:true, | ||
| 584 | + hasSearchLimit:(tags.length>0 || this.data.multiIndex[0]>0) || this.findSellerData | ||
| 585 | + } | ||
| 586 | + if(this.hasSellerConcat){ | ||
| 587 | + obj.markers=this.data.markers.concat(markers); | ||
| 588 | + }else{ | ||
| 589 | + obj.markers=markers; | ||
| 590 | + } | ||
| 591 | + obj.markers.forEach(mk=>{ | ||
| 592 | + //mk.display='none'; | ||
| 593 | + if(now_sid._indexOf(mk.id)>-1){ | ||
| 594 | + mk.display=''; | ||
| 595 | + } | ||
| 596 | + }) | ||
| 597 | + obj.markers=await this.setLocationMarker(obj.markers); | ||
| 598 | + this.setData(obj) | ||
| 599 | + if(now_sid.length>0) { | ||
| 600 | + setTimeout(() => { | ||
| 601 | + this.markertap({ | ||
| 602 | + markerId: now_sid._indexOf(this.activeSellerID) < 0?now_sid[0]:this.activeSellerID | ||
| 603 | + }, true) | ||
| 604 | + }, 100) | ||
| 605 | + } | ||
| 606 | + this.IsSetActivity(); | ||
| 607 | + }) | ||
| 608 | + | ||
| 609 | + }, | ||
| 610 | + //seller box 通知 | ||
| 611 | + sellerBoxEvent(e){ | ||
| 612 | + wx.showTabBar(); | ||
| 613 | + }, | ||
| 614 | + moveToLocation(){ | ||
| 615 | + this.hasClickMoveToLocation=true | ||
| 616 | + if(this.user.latitude==def_latitude && this.user.longitude==def_longitude){ | ||
| 617 | + this.selectComponent('#getpos').getPos(true); | ||
| 618 | + return; | ||
| 619 | + } | ||
| 620 | + this.sellersIds=[] | ||
| 621 | + this.sellers=[] | ||
| 622 | + let map = this.data.map; | ||
| 623 | + map.latitude = this.user.latitude; | ||
| 624 | + map.longitude = this.user.longitude; | ||
| 625 | + map.scale=mapScale; | ||
| 626 | + map.height = this.systemInfo.windowHeight-this.transverseViewHeight | ||
| 627 | + let sdobj={ | ||
| 628 | + map: map, | ||
| 629 | + hasSuggestion:false, | ||
| 630 | + hasGetSellersEnd:false, | ||
| 631 | + } | ||
| 632 | + if(!this.hasSellerConcat){ | ||
| 633 | + sdobj.markers=[] | ||
| 634 | + } | ||
| 635 | + this.setData(sdobj) | ||
| 636 | + this.mapCtx.moveToLocation({ | ||
| 637 | + success:(res)=>{ | ||
| 638 | + console.log('moveToLocation',res) | ||
| 639 | + } | ||
| 640 | + }) | ||
| 641 | + }, | ||
| 642 | + bindMultiPickerChange(e){ | ||
| 643 | + console.log(e); | ||
| 644 | + let val=util.val(e); | ||
| 645 | + this.setData({ | ||
| 646 | + multiIndex:val | ||
| 647 | + }) | ||
| 648 | + this.hasSellerConcat=hasSellerConcat; | ||
| 649 | + this.sellersIds=[]; | ||
| 650 | + if(val[0]>0){ | ||
| 651 | + this.hasSellerConcat=false; | ||
| 652 | + }else{ | ||
| 653 | + if(!this.hasSellerConcat){ | ||
| 654 | + this.setData({ | ||
| 655 | + markers:[] | ||
| 656 | + }) | ||
| 657 | + } | ||
| 658 | + } | ||
| 659 | + setTimeout(()=>{this.getMarkers();},0) | ||
| 660 | + }, | ||
| 661 | + setSuggestion(suggestion){ | ||
| 662 | + let map=this.data.map; | ||
| 663 | + //let pos=DA.gcj02towgs84(suggestion.longitude,suggestion.latitude) | ||
| 664 | + map.latitude=suggestion.latitude | ||
| 665 | + map.longitude=suggestion.longitude | ||
| 666 | + if(suggestion.type==-1){//平台商户 | ||
| 667 | + this.activeSellerID=suggestion.id | ||
| 668 | + map.scale=20 | ||
| 669 | + }else{ | ||
| 670 | + map.scale=mapScale | ||
| 671 | + } | ||
| 672 | + this.sellersIds=[] | ||
| 673 | + this.sellers=[] | ||
| 674 | + let sdobj={ | ||
| 675 | + map: map, | ||
| 676 | + hasSuggestion:true, | ||
| 677 | + suggestion:suggestion, | ||
| 678 | + hasGetSellersEnd:false, | ||
| 679 | + } | ||
| 680 | + if(!this.hasSellerConcat){ | ||
| 681 | + sdobj.markers=[] | ||
| 682 | + } | ||
| 683 | + //this.findSellerData=null//清理搜索 | ||
| 684 | + this.setData(sdobj) | ||
| 685 | + }, | ||
| 686 | + | ||
| 687 | + getClassNameFlag:true, | ||
| 688 | + activeSellerID:'', | ||
| 689 | + bindscroll(e){ | ||
| 690 | + if(!this.getClassNameFlag) return; | ||
| 691 | + this.getClassNameFlag=false; | ||
| 692 | + let w=e.detail.scrollWidth/this.sellers.length; | ||
| 693 | + let i=Math.round(e.detail.scrollLeft/w); | ||
| 694 | + console.log(e.detail,this.sellers,i); | ||
| 695 | + if(this.activeSellerID!=this.sellers[i].id){ | ||
| 696 | + this.activeSellerID=this.sellers[i]; | ||
| 697 | + this.markertap({ | ||
| 698 | + markerId:this.sellers[i].id | ||
| 699 | + },false) | ||
| 700 | + } | ||
| 701 | + let that=this; | ||
| 702 | + setTimeout(function(){ | ||
| 703 | + that.getClassNameFlag=true; | ||
| 704 | + },300) | ||
| 705 | + }, | ||
| 706 | + bindtransition(e){ | ||
| 707 | + if(this.hasMarkertap){ | ||
| 708 | + this.hasMarkertap=false; | ||
| 709 | + return; | ||
| 710 | + } | ||
| 711 | + let i=e.detail.current | ||
| 712 | + if(typeof this.data.markers[i]=='undefined') return; | ||
| 713 | + this.activeSellerID=this.data.markers[i].id | ||
| 714 | + console.log('bindtransition',this.sellersNow,e.detail.current,this.sellersNow[e.detail.current],this.activeSellerID); | ||
| 715 | + // this.activeSellerID=this.sellersNow[i]; | ||
| 716 | + // this.markertap({ | ||
| 717 | + // markerId:this.activeSellerID | ||
| 718 | + // },false) | ||
| 719 | + this.markertap({ | ||
| 720 | + markerId:this.activeSellerID | ||
| 721 | + },false) | ||
| 722 | + }, | ||
| 723 | + gotoDetail(e){ | ||
| 724 | + wx.navigateTo({ | ||
| 725 | + url:'/pages/reserve/detail?id='+util.attr(e,'sid') | ||
| 726 | + }) | ||
| 727 | + util.elog({sid:util.attr(e,'sid')},'点击橱窗中的商家,进入店铺详情') | ||
| 728 | + }, | ||
| 729 | + IsSetActivity(){ | ||
| 730 | + let cmap=this.data.map; | ||
| 731 | + App.Customer.IsSetActivity({lat:cmap.latitude,lng:cmap.longitude,distance:50}).then(res=>{ | ||
| 732 | + this.setData({ | ||
| 733 | + hasSetActivity:res.data==1, | ||
| 734 | + }) | ||
| 735 | + }) | ||
| 736 | + }, | ||
| 737 | + a2lshow(e){ | ||
| 738 | + //console.log('a2lshow',e) | ||
| 739 | + let ds=this.selectComponent('#ds'); | ||
| 740 | + if(!ds){ | ||
| 741 | + return setTimeout(()=>{ | ||
| 742 | + this.a2lshow(e) | ||
| 743 | + },500) | ||
| 744 | + } | ||
| 745 | + ds.setA2LHeight(e.type=='hide'?0:40); | ||
| 746 | + }, | ||
| 747 | + async setMapRegion(){ | ||
| 748 | + return new Promise((success,fail)=>{ | ||
| 749 | + if(this.mapCtx){ | ||
| 750 | + this.mapCtx.getRegion({ | ||
| 751 | + success:(res)=>{ | ||
| 752 | + if(res.southwest.latitude) { | ||
| 753 | + this.mapData.region = res | ||
| 754 | + success() | ||
| 755 | + } | ||
| 756 | + }, | ||
| 757 | + fail:()=>{ | ||
| 758 | + fail() | ||
| 759 | + } | ||
| 760 | + }) | ||
| 761 | + }else{ | ||
| 762 | + fail() | ||
| 763 | + } | ||
| 764 | + }) | ||
| 765 | + }, | ||
| 766 | + async setLocationMarker(markers){ | ||
| 767 | + try{ | ||
| 768 | + await this.setMapRegion(); | ||
| 769 | + }catch (e){ | ||
| 770 | + this.timeoutGetMarkers() | ||
| 771 | + return [] | ||
| 772 | + } | ||
| 773 | + | ||
| 774 | + let map = this.mapData; | ||
| 775 | + let mks=[] | ||
| 776 | + let matchPosNum=1 | ||
| 777 | + if(markers.length>0){ | ||
| 778 | + markers.forEach(mk=>{ | ||
| 779 | + if(mk.id!='location' && mk.id!='locationMe' | ||
| 780 | + && mk.latitude>map.region.southwest.latitude | ||
| 781 | + && mk.longitude>map.region.southwest.longitude | ||
| 782 | + && mk.latitude<map.region.northeast.latitude | ||
| 783 | + && mk.longitude<map.region.northeast.longitude){ | ||
| 784 | + mks.push(mk); | ||
| 785 | + } | ||
| 786 | + }) | ||
| 787 | + } | ||
| 788 | + if(mks.length-markers.length<0){ | ||
| 789 | + this.timeoutGetMarkers() | ||
| 790 | + return [] | ||
| 791 | + } | ||
| 792 | + | ||
| 793 | + if(this.data.hasSuggestion){ | ||
| 794 | + map=this.data.suggestion | ||
| 795 | + mks.push({ | ||
| 796 | + id: 'location', | ||
| 797 | + iconPath: "http://nosqn.colorcun.com/reserve/images/location.png"+cates_version, | ||
| 798 | + latitude: map.latitude, | ||
| 799 | + longitude: map.longitude, | ||
| 800 | + width: 20, | ||
| 801 | + height: 25, | ||
| 802 | + }) | ||
| 803 | + } | ||
| 804 | + mks.push({ | ||
| 805 | + id: 'locationMe', | ||
| 806 | + iconPath: "http://nosqn.colorcun.com/reserve/images/lme.png"+cates_version, | ||
| 807 | + latitude: this.user.latitude, | ||
| 808 | + longitude: this.user.longitude, | ||
| 809 | + width: 18, | ||
| 810 | + height: 30, | ||
| 811 | + }) | ||
| 812 | + return mks; | ||
| 813 | + }, | ||
| 814 | + tagsChange(e){ | ||
| 815 | + if(this.data.listMoreCount<1 && !this.data.hasSearchLimit) return | ||
| 816 | + let id=util.attr(e,'id'); | ||
| 817 | + let tags=this.data.tags; | ||
| 818 | + let activeNum=0; | ||
| 819 | + tags.forEach(t=>{ | ||
| 820 | + if(t.id==id){ | ||
| 821 | + t.active=!t.active | ||
| 822 | + } | ||
| 823 | + if(t.active){ | ||
| 824 | + activeNum++ | ||
| 825 | + } | ||
| 826 | + }) | ||
| 827 | + this.setData({ | ||
| 828 | + tags:tags, | ||
| 829 | + }) | ||
| 830 | + this.hasSellerConcat=hasSellerConcat; | ||
| 831 | + this.sellersIds=[]; | ||
| 832 | + if(activeNum>0){ | ||
| 833 | + this.hasSellerConcat=false; | ||
| 834 | + }else{ | ||
| 835 | + if(!this.hasSellerConcat){ | ||
| 836 | + this.setData({ | ||
| 837 | + markers:[] | ||
| 838 | + }) | ||
| 839 | + } | ||
| 840 | + } | ||
| 841 | + setTimeout(()=>{this.getMarkers();},0) | ||
| 842 | + | ||
| 843 | + }, | ||
| 844 | + caixiActive(e){ | ||
| 845 | + console.log('caixiActive',e); | ||
| 846 | + this.bindMultiPickerChange({ | ||
| 847 | + detail:{ | ||
| 848 | + value:[e.detail] | ||
| 849 | + } | ||
| 850 | + }) | ||
| 851 | + }, | ||
| 852 | + caixiShow(){ | ||
| 853 | + if(this.data.listMoreCount<1 && !this.data.hasSearchLimit) return | ||
| 854 | + this.selectComponent('#caixi').show(); | ||
| 855 | + }, | ||
| 856 | + listEvent(e){ | ||
| 857 | + let d=e.detail | ||
| 858 | + console.log('listEvent',e); | ||
| 859 | + if(d.type=="getListEnd"){ | ||
| 860 | + this.setData({ | ||
| 861 | + listMoreCount:d.total | ||
| 862 | + }); | ||
| 863 | + }else if(d.type=='caixiShow'){ | ||
| 864 | + this.caixiShow(); | ||
| 865 | + }else if(d.type=='tagsChange'){ | ||
| 866 | + this.tagsChange(d.e); | ||
| 867 | + } | ||
| 868 | + }, | ||
| 869 | + listShow(){ | ||
| 870 | + //this.selectComponent('#list').show(); | ||
| 871 | + wx.navigateTo({ | ||
| 872 | + url:util.http_build_query({ | ||
| 873 | + lat:this.param.lat==def_latitude?'':this.param.lat, | ||
| 874 | + lng:this.param.lng==def_longitude?'':this.param.lng, | ||
| 875 | + map:this.param.map, | ||
| 876 | + multiIndex:this.data.multiIndex, | ||
| 877 | + tags:this.param.tags, | ||
| 878 | + centre_pos:this.param.centre_pos, | ||
| 879 | + hasSuggestion:this.data.hasSuggestion?1:'' | ||
| 880 | + },'./indexList'), | ||
| 881 | + success: res=> { | ||
| 882 | + // 通过eventChannel向被打开页面传送数据 | ||
| 883 | + if(this.findSellerData){ | ||
| 884 | + res.eventChannel.emit('acceptDataFromMapPage', this.findSellerData) | ||
| 885 | + } | ||
| 886 | + res.eventChannel.on('findSellerData',findSellerData=>{ | ||
| 887 | + console.log('findSellerData',findSellerData) | ||
| 888 | + this.findSellerData=findSellerData | ||
| 889 | + setTimeout(()=>{this.getMarkers();},0) | ||
| 890 | + }) | ||
| 891 | + } | ||
| 892 | + }); | ||
| 893 | + }, | ||
| 894 | + setTSLocal(){ | ||
| 895 | + let map=this.data.map; | ||
| 896 | + map.latitude=def_latitude | ||
| 897 | + map.longitude=def_longitude | ||
| 898 | + map.scale=mapScale | ||
| 899 | + this.sellersIds=[] | ||
| 900 | + this.sellers=[] | ||
| 901 | + let sdobj={ | ||
| 902 | + map: map, | ||
| 903 | + hasGetSellersEnd:false, | ||
| 904 | + hasSuggestion:false, | ||
| 905 | + suggestion:{}, | ||
| 906 | + } | ||
| 907 | + if(!this.hasSellerConcat){ | ||
| 908 | + sdobj.markers=[] | ||
| 909 | + } | ||
| 910 | + this.setData(sdobj) | ||
| 911 | + }, | ||
| 912 | + findSellerData:null, | ||
| 913 | + findSeller(){ | ||
| 914 | + if(this.data.listMoreCount<1 && !this.data.hasSearchLimit) return | ||
| 915 | + wx.navigateTo({ | ||
| 916 | + url: './findSeller', | ||
| 917 | + success: res=> { | ||
| 918 | + // 通过eventChannel向被打开页面传送数据 | ||
| 919 | + if(this.findSellerData){ | ||
| 920 | + res.eventChannel.emit('acceptDataFromMapPage', this.findSellerData) | ||
| 921 | + } | ||
| 922 | + res.eventChannel.on('findSellerData',findSellerData=>{ | ||
| 923 | + console.log('findSellerData',findSellerData) | ||
| 924 | + this.findSellerData=findSellerData | ||
| 925 | + setTimeout(()=>{this.getMarkers();},0) | ||
| 926 | + }) | ||
| 927 | + } | ||
| 928 | + }) | ||
| 929 | + }, | ||
| 930 | + boostEvent(e){ | ||
| 931 | + util.elog(e.detail,'强提醒') | ||
| 932 | + if(e.detail.act=='hide'){ | ||
| 933 | + this.setData({ | ||
| 934 | + hasGetPos:true, | ||
| 935 | + }) | ||
| 936 | + this.selectComponent('#getpos').getPos(); | ||
| 937 | + } | ||
| 938 | + }, | ||
| 939 | + elog(e){ | ||
| 940 | + util.elog({attr:util.attr(e),detail:e.detail},util.attr(e,'ename')||'点击') | ||
| 941 | + } | ||
| 942 | +}) |
pages/reserve/index_yy.json
0 → 100644
| 1 | +{ | ||
| 2 | + "navigationBarBackgroundColor": "#ffffff", | ||
| 3 | + "navigationBarTextStyle": "black", | ||
| 4 | + "navigationBarTitleText":"周到安排", | ||
| 5 | + "usingComponents": { | ||
| 6 | + "formids":"/components/formids/formids", | ||
| 7 | + "nav":"/components/nav/nav", | ||
| 8 | + "getpos":"/components/userinfo/getpos", | ||
| 9 | + "sb-tr":"/components/reserve/seller-box-transverse/seller-box", | ||
| 10 | + "a2l":"/components/tips/add-to-lite", | ||
| 11 | + "boost":"/components/tips/boost", | ||
| 12 | + "caixi":"/components/reserve/caixi", | ||
| 13 | + "list":"/components/reserve/seller-box-transverse-cview/list", | ||
| 14 | + "activity-enter":"/components/activity/enter" | ||
| 15 | + } | ||
| 16 | +} |
pages/reserve/index_yy.wxml
0 → 100644
| 1 | +<!--pages/reservr/index.wxml--> | ||
| 2 | +<view class="pages"> | ||
| 3 | + <view class="flex-vc map"> | ||
| 4 | + <map id="map" scale="{{map.scale}}" | ||
| 5 | + longitude="{{map.longitude}}" latitude="{{map.latitude}}" | ||
| 6 | + markers="{{markers}}" polygons="{{polygons}}" | ||
| 7 | + bindmarkertap="markertap" | ||
| 8 | + bindcallouttap="markertap" | ||
| 9 | + bindregionchange="regionchange" | ||
| 10 | + bindupdated="mapUpdated" | ||
| 11 | + show-location="{{false}}" | ||
| 12 | + enable-3D="{{false}}" | ||
| 13 | + enable-zoom | ||
| 14 | + enable-scroll | ||
| 15 | + enable-rotate | ||
| 16 | + subkey="SDEBZ-I74W4-QLGUX-XXYXU-HIR23-3QFBJ" | ||
| 17 | + layer-style="2" | ||
| 18 | + style="width: 100%; height: {{map.height}}px;"></map> | ||
| 19 | + </view> | ||
| 20 | + <view class="seller-view"> | ||
| 21 | + <!-- | ||
| 22 | + <view class="flex-vc transverse-view-top" bindtap="listShow" wx:if="{{hasGetSellersEnd && listMoreCount>0}}"> | ||
| 23 | + <view class="line"></view> | ||
| 24 | + <view class="text"> | ||
| 25 | + <view>{{hasSellers?'查看其它':'已扩大范围为你找到'}}{{listMoreCount}}家餐厅</view> | ||
| 26 | + </view> | ||
| 27 | + </view> | ||
| 28 | + --> | ||
| 29 | + <navigator url="./search" | ||
| 30 | + bindtap="elog" data-ename="点击搜索框" hover-class="navigator-hover"> | ||
| 31 | + <view class="flex-ll transverse-view-search"> | ||
| 32 | + <view class="searchAddr flex-ll"> | ||
| 33 | + <image class="icon" src="http://nosqn.colorcun.com/custom/lite-online/image/search26.png"></image> | ||
| 34 | + <view class="title">{{hasSuggestion?suggestion.title:'输入餐厅名或地名,快速订包间'}}</view> | ||
| 35 | + </view> | ||
| 36 | + <view class="searchList flex-tb" catchtap="listShow"> | ||
| 37 | + <image class="icon" src="http://nosqn.colorcun.com/mapmenu/maplist.png"></image> | ||
| 38 | + <view class="title">列表模式</view> | ||
| 39 | + </view> | ||
| 40 | + </view> | ||
| 41 | + </navigator> | ||
| 42 | + <view class="transverse-search flex-ll"> | ||
| 43 | + <view | ||
| 44 | + bindtap="caixiShow" | ||
| 45 | + class="tags {{multiIndex[0]>0?'active':''}}" | ||
| 46 | + > | ||
| 47 | + <view class="picker flex-lr"> | ||
| 48 | + <view class="input"> | ||
| 49 | + <block wx:if="{{multiIndex[0]==0}}">菜系</block> | ||
| 50 | + <block wx:else="">{{multiArray[0][multiIndex[0]]}}</block> | ||
| 51 | + </view> | ||
| 52 | + <view class="more"></view> | ||
| 53 | + </view> | ||
| 54 | + </view> | ||
| 55 | + <block wx:for="{{tags}}" wx:key="tagskey"> | ||
| 56 | + <view class="tags {{item.active?'active':''}}" | ||
| 57 | + bindtap="tagsChange" | ||
| 58 | + data-id="{{item.id}}">{{item.name}}</view> | ||
| 59 | + </block> | ||
| 60 | + <!-- | ||
| 61 | + <view class="fingSeller flex-ll" bindtap="findSeller"> | ||
| 62 | + <view class="icon"></view> | ||
| 63 | + <view>查找餐厅</view> | ||
| 64 | + </view> | ||
| 65 | + --> | ||
| 66 | + </view> | ||
| 67 | + <view class="transverse-list"> | ||
| 68 | + <swiper | ||
| 69 | + indicator-dots="{{false}}" autoplay="{{false}}" circular="{{false}}" vertical="{{false}}" | ||
| 70 | + interval="2000" duration="500" | ||
| 71 | + previous-margin="{{15}}px" next-margin="{{15}}px" style="height: 350rpx;" | ||
| 72 | + current="{{current}}" bindchange="bindtransition" hidden="{{!hasSellers}}"> | ||
| 73 | + <block wx:for="{{markers}}" wx:key="markerskey" wx:if="{{item.id!='location' && item.id!='locationMe'}}"> | ||
| 74 | + <swiper-item bindtap="gotoDetail" data-sid="{{item.id}}" wx:if="{{item.display!='none'}}"> | ||
| 75 | + <view class="seller" id="seller-{{item.id}}"> | ||
| 76 | + <sb-tr seller="{{item.seller}}" | ||
| 77 | + hasActivityTags="{{false}}" | ||
| 78 | + hasActivityShort="{{true}}" | ||
| 79 | + hasBrand="true" hasActivityRed="true" | ||
| 80 | + hasSuggestion="{{hasSuggestion}}" | ||
| 81 | + hasSlogan="{{false}}"></sb-tr> | ||
| 82 | + </view> | ||
| 83 | + </swiper-item> | ||
| 84 | + </block> | ||
| 85 | + <swiper-item bindtap="gotoDetail2" wx:if="{{hasGetSellersEnd}}"> | ||
| 86 | + <view class="seller seller-last" id="seller-last"> | ||
| 87 | + <view class="empty"> | ||
| 88 | + <view class="info"> | ||
| 89 | + <view class="info-msg Semibold">缩放地图发现更多餐厅</view> | ||
| 90 | + <view class="info-txt">往任意方向拖动地图,可搜索不同范围</view> | ||
| 91 | + </view> | ||
| 92 | + <view class="icon"></view> | ||
| 93 | + </view> | ||
| 94 | + </view> | ||
| 95 | + </swiper-item> | ||
| 96 | + </swiper> | ||
| 97 | + <view class="empty-txt flex-vc"> | ||
| 98 | + <view class="seller" wx:if="{{hasGetSellersEnd}}"> | ||
| 99 | + <view class="empty"> | ||
| 100 | + <view class="info" wx:if="{{listMoreCount>0}}" bindtap="listShow"> | ||
| 101 | + <view class="info-msg Semibold" style="margin-top: 58rpx;">已扩大范围为你找到餐厅</view> | ||
| 102 | + <view class="info-txt">当前范围没有找到符合条件的餐厅</view> | ||
| 103 | + <view class="info-button flex-lr" style="display: flex;margin-top: 50rpx;margin-left: 0;"> | ||
| 104 | + <view>去挑选</view> | ||
| 105 | + <view class="info-button-gt"></view> | ||
| 106 | + </view> | ||
| 107 | + </view> | ||
| 108 | + <view class="info" wx:elif="{{hasSearchLimit}}"> | ||
| 109 | + <view class="info-msg Semibold" style="margin-top: 58rpx;">未找到符合要求的餐厅</view> | ||
| 110 | + <view class="info-txt">修改或减少条件,获取更多餐厅</view> | ||
| 111 | + <button class="button-none flex-lr info-button" | ||
| 112 | + style="display: flex;margin-top: 50rpx;margin-left: 0;" | ||
| 113 | + open-type="contact"> | ||
| 114 | + <view>人工帮订</view> | ||
| 115 | + <view class="info-button-gt"></view> | ||
| 116 | + </button> | ||
| 117 | + </view> | ||
| 118 | + <view class="info" wx:else="" bindtap="setTSLocal"> | ||
| 119 | + <view class="info-msg Semibold">你可以切换到其他城市看看</view> | ||
| 120 | + <view class="info-button full flex-lr"> | ||
| 121 | + <view>唐山市</view> | ||
| 122 | + <view class="info-button-gt"></view> | ||
| 123 | + </view> | ||
| 124 | + </view> | ||
| 125 | + </view> | ||
| 126 | + </view> | ||
| 127 | + </view> | ||
| 128 | + </view> | ||
| 129 | + </view> | ||
| 130 | +</view> | ||
| 131 | +<view bindtap="moveToLocation" class="moveToLocation"> | ||
| 132 | + <image src="http://nosqn.colorcun.com/reserve/images/golocal.png"></image> | ||
| 133 | +</view> | ||
| 134 | +<view class="toast" wx:if="{{hasGetSellersEnd && listMoreCount<1 && !hasSearchLimit && markers.length<2}}">该地区没有可供预订的餐厅哦!努力开通中</view> | ||
| 135 | +<view class="toast" wx:if="{{hasGetSellersEnd && markers.length<2 && listMoreCount>0}}">移动或缩放地图,获取更多餐厅</view> | ||
| 136 | +<getpos bindpos="onpos" id="getpos"></getpos> | ||
| 137 | +<seller-box id="seller-box" bindevent="sellerBoxEvent"></seller-box> | ||
| 138 | +<cover-view class="tab-patch"></cover-view> | ||
| 139 | +<a2l bindshow="a2lshow" bindhide="a2lshow" key="INDEX"></a2l> | ||
| 140 | +<list id="list" bindevent="listEvent" | ||
| 141 | + multiArray="{{multiArray}}" multiIndex="{{multiIndex}}" tags="{{tags}}"></list> | ||
| 142 | +<caixi multiArray="{{multiArray}}" multiIndex="{{multiIndex}}" | ||
| 143 | + bindactive="caixiActive" id="caixi" | ||
| 144 | +></caixi> | ||
| 145 | +<activity-enter hasInHome wx:if="{{hasGetPos}}"></activity-enter> | ||
| 146 | +<boost bindevent="boostEvent"></boost> |
pages/reserve/index_yy.wxss
0 → 100644
| 1 | +/* pages/reservr/index.wxss */ | ||
| 2 | + | ||
| 3 | +page{ | ||
| 4 | + background-color: #efefef; | ||
| 5 | + --barHeight: calc(98rpx + env(safe-area-inset-bottom)); | ||
| 6 | +} | ||
| 7 | +.pages{ | ||
| 8 | + width: 100%; | ||
| 9 | + margin: 0 0 0; | ||
| 10 | + color:#353535; | ||
| 11 | +} | ||
| 12 | +.map{ | ||
| 13 | + | ||
| 14 | +} | ||
| 15 | +.tab-patch{ | ||
| 16 | + position: fixed; | ||
| 17 | + background-color: #fefefe; | ||
| 18 | + height: 20rpx; | ||
| 19 | + width: 100%; | ||
| 20 | + bottom: -120rpx; | ||
| 21 | +} | ||
| 22 | +.moveToLocation{ | ||
| 23 | + position: fixed; | ||
| 24 | + bottom: calc(520rpx + var(--barHeight)); | ||
| 25 | + right: 20rpx; | ||
| 26 | + width: 62rpx; | ||
| 27 | + height: 62rpx; | ||
| 28 | +} | ||
| 29 | +.moveToLocation image{ | ||
| 30 | + width: 62rpx; | ||
| 31 | + height: 62rpx; | ||
| 32 | +} | ||
| 33 | + | ||
| 34 | +.transverse-view{ | ||
| 35 | + position: relative; | ||
| 36 | + height: 464rpx; | ||
| 37 | + width: 100%; | ||
| 38 | + background-color: #fefefe; | ||
| 39 | + overflow: hidden; | ||
| 40 | +} | ||
| 41 | + | ||
| 42 | +.transverse-list{ | ||
| 43 | + background-color: #fefefe; | ||
| 44 | + /*height: 264rpx;*/ | ||
| 45 | + width: 100%; | ||
| 46 | +} | ||
| 47 | +.transverse-list .seller{ | ||
| 48 | + width: 98%; | ||
| 49 | + margin: 0 auto; | ||
| 50 | +} | ||
| 51 | +.transverse-list .seller .empty{ | ||
| 52 | + height: 300rpx; | ||
| 53 | + overflow: hidden; | ||
| 54 | + color: #353535; | ||
| 55 | + width: 86%; | ||
| 56 | + border: 2rpx solid #E0E0E0; | ||
| 57 | + border-left: 6rpx solid #F05522; | ||
| 58 | + border-radius: 6rpx; | ||
| 59 | + box-shadow: 0 4rpx 8rpx 0 #E0E0E0; | ||
| 60 | + position: relative; | ||
| 61 | +} | ||
| 62 | +.transverse-list .seller-last .empty{ | ||
| 63 | + width: 99%; | ||
| 64 | +} | ||
| 65 | +.seller .empty .info{ | ||
| 66 | + height: 124rpx; | ||
| 67 | + font-size: 28rpx; | ||
| 68 | + margin-left: 34rpx; | ||
| 69 | + margin-top: 88rpx; | ||
| 70 | +} | ||
| 71 | +.seller .empty .info .info-msg{ | ||
| 72 | + font-size: 32rpx; | ||
| 73 | + color:#F05522; | ||
| 74 | + margin-bottom: 40rpx; | ||
| 75 | + height: 44rpx; | ||
| 76 | + line-height: 44rpx; | ||
| 77 | +} | ||
| 78 | +.info-txt{ | ||
| 79 | + line-height: 40rpx; | ||
| 80 | + height: 40rpx; | ||
| 81 | +} | ||
| 82 | +.seller .empty .icon{ | ||
| 83 | + background-image: url("http://nosqn.colorcun.com/reserve/images/hasClick.png"); | ||
| 84 | + background-size: 100% 100%; | ||
| 85 | + width: 54rpx; | ||
| 86 | + height: 56rpx; | ||
| 87 | + position: absolute; | ||
| 88 | + top:82rpx; | ||
| 89 | + right:40rpx; | ||
| 90 | +} | ||
| 91 | +.seller-last .empty .icon{ | ||
| 92 | + background-image: url("http://nosqn.colorcun.com/reserve/images/%E7%BC%A9%E6%94%BE.png"); | ||
| 93 | + background-size: 100% 100%; | ||
| 94 | + width: 98rpx; | ||
| 95 | + height: 76rpx; | ||
| 96 | + position: absolute; | ||
| 97 | + top:40rpx; | ||
| 98 | + right:68rpx; | ||
| 99 | +} | ||
| 100 | + | ||
| 101 | +.picker{ | ||
| 102 | + height: 50rpx; | ||
| 103 | + line-height: 50rpx; | ||
| 104 | +} | ||
| 105 | +.picker .input{ | ||
| 106 | + height: 50rpx; | ||
| 107 | + line-height: 50rpx; | ||
| 108 | + margin-right: 10rpx; | ||
| 109 | +} | ||
| 110 | +.picker .more{ | ||
| 111 | + background-image: url("http://nosqn.colorcun.com/reserve/images/%E8%8F%9C%E7%B3%BB.png"); | ||
| 112 | + width: 12rpx; | ||
| 113 | + height: 16rpx; | ||
| 114 | + min-width:12rpx; | ||
| 115 | +} | ||
| 116 | +.disabled .tags{ | ||
| 117 | + color: #999; | ||
| 118 | +} | ||
| 119 | +.enabled .tags{ | ||
| 120 | + color: #353535; | ||
| 121 | +} | ||
| 122 | +.disabled .fingSeller{ | ||
| 123 | + color: #999; | ||
| 124 | +} | ||
| 125 | +.disabled .fingSeller .icon{ | ||
| 126 | + position: relative; | ||
| 127 | + background: none; | ||
| 128 | +} | ||
| 129 | +.disabled .fingSeller .icon:after{ | ||
| 130 | + content: ''; | ||
| 131 | + display: block; | ||
| 132 | + width: 100%; | ||
| 133 | + height: 100%; | ||
| 134 | + position: absolute; | ||
| 135 | + top: 0; | ||
| 136 | + right: 0; | ||
| 137 | + bottom: 0; | ||
| 138 | + left: 0; | ||
| 139 | + background: url('http://nosqn.colorcun.com/reserve/images/find-black.png'); | ||
| 140 | + background-size: 100% 100%; | ||
| 141 | + opacity: 0.5; | ||
| 142 | +} | ||
| 143 | +.enabled .fingSeller,.fingSeller{ | ||
| 144 | + height: 70rpx; | ||
| 145 | + line-height: 70rpx; | ||
| 146 | + width: 172rpx; | ||
| 147 | + box-shadow:-12rpx 0 10rpx -8rpx rgba(178,177,177,0.5); | ||
| 148 | + box-sizing: border-box; | ||
| 149 | + padding-left: 28rpx; | ||
| 150 | + font-weight:600; | ||
| 151 | + color:rgba(240,85,34,1); | ||
| 152 | +} | ||
| 153 | +.enabled .fingSeller .icon,.fingSeller .icon{ | ||
| 154 | + width: 32rpx; | ||
| 155 | + height: 30rpx; | ||
| 156 | + margin-right: 6rpx; | ||
| 157 | + background-image: url("http://nosqn.colorcun.com/reserve/images/find.png"); | ||
| 158 | + background-size: 100% 100%; | ||
| 159 | +} | ||
| 160 | +.enabled .fingSeller .icon:after{ | ||
| 161 | + opacity: 0; | ||
| 162 | + background:none; | ||
| 163 | +} | ||
| 164 | + | ||
| 165 | +.tags.active .picker .more{ | ||
| 166 | + background-image: url("http://nosqn.colorcun.com/reserve/images/%E8%8F%9C%E7%B3%BB%E9%80%89%E4%B8%AD.png"); | ||
| 167 | +} | ||
| 168 | +.disabled .picker .more{ | ||
| 169 | + background-image: url("http://nosqn.colorcun.com/custom/lite-yd/image/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20190925174046.png"); | ||
| 170 | +} | ||
| 171 | +.enabled .picker .more{ | ||
| 172 | + background-image: url("http://nosqn.colorcun.com/reserve/images/%E8%8F%9C%E7%B3%BB%E9%80%89%E4%B8%AD.png"); | ||
| 173 | +} | ||
| 174 | +.searchAddr { | ||
| 175 | + margin-left: 15rpx; | ||
| 176 | + width: 400rpx; | ||
| 177 | + height: 64rpx; | ||
| 178 | + background-color: #fefefe; | ||
| 179 | + line-height: 64rpx; | ||
| 180 | + font-weight:400; | ||
| 181 | + color:rgba(153,153,153,1); | ||
| 182 | + font-size: 28rpx; | ||
| 183 | + | ||
| 184 | + border-radius:32rpx; | ||
| 185 | + border:2rpx solid rgba(204,204,204,1); | ||
| 186 | + width: 100%; | ||
| 187 | + box-sizing: border-box; | ||
| 188 | +} | ||
| 189 | +.searchAddr .icon{ | ||
| 190 | + min-width: 22rpx; | ||
| 191 | + width: 22rpx; | ||
| 192 | + height: 22rpx; | ||
| 193 | + margin: 0 10rpx 0 40rpx; | ||
| 194 | +} | ||
| 195 | +.searchAddr .title{ | ||
| 196 | + line-height: 60rpx; | ||
| 197 | + height: 60rpx; | ||
| 198 | + overflow: hidden; | ||
| 199 | + width: 100%; | ||
| 200 | + text-align: left; | ||
| 201 | +} | ||
| 202 | +.searchList{ | ||
| 203 | + margin-left: 30rpx; | ||
| 204 | + width:72rpx; | ||
| 205 | + min-width: 72rpx; | ||
| 206 | + align-items: center; | ||
| 207 | + | ||
| 208 | +} | ||
| 209 | +.searchList .icon{ | ||
| 210 | + width:40rpx; | ||
| 211 | + height:36rpx; | ||
| 212 | + margin-bottom: 4rpx; | ||
| 213 | +} | ||
| 214 | +.searchList .title{ | ||
| 215 | + height:26rpx; | ||
| 216 | + font-size:18rpx; | ||
| 217 | + font-family:PingFangSC-Regular,PingFang SC; | ||
| 218 | + font-weight:400; | ||
| 219 | + color:rgba(192,163,105,1); | ||
| 220 | + line-height:26rpx; | ||
| 221 | +} | ||
| 222 | +.empty-txt{ | ||
| 223 | + height: 300rpx; | ||
| 224 | + line-height: 300rpx; | ||
| 225 | + font-size: 34rpx; | ||
| 226 | +} | ||
| 227 | +.empty-txt .seller{ | ||
| 228 | + | ||
| 229 | +} | ||
| 230 | +.empty-txt .seller .empty{ | ||
| 231 | + background-image: url("http://nosqn.colorcun.com/reserve/images/empty-seller.png"); | ||
| 232 | + background-size: 100% 100%; | ||
| 233 | + border-left-width: 0; | ||
| 234 | + margin: 0 auto; | ||
| 235 | + width: 90%; | ||
| 236 | +} | ||
| 237 | +.empty-txt .seller .empty .info{ | ||
| 238 | + margin-top: 52rpx; | ||
| 239 | + margin-left: 30rpx; | ||
| 240 | +} | ||
| 241 | +.empty-txt .seller .empty .info .info-msg{ | ||
| 242 | + margin-bottom: 14rpx; | ||
| 243 | + font-size: 34rpx; | ||
| 244 | + margin-top: 78rpx; | ||
| 245 | + height: 48rpx; | ||
| 246 | + line-height: 48rpx; | ||
| 247 | +} | ||
| 248 | +.empty-txt .seller .empty .info .info-txt{ | ||
| 249 | + font-size: 24rpx; | ||
| 250 | +} | ||
| 251 | +.info-button{ | ||
| 252 | + border: 2rpx solid #F05522; | ||
| 253 | + border-radius: 28rpx; | ||
| 254 | + height: 56rpx; | ||
| 255 | + line-height: 56rpx; | ||
| 256 | + padding: 0 20rpx; | ||
| 257 | + color: #F05522; | ||
| 258 | + font-size: 28rpx; | ||
| 259 | + min-width: 146rpx; | ||
| 260 | + max-width: 170rpx; | ||
| 261 | + box-sizing: border-box; | ||
| 262 | +} | ||
| 263 | +.info-button-gt{ | ||
| 264 | + background-image: url("http://nosqn.colorcun.com/reserve/images/gt-cheng.png"); | ||
| 265 | + background-size: 100% 100%; | ||
| 266 | + width: 10rpx; | ||
| 267 | + height: 20rpx; | ||
| 268 | + | ||
| 269 | +} | ||
| 270 | +.info-button.full{ | ||
| 271 | + background-color: #F05522; | ||
| 272 | + color:#fefefe; | ||
| 273 | +} | ||
| 274 | +.info-button.full .info-button-gt{ | ||
| 275 | + background-image: url("http://nosqn.colorcun.com/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20190925175650.png"); | ||
| 276 | +} | ||
| 277 | +.transverse-search .tags{ | ||
| 278 | + height: 50rpx; | ||
| 279 | + line-height: 50rpx; | ||
| 280 | + background-color: #F0F0F9; | ||
| 281 | + border-radius: 4rpx; | ||
| 282 | + margin-right: 30rpx; | ||
| 283 | + padding: 0 16rpx; | ||
| 284 | +} | ||
| 285 | +.transverse-search .tags:last-child{ | ||
| 286 | + margin-right: 0; | ||
| 287 | +} | ||
| 288 | +.transverse-search .tags.active{ | ||
| 289 | + background:linear-gradient(to bottom ,#F4DAB9,#E9BE94); | ||
| 290 | + color:#8B5318; | ||
| 291 | + font-weight: 900; | ||
| 292 | +} | ||
| 293 | + | ||
| 294 | + | ||
| 295 | + /* seller-view start*/ | ||
| 296 | +.seller-view{ | ||
| 297 | + position:fixed; | ||
| 298 | + bottom: calc(0rpx + var(--barHeight)); | ||
| 299 | + width: 100%; | ||
| 300 | + background-color: #fefefe; | ||
| 301 | + border-radius: 20rpx 20rpx 0 0; | ||
| 302 | + box-shadow: -4rpx 0 4rpx 2rpx #C5C1C1; | ||
| 303 | + overflow: hidden; | ||
| 304 | + padding: 30rpx 0 20rpx; | ||
| 305 | + height: 506rpx; | ||
| 306 | + box-sizing: border-box; | ||
| 307 | +} | ||
| 308 | +.seller-view.disabled{ | ||
| 309 | + height: 410rpx; | ||
| 310 | +} | ||
| 311 | +.transverse-view-top{ | ||
| 312 | + height: 58rpx; | ||
| 313 | + overflow: hidden; | ||
| 314 | + background-color:#FFFFFF; | ||
| 315 | + border-radius: 20rpx 20rpx 0 0; | ||
| 316 | + position: fixed; | ||
| 317 | + width: 100%; | ||
| 318 | +} | ||
| 319 | +.transverse-view-top .line{ | ||
| 320 | + height: 6rpx; | ||
| 321 | + width: 70rpx; | ||
| 322 | + margin-top: 14rpx; | ||
| 323 | + background-color: #E0E0E0; | ||
| 324 | +} | ||
| 325 | +.transverse-view-top .text{ | ||
| 326 | + height: 34rpx; | ||
| 327 | + line-height: 34rpx; | ||
| 328 | + font-size: 24rpx; | ||
| 329 | + color: #999999; | ||
| 330 | + margin-top: 6rpx; | ||
| 331 | +} | ||
| 332 | +.transverse-search{ | ||
| 333 | + background-color: #fefefe; | ||
| 334 | + height: 90rpx; | ||
| 335 | + font-size: 24rpx; | ||
| 336 | + padding-left: 40rpx; | ||
| 337 | + line-height: 90rpx; | ||
| 338 | +} | ||
| 339 | +.disabled .transverse-search{ | ||
| 340 | + padding-top: 0; | ||
| 341 | +} | ||
| 342 | +.toast{ | ||
| 343 | + background-color: #000; | ||
| 344 | + width: calc(100% - 272rpx); | ||
| 345 | + position: fixed; | ||
| 346 | + bottom:calc(520rpx + var(--barHeight)); | ||
| 347 | + color: #fefefe; | ||
| 348 | + height:60rpx; | ||
| 349 | + font-size:26rpx; | ||
| 350 | + line-height:60rpx; | ||
| 351 | + left: 136rpx; | ||
| 352 | + text-align: center; | ||
| 353 | + border-radius:30rpx; | ||
| 354 | + opacity:0.64; | ||
| 355 | +} | ||
| 356 | +.disabled .toast{ | ||
| 357 | + background-color: #000; | ||
| 358 | + width: calc(100% - 72rpx); | ||
| 359 | + position: fixed; | ||
| 360 | + bottom:calc(430rpx + var(--barHeight)); | ||
| 361 | + color: #fefefe; | ||
| 362 | + height:60rpx; | ||
| 363 | + font-size:26rpx; | ||
| 364 | + line-height:60rpx; | ||
| 365 | + left: 36rpx; | ||
| 366 | + text-align: center; | ||
| 367 | + border-radius:30rpx; | ||
| 368 | + opacity:0.64; | ||
| 369 | +} | ||
| 370 | +.transverse-view-search{ | ||
| 371 | + width:100%; | ||
| 372 | + height:66rpx; | ||
| 373 | + padding: 0 20rpx; | ||
| 374 | + background:rgba(254,254,254,1); | ||
| 375 | + box-sizing: border-box; | ||
| 376 | +} |
-
Please register or login to post a comment