feat: 优化账户切换时的页面状态一致性,增加登录回跳校验和课程阅读新逻辑
- 增加账户状态监听定时器,页面切换时自动校验账户归属,避免跨账户操作 - 新增登录回跳路径校验函数,限制仅允许指定页面回跳,防止非法跳转 - 课程页改为整篇连续阅读,底部仅一次标记已读,兼容历史记录 - 完善助手、对比页、资料填写页等多处的账户状态校验逻辑,防止错版数据提交 - 优化账户资料请求逻辑,增加版本校验,避免旧请求覆盖新数据
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
import { assistantReturnPath } from '@/services/assistant-return.uts'
|
||||
import { nextStepRoute } from '@/services/next-step-route.uts'
|
||||
import { reportRoute } from '@/services/report-route.uts'
|
||||
import { matchReturnPath } from '@/packages/finance/services/compare.uts'
|
||||
let afterLoginUrl = '/pages/home/home'
|
||||
onLoad((options) => {
|
||||
consumeInitialLaunch()
|
||||
@@ -50,6 +51,9 @@
|
||||
} else if (options?.['resumeReport'] == '1') {
|
||||
const target = reportRoute(options?.['assessmentId'] ?? '', options?.['tab'] ?? 'overview', options?.['revisionId'] ?? '')
|
||||
if (target.length > 0) afterLoginUrl = target
|
||||
} else if (options?.['resumeMatch'] == '1') {
|
||||
const target = matchReturnPath(options?.['matchPage'] ?? '', options?.['assessmentId'] ?? '', options?.['productIds'] ?? '', options?.['revisionId'] ?? '', options?.['productId'] ?? '', options?.['group'] ?? 'eligible', options?.['tab'] ?? 'explanation', options?.['from'] ?? '')
|
||||
if (target.length > 0) afterLoginUrl = target
|
||||
} else if (options?.['resumePoints'] == '1') {
|
||||
afterLoginUrl = '/packages/account/points/points'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user