|
@@ -1958,6 +1958,7 @@ var SuperSearch = {
|
|
|
});
|
|
|
},
|
|
|
locationHomeData:function(){
|
|
|
+ SuperSearch.locationCount=1;//定位只查一次
|
|
|
wx.getLocation({
|
|
|
type: 'wgs84', // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02'
|
|
|
success: function (res) {
|
|
@@ -1969,10 +1970,17 @@ var SuperSearch = {
|
|
|
geoc.getLocation(point, function(rs) {
|
|
|
var addComp = rs.addressComponents;
|
|
|
//alert('您现在所处位置:'+addComp.province + ", "+addComp.city + ", "+addComp.district + ", "+addComp.street + ", "+addComp.streetNumber);
|
|
|
- SuperSearch.locationCount=1;//定位只查一次
|
|
|
SuperSearch.getHomeList(addComp.city,2);
|
|
|
});
|
|
|
- }
|
|
|
+ },
|
|
|
+ cancel:function(r){
|
|
|
+ //拒绝定位 地区参数为-:空
|
|
|
+ SuperSearch.getHomeList("",2);
|
|
|
+ },
|
|
|
+ fail:function(){
|
|
|
+ //定位失败 地区参数为-:空
|
|
|
+ SuperSearch.getHomeList("",2);
|
|
|
+ }
|
|
|
});
|
|
|
},
|
|
|
homePageShow:function(r){
|
|
@@ -2035,8 +2043,9 @@ var SuperSearch = {
|
|
|
}
|
|
|
}else{
|
|
|
if(!SuperSearch.isVip&&!SuperSearch.hasSubscribe&&SuperSearch.locationCount==0){
|
|
|
- console.log("+++++++++++=")
|
|
|
- SuperSearch.locationHomeData();
|
|
|
+ setTimeout(function(){
|
|
|
+ SuperSearch.locationHomeData();
|
|
|
+ },2000)
|
|
|
return
|
|
|
}
|
|
|
}
|