|
@@ -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
|
}) |