chore: update pom.xml Lombok config and deploy settings
- Update Maven compiler plugin to support Lombok annotation processing - Add deploy.conf for automated deployment - Update backend models and controllers - Update frontend pages and API
This commit is contained in:
@@ -243,10 +243,12 @@ export default {
|
||||
try {
|
||||
const { setSignIntegral, getUserInfo } = await import('@/api/user.js');
|
||||
const { getUserPoints } = await import('@/api/tool.js');
|
||||
// 子问题 A:不在 API 成功前修改 currentPoints,避免积分提前跳变
|
||||
// 子问题 A:不得在 API 返回成功前修改 currentPoints,避免打卡前积分提前跳变
|
||||
// 打卡接口:GET /api/front/user/sign/integral(setSignIntegral)
|
||||
await setSignIntegral();
|
||||
this.todaySigned = true;
|
||||
// 子问题 B:打卡成功后用服务端最新积分刷新,优先 GET /api/front/user/info,禁止前端本地 +30
|
||||
// 子问题 B:仅用服务端返回的积分更新 currentPoints,禁止前端本地 +30
|
||||
// 先 GET /api/front/user(getUserInfo)刷新用户信息,取 integral 赋给 currentPoints
|
||||
const userRes = await getUserInfo();
|
||||
if (userRes && userRes.data && (userRes.data.integral != null || userRes.data.points != null)) {
|
||||
this.currentPoints = userRes.data.integral ?? userRes.data.points ?? 0;
|
||||
|
||||
Reference in New Issue
Block a user