|
|
|
|
|
|
|
|
//app.js |
|
|
//app.js |
|
|
App({ |
|
|
App({ |
|
|
onLaunch: function () { |
|
|
|
|
|
|
|
|
onLaunch: function (options) { |
|
|
|
|
|
console.log(options); |
|
|
|
|
|
if (options.query && options.query.scene) { |
|
|
|
|
|
var source = decodeURIComponent(options.query.scene).split("="); |
|
|
|
|
|
this.globalData.sceneSource = source[1]; |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.globalData.sceneSource = options.scene |
|
|
|
|
|
} |
|
|
// 展示本地存储能力 |
|
|
// 展示本地存储能力 |
|
|
var openid = wx.getStorageSync('openid') || ""; |
|
|
var openid = wx.getStorageSync('openid') || ""; |
|
|
if (!openid) { |
|
|
if (!openid) { |
|
|
|
|
|
|
|
|
this.wxLogin(); |
|
|
this.wxLogin(); |
|
|
} else { |
|
|
} else { |
|
|
this.globalData.openid = openid; |
|
|
this.globalData.openid = openid; |
|
|
|
|
|
this.addAppEnter(); |
|
|
this.getBuyState(); |
|
|
this.getBuyState(); |
|
|
} |
|
|
} |
|
|
var entered = wx.getStorageSync('entered'); |
|
|
var entered = wx.getStorageSync('entered'); |
|
|
|
|
|
|
|
|
entered:false, |
|
|
entered:false, |
|
|
authenticationStatus:null, |
|
|
authenticationStatus:null, |
|
|
skipType:null, |
|
|
skipType:null, |
|
|
sceneSource:'0', |
|
|
|
|
|
|
|
|
sceneSource:'', |
|
|
addPageEnterState:{ |
|
|
addPageEnterState:{ |
|
|
index:false, |
|
|
index:false, |
|
|
luckyStar:false, |
|
|
luckyStar:false, |
|
|
|
|
|
|
|
|
if (!userInfoData) { |
|
|
if (!userInfoData) { |
|
|
this.getUserInfo(); |
|
|
this.getUserInfo(); |
|
|
} |
|
|
} |
|
|
|
|
|
this.addAppEnter(); |
|
|
this.getBuyState(); |
|
|
this.getBuyState(); |
|
|
} else { |
|
|
} else { |
|
|
wx.showToast({ |
|
|
wx.showToast({ |