Commit b372084f85cd1ad6b44756f8522c201db117b1a7

Authored by vking
1 parent 4049db48

距离展示调整

@@ -47,7 +47,11 @@ Component({ @@ -47,7 +47,11 @@ Component({
47 sellerStyle: {//特殊样式 47 sellerStyle: {//特殊样式
48 type: String, 48 type: String,
49 value: '', 49 value: '',
50 - } 50 + },
  51 + hasSuggestion:{//是否有搜索目的地
  52 + type: Boolean,
  53 + value: false,
  54 + },
51 }, 55 },
52 56
53 /** 57 /**
@@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
17 <view class="text flex-ll"> 17 <view class="text flex-ll">
18 <view class="text-item" wx:if="{{seller.cate[0].name}}">{{seller.cate[0].name}}</view> 18 <view class="text-item" wx:if="{{seller.cate[0].name}}">{{seller.cate[0].name}}</view>
19 <view class="text-item" wx:if="{{seller.room_num>0}}">{{seller.room_num}}个包间</view> 19 <view class="text-item" wx:if="{{seller.room_num>0}}">{{seller.room_num}}个包间</view>
20 - <view class="text-item" wx:if="{{seller.distance>=0 && seller.distance!==''}}">{{util.distance(seller.distance_centre||seller.distance)}}</view> 20 + <view class="text-item" wx:if="{{seller.distance>=0 && seller.distance!==''}}">{{hasSuggestion?'距搜索地':''}}{{util.distance(seller.distance_centre||seller.distance)}}</view>
21 </view> 21 </view>
22 <view wx:if="{{hasStat}}" class="stat"> 22 <view wx:if="{{hasStat}}" class="stat">
23 <stat stat="{{seller.score}}"></stat> 23 <stat stat="{{seller.score}}"></stat>
@@ -462,7 +462,7 @@ Page({ @@ -462,7 +462,7 @@ Page({
462 if(tags.length>0){ 462 if(tags.length>0){
463 param.tags=tags; 463 param.tags=tags;
464 } 464 }
465 - param.centre_pos=`${this.mapData.latitude},${this.mapData.longitude}` 465 + param.centre_pos=`${param.lat},${param.lng}`
466 if(this.data.hasSuggestion){ 466 if(this.data.hasSuggestion){
467 param.centre_pos=`${this.data.suggestion.latitude},${this.data.suggestion.longitude}` 467 param.centre_pos=`${this.data.suggestion.latitude},${this.data.suggestion.longitude}`
468 } 468 }
@@ -730,6 +730,8 @@ Page({ @@ -730,6 +730,8 @@ Page({
730 730
731 if(this.data.hasSuggestion){ 731 if(this.data.hasSuggestion){
732 map=this.data.suggestion 732 map=this.data.suggestion
  733 + }else{
  734 + map=this.data.map
733 } 735 }
734 mks.push({ 736 mks.push({
735 id: 'location', 737 id: 'location',
@@ -806,6 +808,7 @@ Page({ @@ -806,6 +808,7 @@ Page({
806 multiIndex:this.data.multiIndex, 808 multiIndex:this.data.multiIndex,
807 tags:this.param.tags, 809 tags:this.param.tags,
808 centre_pos:this.param.centre_pos, 810 centre_pos:this.param.centre_pos,
  811 + hasSuggestion:this.data.hasSuggestion?1:''
809 },'./indexList') 812 },'./indexList')
810 }); 813 });
811 }, 814 },
@@ -71,6 +71,7 @@ @@ -71,6 +71,7 @@
71 hasActivityTags="{{false}}" 71 hasActivityTags="{{false}}"
72 hasActivityShort="{{true}}" 72 hasActivityShort="{{true}}"
73 hasBrand="true" hasActivityTese="true" 73 hasBrand="true" hasActivityTese="true"
  74 + hasSuggestion="{{hasSuggestion}}"
74 hasSlogan="{{false}}"></sb-tr> 75 hasSlogan="{{false}}"></sb-tr>
75 </view> 76 </view>
76 </swiper-item> 77 </swiper-item>
@@ -20,6 +20,7 @@ Page({ @@ -20,6 +20,7 @@ Page({
20 markers:[], 20 markers:[],
21 hasMore:true, 21 hasMore:true,
22 hasDisabled:true, 22 hasDisabled:true,
  23 + hasSuggestion:false,
23 }, 24 },
24 25
25 /** 26 /**
@@ -28,6 +29,11 @@ Page({ @@ -28,6 +29,11 @@ Page({
28 onLoad: async function (options) { 29 onLoad: async function (options) {
29 //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 30 //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
30 this.options=options; 31 this.options=options;
  32 + if(options.hasSuggestion){
  33 + this.setData({
  34 + hasSuggestion:true
  35 + })
  36 + }
31 let tags=[ 37 let tags=[
32 {id:1,name:'环境好'}, 38 {id:1,name:'环境好'},
33 {id:2,name:'菜品有特色'}, 39 {id:2,name:'菜品有特色'},
@@ -43,6 +43,7 @@ @@ -43,6 +43,7 @@
43 hasActivityShort="{{true}}" 43 hasActivityShort="{{true}}"
44 hasBrand="true" hasActivityTese="true" 44 hasBrand="true" hasActivityTese="true"
45 hasSlogan="{{false}}" 45 hasSlogan="{{false}}"
  46 + hasSuggestion="{{hasSuggestion}}"
46 sellerStyle="noborder noshadow noradius"></sb-tr> 47 sellerStyle="noborder noshadow noradius"></sb-tr>
47 </view> 48 </view>
48 </view> 49 </view>
@@ -60,12 +60,12 @@ export default { @@ -60,12 +60,12 @@ export default {
60 60
61 //地图页-商家 61 //地图页-商家
62 'App.Customer.SellerList': { 62 'App.Customer.SellerList': {
63 - alias: 'App.Customer.NewSellerList' 63 + //alias: 'App.Customer.NewSellerList'
64 }, 64 },
65 65
66 //地图页-商家-列表 66 //地图页-商家-列表
67 'App.Customer.SellerLists':{ 67 'App.Customer.SellerLists':{
68 - alias: 'App.Customer.NewSellerLists' 68 + //alias: 'App.Customer.NewSellerLists'
69 }, 69 },
70 70
71 //桌位列表 71 //桌位列表