|
...
|
...
|
@@ -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 |
...
|
...
|
|