Commit ffb4efd1 authored by ziyu's avatar ziyu

improvement: 测试全局变量

parent cbffa4f7
......@@ -9,7 +9,11 @@ wepy.app({
// App 级别 hook,对整个 App 生效
// 同时存在 Page hook 和 App hook 时,优先执行 Page hook,返回值再交由 App hook 处
},
globalData: {
info:''
},
onLaunch() {
// this.$options.globalData.info = '333';
wx.checkSession({
success () {
console.log('已登录')
......
......@@ -467,6 +467,7 @@
},
onLoad () {
let that = this;
// console.log(this.$app.$options.globalData.info,111)
//如果已经存在store里就不用再获取用户信息了
if(this.userInfo) return;
wx.getSetting({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment