diff --git a/pages/homePage/homePage.js b/pages/homePage/homePage.js index 22cc6ca..1a81017 100644 --- a/pages/homePage/homePage.js +++ b/pages/homePage/homePage.js @@ -19,6 +19,8 @@ Page({ onLoad: function(options) { var that = this; + //由登录页面进入详情页变更值为0;分享直接进入为1 + app.globalData.shareInState = 0; // 添加接口请求当前余额 GetUserProfile(function(res) { if (res != null) { @@ -28,7 +30,6 @@ Page({ } var shareURL = app.globalData.shareInPath; if (shareURL) { - app.globalData.shareInState = 0, wx.navigateTo({ url: "../../" + shareURL, complete: function (res) { diff --git a/pages/login/login.js b/pages/login/login.js index d4ce37d..9d9bdbb 100644 --- a/pages/login/login.js +++ b/pages/login/login.js @@ -137,8 +137,6 @@ Page({ // 页面生命周期函数 onShow: function () { var that = this; - //由登录页面进入详情页变更值为0;分享直接进入为1 - app.globalData.shareInState = 0; wx.login({ success: function (res) { let code = res.code;