feat: 支持同卡种续卡叠加并修复过期登录态

支付成功后将次数或有效期叠加到已有会员卡,首页与详情页引导续卡;接口 401 时同步清掉本地登录态。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
richarjiang
2026-09-07 14:04:11 +08:00
parent 801e2f47da
commit 88cd8419c8
22 changed files with 1370 additions and 123 deletions

View File

@@ -440,7 +440,7 @@ export class UserService {
}
return this.prisma.membership.create({
data: { userId, ...data },
data: { userId, totalTimes: dto.remainingTimes ?? null, ...data },
include: { cardType: true },
})
}