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
1b8b2769
Commit
1b8b2769
authored
May 28, 2020
by
郝聪敏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/animation' into 'master'
去掉created方法 See merge request
!17
parents
01b31208
5decc94b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
index.wpy
src/pages/index.wpy
+6
-8
No files found.
src/pages/index.wpy
View file @
1b8b2769
...
@@ -404,7 +404,6 @@
...
@@ -404,7 +404,6 @@
async getUserInfo (e) {
async getUserInfo (e) {
if (e.$wx.detail.userInfo) {
if (e.$wx.detail.userInfo) {
this.setUserInfo(e.$wx.detail.userInfo);
this.setUserInfo(e.$wx.detail.userInfo);
await this.getMainInfo();
this.authmodal = false;
this.authmodal = false;
this.registUser(e.$wx.detail.userInfo);
this.registUser(e.$wx.detail.userInfo);
}
}
...
@@ -558,8 +557,11 @@
...
@@ -558,8 +557,11 @@
}
}
}
}
},
},
async onLoad (options) {
if (options.openid) {
this.inviter = options.openid;
}
async created () {
let self = this;
let self = this;
let statusHeight = this.$app.$options.globalData.statusBarHeight || '';
let statusHeight = this.$app.$options.globalData.statusBarHeight || '';
statusHeight && (this.userImgStyle = 'top:' + statusHeight + 'px');
statusHeight && (this.userImgStyle = 'top:' + statusHeight + 'px');
...
@@ -573,12 +575,9 @@
...
@@ -573,12 +575,9 @@
}
}
});
});
}
}
await this.getMainInfo();
this.videoList = await getPrizeList();
this.videoList = await getPrizeList();
},
async onLoad (options) {
if (options.openid) {
this.inviter = options.openid;
}
// 如果已经存在store里就不用再获取用户信息了
// 如果已经存在store里就不用再获取用户信息了
this.adlist = await getActivityFeed({ count: 50 });
this.adlist = await getActivityFeed({ count: 50 });
if (!this.userInfo) {
if (!this.userInfo) {
...
@@ -587,7 +586,6 @@
...
@@ -587,7 +586,6 @@
const { userInfo } = await wepy.wx.getUserInfo();
const { userInfo } = await wepy.wx.getUserInfo();
this.setUserInfo(userInfo);
this.setUserInfo(userInfo);
this.registUser(userInfo);
this.registUser(userInfo);
await this.getMainInfo();
} else {
} else {
this.authmodal = true;
this.authmodal = true;
}
}
...
...
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