diff --git a/app.js b/app.js index 7d7afb1..ab79f94 100644 --- a/app.js +++ b/app.js @@ -5,7 +5,6 @@ App({ onLaunch: function(options) { var that = this; that.globalData.sceneAddress = options.scene; - that.getLocation(); }, /** * 获取地址位置信息 diff --git a/pages/index/index.js b/pages/index/index.js index 3871d57..f082ae4 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -20,6 +20,7 @@ Page({ onLoad: function(options) { var that = this; var scene = decodeURIComponent(options.scene); + app.getLocation(); }, onShow: function() { @@ -51,7 +52,7 @@ Page({ code: code, sceneAddress: app.globalData.sceneAddress, latitude: '' + app.globalData.locationInfo.latitude, - longtitude: '' + app.globalData.locationInfo.longtitude, + longitude: '' + app.globalData.locationInfo.longitude, } }) .then(res => {