Commit 5bfa6ceb6ebeffd22379f09f2c9d504b24aad0aa

Authored by wangfan
1 parent 9957cf96

C端调整

... ... @@ -71,7 +71,6 @@ Page({
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
PubSub.off('follow')
},
/**
... ...
... ... @@ -35,7 +35,7 @@ Page({
multiIndex: [0, 0],
//scrollIntoView:'',
suggestion:{},
hasSuggestion:false,
hasSuggestion:false,//搜索返回
current:0,
hasSellers:false,
hasGetSellersEnd:false,
... ... @@ -56,7 +56,7 @@ Page({
* 生命周期函数--监听页面加载
*/
hasOnLoad:false,
hasGetLocation:false,
hasGetLocation:false,//定位信息
onLoad: async function (options) {
this.hasOnLoad=true;
// this.qqmapsdk=new QQMapWX({
... ... @@ -462,6 +462,7 @@ Page({
mk.display='';
}
})
obj.markers=this.setLocationMarker(obj.markers);
this.setData(obj)
if(now_sid.length>0) {
setTimeout(() => {
... ... @@ -483,7 +484,10 @@ Page({
map.latitude=this.user.latitude
map.longitude=this.user.longitude
map.scale=mapScale
this.sellersIds=[]
this.sellers=[]
this.setData({
markers:[],
map:map,
hasSuggestion:false,
})
... ... @@ -579,4 +583,22 @@ Page({
}
ds.setA2LHeight(e.type=='hide'?0:40);
},
setLocationMarker(markers){
let lm=markers[markers.length-1];
if(lm && lm.id=='location'){
markers=markers.pop();
}
if(this.data.hasSuggestion){
let map = this.data.map;
markers.push({
id: 'location',
iconPath: "http://qn.colorcun.com/reserve/images/location.png"+cates_version,
latitude: map.latitude,
longitude: map.longitude,
width: 20,
height: 25,
})
}
return markers;
},
})
\ No newline at end of file
... ...
... ... @@ -50,7 +50,7 @@
interval="2000" duration="500"
previous-margin="{{20}}px" next-margin="{{20}}px" style="height: 350rpx;"
current="{{current}}" bindchange="bindtransition" hidden="{{!hasSellers}}">
<block wx:for="{{markers}}" wx:key="markers.key" >
<block wx:for="{{markers}}" wx:key="markers.key" wx:if="{{item.id!='location'}}">
<swiper-item bindtap="gotoDetail" data-sid="{{item.id}}" wx:if="{{item.display!='none'}}">
<view class="seller" id="seller-{{item.id}}">
<sb-tr seller="{{item.seller}}" hasActivityTags="{{true}}"></sb-tr>
... ...