Commit f0f9bd241540a18686b8be31fdb3ff89bdb4889f

Authored by vking
1 parent b372084f

距离展示调整

@@ -77,8 +77,10 @@ Component({ @@ -77,8 +77,10 @@ Component({
77 offset:this.offset, 77 offset:this.offset,
78 size:this.size, 78 size:this.size,
79 distance:50, 79 distance:50,
80 - centre_pos:mapParam.centre_pos,  
81 }; 80 };
  81 + if(mapParam.centre_pos){
  82 + this.param.centre_pos=mapParam.centre_pos
  83 + }
82 if(mapParam.tags){ 84 if(mapParam.tags){
83 this.param.tags=mapParam.tags 85 this.param.tags=mapParam.tags
84 } 86 }
@@ -462,7 +462,9 @@ Page({ @@ -462,7 +462,9 @@ 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=`${param.lat},${param.lng}` 465 + if(param.lat){
  466 + param.centre_pos=`${param.lat},${param.lng}`
  467 + }
466 if(this.data.hasSuggestion){ 468 if(this.data.hasSuggestion){
467 param.centre_pos=`${this.data.suggestion.latitude},${this.data.suggestion.longitude}` 469 param.centre_pos=`${this.data.suggestion.latitude},${this.data.suggestion.longitude}`
468 } 470 }
@@ -730,16 +732,22 @@ Page({ @@ -730,16 +732,22 @@ Page({
730 732
731 if(this.data.hasSuggestion){ 733 if(this.data.hasSuggestion){
732 map=this.data.suggestion 734 map=this.data.suggestion
733 - }else{  
734 - map=this.data.map 735 + mks.push({
  736 + id: 'location',
  737 + iconPath: "http://qn.colorcun.com/reserve/images/location.png"+cates_version,
  738 + latitude: map.latitude,
  739 + longitude: map.longitude,
  740 + width: 20,
  741 + height: 25,
  742 + })
735 } 743 }
736 mks.push({ 744 mks.push({
737 id: 'location', 745 id: 'location',
738 - iconPath: "http://qn.colorcun.com/reserve/images/location.png"+cates_version,  
739 - latitude: map.latitude,  
740 - longitude: map.longitude,  
741 - width: 20,  
742 - height: 25, 746 + iconPath: "http://qn.colorcun.com/reserve/images/lme.png"+cates_version,
  747 + latitude: this.user.latitude,
  748 + longitude: this.user.longitude,
  749 + width: 18,
  750 + height: 30,
743 }) 751 })
744 return mks; 752 return mks;
745 }, 753 },
@@ -108,8 +108,10 @@ Page({ @@ -108,8 +108,10 @@ Page({
108 offset:this.offset, 108 offset:this.offset,
109 size:this.size, 109 size:this.size,
110 distance:500000, 110 distance:500000,
111 - centre_pos:`${mapParam.lat},${mapParam.lng}`,  
112 }; 111 };
  112 + if(mapParam.lat){
  113 + this.param.centre_pos=`${mapParam.lat},${mapParam.lng}`
  114 + }
113 }else{ 115 }else{
114 //计算视窗中心 116 //计算视窗中心
115 let map=JSON.parse(mapParam.map); 117 let map=JSON.parse(mapParam.map);
@@ -123,9 +125,12 @@ Page({ @@ -123,9 +125,12 @@ Page({
123 offset:this.offset, 125 offset:this.offset,
124 size:this.size, 126 size:this.size,
125 distance:50, 127 distance:50,
126 - centre_pos:mapParam.centre_pos,  
127 }; 128 };
  129 + if(mapParam.centre_pos){
  130 + this.param.centre_pos=mapParam.centre_pos
  131 + }
128 } 132 }
  133 +
129 if(this.data.multiIndex[0]>0){ 134 if(this.data.multiIndex[0]>0){
130 this.param.cuisine=await DA.getCatesID(this.data.multiIndex[0]-1); 135 this.param.cuisine=await DA.getCatesID(this.data.multiIndex[0]-1);
131 } 136 }