Browse Source

在首页添加分享是否可以直接进入页面的判断

master
chenxuhui 7 years ago
parent
commit
684059d197
2 changed files with 2 additions and 3 deletions
  1. +2
    -1
      pages/homePage/homePage.js
  2. +0
    -2
      pages/login/login.js

+ 2
- 1
pages/homePage/homePage.js View File

@ -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) {


+ 0
- 2
pages/login/login.js View File

@ -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;


Loading…
Cancel
Save