Commit 0e05c2faa479a3b49805bc599388b50b4ba9af45

Authored by wangfan
1 parent 41565da4

golist

... ... @@ -2,7 +2,7 @@
<view class="seller flex-ll {{sellerStyle}}" >
<view class="image">
<image mode="aspectFill"
src="{{seller.seller_image?seller.seller_image+'?imageView2/2/w/320/interlace/0/q/100':'http://qn.colorcun.com/custom/lite-online/image/seller-def.png'}}"></image>
src="{{seller.seller_image?seller.seller_image+'?imageView2/2/w/320/interlace/0/q/100':'http://qn.colorcun.com/reserve/images/%E6%9A%82%E6%97%A0%E7%85%A7%E7%89%87.png'}}"></image>
<view class="room_num" wx:if="{{seller.room_num>0}}">{{seller.room_num}}个包间</view>
</view>
<view class="info flex-tb">
... ...
... ... @@ -114,6 +114,7 @@ Page({
northeast:{},
},
},
mapDataLast:null,//最后一次成功视角,防止地图视角丢失
onReady: function () {
this.mapCtx = wx.createMapContext('map')
// this.mapCtx.moveToLocation({
... ... @@ -372,8 +373,19 @@ Page({
hasInRegionFlag:false,
hasInRegion(){//定位是否在地图视野内
let map = this.mapData;
if(!map.region.northeast.latitude || !map.region.northeast.longitude) return {flag:false,msg:'未获得视野'};//未获得视野
if(!map.region.southwest.latitude || !map.region.southwest.longitude) return {flag:false,msg:'未获得视野'};//未获得视野
if(!map.region.northeast.latitude || !map.region.northeast.longitude) {//未获得视野
if(this.mapDataLast){
this.mapData=this.mapDataLast
}
return {flag:false,msg:'未获得视野',map:map,mapDataLast:this.mapDataLast};
}
if(!map.region.southwest.latitude || !map.region.southwest.longitude) {//未获得视野
if(this.mapDataLast){
this.mapData=this.mapDataLast
}
return {flag:false,msg:'未获得视野',map:map,mapDataLast:this.mapDataLast};
}
this.mapDataLast=JSON.parse(JSON.stringify(this.mapData));
if(this.hasInRegionFlag) return {flag:true,msg:'二次获取'};
if(!this.user.latitude) return {flag:false,msg:'用户无定位'};//用户无定位
//if(this.user.latitude==def_latitude && this.user.longitude==def_longitude) return false;//默认位置
... ...
... ... @@ -33,7 +33,9 @@
<view class="transverse-view">
<view class="flex-vc transverse-view-top" bindtap="listShow">
<view class="line"></view>
<view class="text">{{markers.length>0?'查看其它':'已扩大范围为你找到'}}{{listMoreCount}}家餐厅</view>
<view class="text">
<text wx:if="{{hasGetSellersEnd}}">{{hasSellers?'查看其它':'已扩大范围为你找到'}}{{listMoreCount}}家餐厅</text>
</view>
</view>
<view class="transverse-search flex-ll">
<view
... ...