feat: 完成原型04-10全链路功能开发,包括AI助手、PDF导出等

This commit is contained in:
hujun
2026-09-28 17:50:46 +08:00
parent 7c252fc730
commit 79feb03b19
27 changed files with 1083 additions and 180 deletions
+18 -2
View File
@@ -27,7 +27,23 @@
import { API_BASE_URL, requestSmsCode, loginWithSms, loginWithPassword } from '@/packages/account/services/auth.uts'
import { showAgreementNotice } from '@/services/assessment.uts'
import { consumeInitialLaunch } from '@/services/launch.uts'
onLoad(() => { consumeInitialLaunch() })
import { assistantReturnPath } from '@/services/assistant-return.uts'
import { nextStepRoute } from '@/services/next-step-route.uts'
import { reportRoute } from '@/services/report-route.uts'
let afterLoginUrl = '/pages/home/home'
onLoad((options) => {
consumeInitialLaunch()
if (options?.['resumeAssistant'] == '1') {
const target = assistantReturnPath(options?.['assessmentId'] ?? '', options?.['productIds'] ?? '', options?.['chatId'] ?? '', options?.['from'] ?? '')
if (target.length > 0) afterLoginUrl = target
} else if (options?.['resumeNextStep'] == '1') {
const target = nextStepRoute(options?.['assessmentId'] ?? '', options?.['productId'] ?? '', options?.['section'] ?? 'actions')
if (target.length > 0) afterLoginUrl = target
} else if (options?.['resumeReport'] == '1') {
const target = reportRoute(options?.['assessmentId'] ?? '', options?.['tab'] ?? 'overview')
if (target.length > 0) afterLoginUrl = target
}
})
const { statusStyle, contentStyle, pageStyle } = usePageLayout()
const mode = ref('password')
const phone = ref('')
@@ -58,7 +74,7 @@
if (countdown.value <= 1) { countdown.value = 0; clearInterval(countdownTimer) } else countdown.value -= 1
}, 1000)
}
const finishLogin = (_token: string) => { uni.redirectTo({ url: '/pages/home/home' }) }
const finishLogin = (_token: string) => { uni.redirectTo({ url: afterLoginUrl }) }
const resendSms = async () => {
if (loading.value || countdown.value > 0 || !validPhone()) return
if (!agreed.value) { errorMessage.value = '请先阅读并勾选用户协议与隐私政策'; return }