feat: login rest

This commit is contained in:
Blizzard
2026-02-12 09:26:39 +08:00
parent e97fd30fa3
commit 5553e2711a
115 changed files with 4090 additions and 3499 deletions
+10 -2
View File
@@ -12,7 +12,8 @@ Page({
isLoading: false,
current: 1,
pageSize: 10,
hasMore: true
hasMore: true,
userInfo: null
},
onLoad() {
@@ -23,6 +24,13 @@ Page({
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
this.getTabBar().setData({ selected: 2 });
}
// Update user info for header
const app = getApp();
const info = app.globalData.userInfo || wx.getStorageSync('userInfo');
if (info) {
this.setData({ userInfo: info });
}
},
// Called by create post page
@@ -67,7 +75,7 @@ Page({
return {
id: item.id,
user: publisher.nickName || publisher.name || '花友',
avatar: avatarObj.url || '/assets/default_avatar.png',
avatar: avatarObj.url,
content: item.content,
images: (item.imgList || []).map(img => img.url),
time: item.createdAtStr || '刚刚',