Showing
2 changed files
with
8 additions
and
16 deletions
| @@ -77,20 +77,12 @@ Component({ | @@ -77,20 +77,12 @@ Component({ | ||
| 77 | methods: { | 77 | methods: { |
| 78 | init() { | 78 | init() { |
| 79 | let seller = this.data.seller | 79 | let seller = this.data.seller |
| 80 | - if (seller.distance || seller.distance !== "") { | ||
| 81 | - seller.distance = parseInt(seller.distance); | ||
| 82 | - if (seller.distance > 1000) { | ||
| 83 | - seller.distanceStr = (seller.distance / 1000).toFixed(2) + 'km' | ||
| 84 | - } else { | ||
| 85 | - seller.distanceStr = seller.distance + 'm'; | ||
| 86 | - } | ||
| 87 | - if (seller.label_c && seller.label_c.length > 0) { | ||
| 88 | - let label_cstr = []; | ||
| 89 | - seller.label_c.forEach(l => { | ||
| 90 | - label_cstr.push(l.name) | ||
| 91 | - }) | ||
| 92 | - seller.label_cstr = label_cstr.join(' | ') | ||
| 93 | - } | 80 | + if (seller && seller.label_c && seller.label_c.length > 0) { |
| 81 | + let label_cstr = []; | ||
| 82 | + seller.label_c.forEach(l => { | ||
| 83 | + label_cstr.push(l.name) | ||
| 84 | + }) | ||
| 85 | + seller.label_cstr = label_cstr.join(' | ') | ||
| 94 | this.setData({ | 86 | this.setData({ |
| 95 | se: seller, | 87 | se: seller, |
| 96 | }) | 88 | }) |
| @@ -716,7 +716,7 @@ Page({ | @@ -716,7 +716,7 @@ Page({ | ||
| 716 | let matchPosNum=1 | 716 | let matchPosNum=1 |
| 717 | if(markers.length>0){ | 717 | if(markers.length>0){ |
| 718 | markers.forEach(mk=>{ | 718 | markers.forEach(mk=>{ |
| 719 | - if(mk.id!='location' | 719 | + if(mk.id!='location' && mk.id!='locationMe' |
| 720 | && mk.latitude>map.region.southwest.latitude | 720 | && mk.latitude>map.region.southwest.latitude |
| 721 | && mk.longitude>map.region.southwest.longitude | 721 | && mk.longitude>map.region.southwest.longitude |
| 722 | && mk.latitude<map.region.northeast.latitude | 722 | && mk.latitude<map.region.northeast.latitude |
| @@ -742,7 +742,7 @@ Page({ | @@ -742,7 +742,7 @@ Page({ | ||
| 742 | }) | 742 | }) |
| 743 | } | 743 | } |
| 744 | mks.push({ | 744 | mks.push({ |
| 745 | - id: 'location', | 745 | + id: 'locationMe', |
| 746 | iconPath: "http://qn.colorcun.com/reserve/images/lme.png"+cates_version, | 746 | iconPath: "http://qn.colorcun.com/reserve/images/lme.png"+cates_version, |
| 747 | latitude: this.user.latitude, | 747 | latitude: this.user.latitude, |
| 748 | longitude: this.user.longitude, | 748 | longitude: this.user.longitude, |
-
Please register or login to post a comment