Commit 99128fa4 authored by 付清曌's avatar 付清曌

Merge branch 'feature/userinfo' into 'master'

Feature/userinfo

See merge request !2
parents a4c4f49a 0e53636b
...@@ -9,7 +9,11 @@ wepy.app({ ...@@ -9,7 +9,11 @@ wepy.app({
// App 级别 hook,对整个 App 生效 // App 级别 hook,对整个 App 生效
// 同时存在 Page hook 和 App hook 时,优先执行 Page hook,返回值再交由 App hook 处 // 同时存在 Page hook 和 App hook 时,优先执行 Page hook,返回值再交由 App hook 处
}, },
globalData: {
info:''
},
onLaunch() { onLaunch() {
// this.$options.globalData.info = '333';
wx.checkSession({ wx.checkSession({
success () { success () {
console.log('已登录') console.log('已登录')
......
...@@ -229,6 +229,12 @@ ...@@ -229,6 +229,12 @@
</swiper-item> </swiper-item>
</swiper> </swiper>
</view> </view>
<view class="authmodal" v-show="authmodal">
<view class="wrap">
<view class="text">来到lukii,再平凡的人,也有幸运的权利!</view>
<button open-type="getUserInfo" bindgetuserinfo="getUserInfo">授权并进入</button>
</view>
</view>
<network v-if="!isConnected"></network> <network v-if="!isConnected"></network>
<!-- <star-animation></star-animation> --> <!-- <star-animation></star-animation> -->
<star-animation1 v-if="sign && showAnimation"></star-animation1> <star-animation1 v-if="sign && showAnimation"></star-animation1>
...@@ -467,6 +473,7 @@ ...@@ -467,6 +473,7 @@
}, },
onLoad () { onLoad () {
let that = this; let that = this;
// console.log(this.$app.$options.globalData.info,111)
//如果已经存在store里就不用再获取用户信息了 //如果已经存在store里就不用再获取用户信息了
if(this.userInfo) return; if(this.userInfo) return;
wx.getSetting({ 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