chore: 清理冗余代码并补全私信/搜索/故事/通知功能

- 删除未使用的空组件目录、死代码导出(clearAuth/calcDistance/COLORS/
  AVATAR_GRADIENTS/Message/TabBarItem/deletePost/uploadImage/getFileURL/
  _initLogin),确保程序仍可正常运行
- 新增 8 个云函数并补全对应页面逻辑:getMessages/sendMessage(私信聊天)、
  getHotTopics/searchPosts/searchUsers(搜索)、getStory(故事,复用 posts
  集合)、getNotifications/markAllRead(基于点赞评论聚合的通知系统)
- 在 cloudbaserc.json 中注册全部新云函数,并通过 --deployMode zip 完成部署

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-07 16:27:28 +08:00
parent 3d21a9d297
commit b02e26f602
27 changed files with 457 additions and 102 deletions

View File

@@ -1,5 +1,5 @@
import { UserProfile, GeoPoint, AppGlobalData } from './types/index'
import { getCachedUser, login } from './utils/auth'
import { AppGlobalData } from './types/index'
import { getCachedUser } from './utils/auth'
import { CLOUD_ENV, HEARTBEAT_INTERVAL_MS } from './utils/constants'
import { api } from './utils/api'
@@ -44,16 +44,6 @@ App<{ globalData: AppGlobalData }>({
this._stopLocationHeartbeat()
},
async _initLogin() {
try {
const userInfo = await login()
this.globalData.userInfo = userInfo
this.globalData.isLoggedIn = true
} catch (e) {
console.error('Login failed', e)
}
},
_initLocation() {
wx.getLocation({
type: 'gcj02',