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