feat: chat integration, tenant admin spec, backend chat service, miniprogram updates, DEMO moved to tmp, XCX-TEST removed, migrations & docs

This commit is contained in:
Neo
2026-03-20 09:02:10 +08:00
parent 3d2e5f8165
commit beb88d5bea
388 changed files with 6436 additions and 25458 deletions

View File

@@ -0,0 +1,29 @@
// app.ts
// DEMO 演示版 — 跳过真实鉴权,有 token 直接进主页,无 token 停留登录页
App<IAppOption>({
globalData: {},
onLaunch() {
// 从 Storage 恢复 token 和用户信息
const token = wx.getStorageSync("token")
if (token) {
this.globalData.token = token
this.globalData.refreshToken = wx.getStorageSync("refreshToken")
const userId = wx.getStorageSync("userId")
if (userId) {
this.globalData.authUser = {
userId,
status: wx.getStorageSync("userStatus") || "approved",
role: wx.getStorageSync("userRole") || '',
storeName: wx.getStorageSync("storeName") || '',
coachLevel: wx.getStorageSync("coachLevel") || '',
avatar: wx.getStorageSync("avatar") || '',
}
}
// DEMO有 token 直接进主页,不调用真实 API
wx.reLaunch({ url: "/pages/task-list/task-list" })
}
// 无 token → 停留在 login 页(首页已设为 login
},
})