diff --git a/pages/homePage/homePage.js b/pages/homePage/homePage.js index 5c2be6f..ce321fc 100644 --- a/pages/homePage/homePage.js +++ b/pages/homePage/homePage.js @@ -25,10 +25,11 @@ Page({ }, onLoad: function (options) { + // 进入过首页 可以由分享进入页面 + app.globalData.shareInState = 0; GetUserProfile(function (res) { 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 ed4fd8d..c71d2d0 100644 --- a/pages/login/login.js +++ b/pages/login/login.js @@ -121,8 +121,6 @@ Page({ // 页面生命周期函数 onShow: function() { var that = this; - //由登录页面进入详情页变更值为0;分享直接进入为1 - app.globalData.shareInState = 0; wx.login({ success: function(res) { let code = res.code;