feat: 完成原型04-10全链路功能开发,包括AI助手、PDF导出等
This commit is contained in:
@@ -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 }
|
||||
|
||||
Reference in New Issue
Block a user