|
|
@ -37,7 +37,7 @@ Vue.prototype.wxLocation = function () { |
|
|
type: "gcj02", // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02'
|
|
|
type: "gcj02", // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02'
|
|
|
success: function (res) { |
|
|
success: function (res) { |
|
|
console.log('res:'+res); |
|
|
console.log('res:'+res); |
|
|
alert('res:'+res); |
|
|
|
|
|
|
|
|
alert('res.latitude:'+res.latitude+'------res.longitude:'+res.longitude); |
|
|
localStorage.setItem("latitude", res.latitude); |
|
|
localStorage.setItem("latitude", res.latitude); |
|
|
localStorage.setItem("longitude", res.longitude); |
|
|
localStorage.setItem("longitude", res.longitude); |
|
|
$.ajax({ |
|
|
$.ajax({ |
|
|
@ -46,8 +46,7 @@ Vue.prototype.wxLocation = function () { |
|
|
dataType: "jsonp", |
|
|
dataType: "jsonp", |
|
|
jsonp: "callback", |
|
|
jsonp: "callback", |
|
|
success: function (data) { |
|
|
success: function (data) { |
|
|
console.log('data:'+data); |
|
|
|
|
|
alert('data:'+data); |
|
|
|
|
|
|
|
|
alert('data.result:'+data.result); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|