|
@@ -44,17 +44,17 @@ export function getPosition() {
|
|
|
wx.ready(() => {
|
|
wx.ready(() => {
|
|
|
wx.getLocation({
|
|
wx.getLocation({
|
|
|
type: "gcj02",
|
|
type: "gcj02",
|
|
|
- success: (res) => {
|
|
|
|
|
|
|
+ success: (resData) => {
|
|
|
toastLoading().clear();
|
|
toastLoading().clear();
|
|
|
console.log("处理前");
|
|
console.log("处理前");
|
|
|
- console.log(res.latitude, res.longitude);
|
|
|
|
|
|
|
+ console.log(resData.latitude, resData.longitude);
|
|
|
// 定位坐标转换 腾讯转百度
|
|
// 定位坐标转换 腾讯转百度
|
|
|
- let TXisBD = CJ02BD(res.latitude, res.longitude);
|
|
|
|
|
|
|
+ let TXisBD = CJ02BD(resData.latitude, resData.longitude);
|
|
|
console.log("处理后");
|
|
console.log("处理后");
|
|
|
console.log(TXisBD);
|
|
console.log(TXisBD);
|
|
|
- localStorage.setItem("lat", res.latitude);
|
|
|
|
|
- localStorage.setItem("lon", res.longitude);
|
|
|
|
|
- resolve({ TXisBD, res });
|
|
|
|
|
|
|
+ localStorage.setItem("lat", resData.latitude);
|
|
|
|
|
+ localStorage.setItem("lon", resData.longitude);
|
|
|
|
|
+ resolve({ TXisBD, resData });
|
|
|
},
|
|
},
|
|
|
fail: () => {
|
|
fail: () => {
|
|
|
toastLoading().clear();
|
|
toastLoading().clear();
|