Commit 2c64e2de21a32bed5212cc52eefbd1161b7ad375

Authored by vking
1 parent 1cdb8b51

boost + mapmenu + 店铺红包

... ... @@ -22,6 +22,7 @@ App({
system:{},
shareTicket:"",
isAdmin:false,//是否运营人员
location:null,//人的位置信息
onLaunch: async function (opt) {
if(wx.getLogManager){
const logger =wx.getLogManager()
... ...
... ... @@ -101,6 +101,7 @@ Component({
seller.label_carr=seller.label_carr.slice(0,3)
}
this.setData({
location:getApp().location,
se: seller,
})
},
... ...
... ... @@ -20,7 +20,9 @@
</view>
<view class="text flex-ll">
<view class="text-item" wx:if="{{seller.room_num>0}}">{{seller.room_num}}个包间</view>
<view class="text-item" wx:if="{{seller.distance>=0 && seller.distance!==''}}">{{hasSuggestion?'距搜索地':'距您'}}{{util.distance(seller.distance_centre||seller.distance)}}</view>
<block wx:if="{{hasSuggestion || location.latitude}}">
<view class="text-item" wx:if="{{seller.distance>=0 && seller.distance!==''}}">{{hasSuggestion?'距搜索地':'距您'}}{{util.distance(seller.distance_centre||seller.distance)}}</view>
</block>
</view>
<view wx:if="{{hasStat}}" class="stat">
<stat stat="{{seller.score}}"></stat>
... ...
... ... @@ -104,6 +104,7 @@ Component({
hasSuccess=true;
rex=res;
this.triggerEvent("pos",JSON.parse(JSON.stringify(res)));
getApp().location=res;
success(res)
},
fail: (res) => {
... ...
... ... @@ -486,6 +486,10 @@ Page({
}
if(param.lat){
param.centre_pos=`${param.lat},${param.lng}`
}else{
let lat=(this.mapData.region.southwest.latitude+this.mapData.region.northeast.latitude)/2
let lng=(this.mapData.region.southwest.longitude+this.mapData.region.northeast.longitude)/2
param.centre_pos=`${lat},${lng}`
}
if(this.data.hasSuggestion){
param.centre_pos=`${this.data.suggestion.latitude},${this.data.suggestion.longitude}`
... ...