广场页面跳转接口回显优化
This commit is contained in:
parent
d24b924104
commit
cce48e5297
@ -177,7 +177,7 @@ public class AppUserInfoController {
|
||||
}
|
||||
|
||||
|
||||
@Login
|
||||
|
||||
@PostMapping("/userRank")
|
||||
@ApiOperation("发帖达人列表")
|
||||
public R userRank() {
|
||||
|
@ -40,6 +40,7 @@
|
||||
if (res.code == 0) {
|
||||
uni.setStorageSync("hasLogin", true);
|
||||
uni.setStorageSync("token", res.token);
|
||||
uni.setStorageSync("linfeng", "lf");
|
||||
uni.switchTab({
|
||||
url: '/pages/index/index'
|
||||
});
|
||||
|
@ -49,6 +49,7 @@
|
||||
if (res.code === 0) {
|
||||
uni.setStorageSync("hasLogin", true);
|
||||
uni.setStorageSync("token", res.token);
|
||||
uni.setStorageSync("linfeng", "lf");
|
||||
that.getUserInfo();
|
||||
uni.switchTab({
|
||||
url: '/pages/index/index'
|
||||
|
@ -81,7 +81,16 @@
|
||||
this.getBannerList();
|
||||
this.getClassList();
|
||||
this.getUserRanking();
|
||||
this.getPostList();
|
||||
if (uni.getStorageSync("hasLogin")) {
|
||||
this.getPostList();
|
||||
} else {
|
||||
this.goLogin()
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
if (uni.getStorageSync("linfeng")) {
|
||||
this.getPostList();
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.pageCurrent == 0) {
|
||||
@ -121,6 +130,19 @@
|
||||
url: '/pages/post/add'
|
||||
})
|
||||
},
|
||||
goLogin() {
|
||||
// #ifdef MP-WEIXIN
|
||||
uni.navigateTo({
|
||||
url: "/pages/login/weixin"
|
||||
})
|
||||
// #endif
|
||||
|
||||
// #ifdef H5
|
||||
uni.navigateTo({
|
||||
url: "/pages/login/login"
|
||||
})
|
||||
// #endif
|
||||
},
|
||||
pageTabChange(index) {
|
||||
this.pageCurrent = index
|
||||
},
|
||||
@ -145,6 +167,7 @@
|
||||
},
|
||||
// 根据分页和分类展示帖子列表
|
||||
getPostList() {
|
||||
uni.removeStorageSync("linfeng");
|
||||
this.loadPostStatus = 'loading';
|
||||
this.$H
|
||||
.post('post/list', {
|
||||
|
Loading…
x
Reference in New Issue
Block a user