Commit 5bfa6ceb6ebeffd22379f09f2c9d504b24aad0aa

Authored by wangfan
1 parent 9957cf96

C端调整

@@ -71,7 +71,6 @@ Page({ @@ -71,7 +71,6 @@ Page({
71 * 生命周期函数--监听页面卸载 71 * 生命周期函数--监听页面卸载
72 */ 72 */
73 onUnload: function () { 73 onUnload: function () {
74 - PubSub.off('follow')  
75 }, 74 },
76 75
77 /** 76 /**
@@ -35,7 +35,7 @@ Page({ @@ -35,7 +35,7 @@ Page({
35 multiIndex: [0, 0], 35 multiIndex: [0, 0],
36 //scrollIntoView:'', 36 //scrollIntoView:'',
37 suggestion:{}, 37 suggestion:{},
38 - hasSuggestion:false, 38 + hasSuggestion:false,//搜索返回
39 current:0, 39 current:0,
40 hasSellers:false, 40 hasSellers:false,
41 hasGetSellersEnd:false, 41 hasGetSellersEnd:false,
@@ -56,7 +56,7 @@ Page({ @@ -56,7 +56,7 @@ Page({
56 * 生命周期函数--监听页面加载 56 * 生命周期函数--监听页面加载
57 */ 57 */
58 hasOnLoad:false, 58 hasOnLoad:false,
59 - hasGetLocation:false, 59 + hasGetLocation:false,//定位信息
60 onLoad: async function (options) { 60 onLoad: async function (options) {
61 this.hasOnLoad=true; 61 this.hasOnLoad=true;
62 // this.qqmapsdk=new QQMapWX({ 62 // this.qqmapsdk=new QQMapWX({
@@ -462,6 +462,7 @@ Page({ @@ -462,6 +462,7 @@ Page({
462 mk.display=''; 462 mk.display='';
463 } 463 }
464 }) 464 })
  465 + obj.markers=this.setLocationMarker(obj.markers);
465 this.setData(obj) 466 this.setData(obj)
466 if(now_sid.length>0) { 467 if(now_sid.length>0) {
467 setTimeout(() => { 468 setTimeout(() => {
@@ -483,7 +484,10 @@ Page({ @@ -483,7 +484,10 @@ Page({
483 map.latitude=this.user.latitude 484 map.latitude=this.user.latitude
484 map.longitude=this.user.longitude 485 map.longitude=this.user.longitude
485 map.scale=mapScale 486 map.scale=mapScale
  487 + this.sellersIds=[]
  488 + this.sellers=[]
486 this.setData({ 489 this.setData({
  490 + markers:[],
487 map:map, 491 map:map,
488 hasSuggestion:false, 492 hasSuggestion:false,
489 }) 493 })
@@ -579,4 +583,22 @@ Page({ @@ -579,4 +583,22 @@ Page({
579 } 583 }
580 ds.setA2LHeight(e.type=='hide'?0:40); 584 ds.setA2LHeight(e.type=='hide'?0:40);
581 }, 585 },
  586 + setLocationMarker(markers){
  587 + let lm=markers[markers.length-1];
  588 + if(lm && lm.id=='location'){
  589 + markers=markers.pop();
  590 + }
  591 + if(this.data.hasSuggestion){
  592 + let map = this.data.map;
  593 + markers.push({
  594 + id: 'location',
  595 + iconPath: "http://qn.colorcun.com/reserve/images/location.png"+cates_version,
  596 + latitude: map.latitude,
  597 + longitude: map.longitude,
  598 + width: 20,
  599 + height: 25,
  600 + })
  601 + }
  602 + return markers;
  603 + },
582 }) 604 })
@@ -50,7 +50,7 @@ @@ -50,7 +50,7 @@
50 interval="2000" duration="500" 50 interval="2000" duration="500"
51 previous-margin="{{20}}px" next-margin="{{20}}px" style="height: 350rpx;" 51 previous-margin="{{20}}px" next-margin="{{20}}px" style="height: 350rpx;"
52 current="{{current}}" bindchange="bindtransition" hidden="{{!hasSellers}}"> 52 current="{{current}}" bindchange="bindtransition" hidden="{{!hasSellers}}">
53 - <block wx:for="{{markers}}" wx:key="markers.key" > 53 + <block wx:for="{{markers}}" wx:key="markers.key" wx:if="{{item.id!='location'}}">
54 <swiper-item bindtap="gotoDetail" data-sid="{{item.id}}" wx:if="{{item.display!='none'}}"> 54 <swiper-item bindtap="gotoDetail" data-sid="{{item.id}}" wx:if="{{item.display!='none'}}">
55 <view class="seller" id="seller-{{item.id}}"> 55 <view class="seller" id="seller-{{item.id}}">
56 <sb-tr seller="{{item.seller}}" hasActivityTags="{{true}}"></sb-tr> 56 <sb-tr seller="{{item.seller}}" hasActivityTags="{{true}}"></sb-tr>