Browse Source

打印测试

feature/3.1.0-小区合伙人
lfs3 6 years ago
parent
commit
4640d99867
1 changed files with 4 additions and 4 deletions
  1. 8
      src/models/wxLocation.js

8
src/models/wxLocation.js

@ -32,7 +32,7 @@ Vue.prototype.wxLocation = function () {
}); });
wx.ready(() => { wx.ready(() => {
// 首次进入页面进会弹窗确认地理位置 // 首次进入页面进会弹窗确认地理位置
if (localStorage.getItem("latitude") == null) {
// if (localStorage.getItem("latitude") == null) {
wx.getLocation({ wx.getLocation({
type: "gcj02", // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02' type: "gcj02", // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02'
success: function (res) { success: function (res) {
@ -55,10 +55,10 @@ Vue.prototype.wxLocation = function () {
alert("拒绝定位"); alert("拒绝定位");
} }
}); });
} else {
// } else {
}
alert("lat:" + localStorage.getItem("latitude") + ";lng:" + localStorage.getItem("longitude"));
// }
// alert("lat:" + localStorage.getItem("latitude") + ";lng:" + localStorage.getItem("longitude"));
wx.error(function (res) { wx.error(function (res) {
alert("wx-js初始化: " + res); alert("wx-js初始化: " + res);
}); });

Loading…
Cancel
Save