feat: 微信分享钩子全页面接入 + 订阅信息结构化映射 + JWT 错误处理加强

- client: 全部页面接入 onShareAppMessage/onShareTimeline 分享钩子
- client: login 页增强、profile 订阅展示优化
- client/stores: 订阅字段扁平结构映射为 subInfo(plan/expiresAt/startDate)
- server: auth 路由 JWT 无效/过期统一返回 401 未授权响应
- server: models/tests 同步更新
This commit is contained in:
Yuzhiran Dev
2026-09-04 11:47:29 +08:00
parent de8ca9c420
commit 66de1dc396
37 changed files with 2138 additions and 1830 deletions
+1
View File
@@ -4,6 +4,7 @@ const { Schema } = mongoose;
const TrendSchema = new Schema({
title: { type: String, required: true, trim: true },
summary: { type: String },
body: { type: String },
source: { type: String, default: '未知来源' },
sourceUrl: { type: String },
category: {
+5 -5
View File
@@ -94,11 +94,11 @@ const UserSchema = new Schema({
dim4Score: { type: Number, default: 0 },
dim5Score: { type: Number, default: 0 },
// 已解锁维度
unlockedDims: [{
type: Number,
enum: [1, 2, 3, 4, 5]
}],
// 已解锁维度(新用户默认解锁第1维度)
unlockedDims: {
type: [{ type: Number, enum: [1, 2, 3, 4, 5] }],
default: [1]
},
// 商品相关
ownedSkins: [{
+1 -1
View File
@@ -4,7 +4,7 @@ const { Schema } = mongoose
const VerificationCodeSchema = new Schema({
email: { type: String, required: true, index: true },
code: { type: String, required: true },
expiresAt: { type: Date, required: true, index: true },
expiresAt: { type: Date, required: true },
used: { type: Boolean, default: false },
createdAt: { type: Date, default: Date.now }
})