Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mini-program-wepy
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ui
mini-program-wepy
Commits
99128fa4
Commit
99128fa4
authored
May 20, 2020
by
付清曌
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/userinfo' into 'master'
Feature/userinfo See merge request
!2
parents
a4c4f49a
0e53636b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
app.wpy
src/app.wpy
+4
-0
index.wpy
src/pages/index.wpy
+7
-0
No files found.
src/app.wpy
View file @
99128fa4
...
...
@@ -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('已登录')
...
...
src/pages/index.wpy
View file @
99128fa4
...
...
@@ -229,6 +229,12 @@
</swiper-item>
</swiper>
</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>
<!-- <star-animation></star-animation> -->
<star-animation1 v-if="sign && showAnimation"></star-animation1>
...
...
@@ -467,6 +473,7 @@
},
onLoad () {
let that = this;
// console.log(this.$app.$options.globalData.info,111)
//如果已经存在store里就不用再获取用户信息了
if(this.userInfo) return;
wx.getSetting({
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment