refactor: 重构存储与接口适配,统一金额单位与会话管理
- 新增配置、存储、金额转换工具服务 - 按userId隔离本地缓存,替换旧设备级存储 - 统一移动端金额单位为万元,新增转换适配逻辑 - 重构认证与请求逻辑,支持真实后端会话 - 调整搜索、帮助、融资模块的模拟开关与数据适配 - 更新文档说明开发状态与配置规则
This commit is contained in:
@@ -24,12 +24,12 @@
|
||||
<script setup lang="uts">
|
||||
import { usePageLayout } from '@/services/layout.uts'
|
||||
import BrandLogo from '@/components/BrandLogo.uvue'
|
||||
import { API_BASE_URL, requestSmsCode, loginWithSms, loginWithPassword, saveSession } from '@/packages/account/services/auth.uts'
|
||||
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() })
|
||||
const { statusStyle, contentStyle, pageStyle } = usePageLayout()
|
||||
const mode = ref('phone')
|
||||
const mode = ref('password')
|
||||
const phone = ref('')
|
||||
const password = ref('')
|
||||
const smsCode = ref('')
|
||||
@@ -58,7 +58,7 @@
|
||||
if (countdown.value <= 1) { countdown.value = 0; clearInterval(countdownTimer) } else countdown.value -= 1
|
||||
}, 1000)
|
||||
}
|
||||
const finishLogin = (token: string) => { saveSession(token, phone.value); uni.redirectTo({ url: '/pages/home/home' }) }
|
||||
const finishLogin = (_token: string) => { uni.redirectTo({ url: '/pages/home/home' }) }
|
||||
const resendSms = async () => {
|
||||
if (loading.value || countdown.value > 0 || !validPhone()) return
|
||||
if (!agreed.value) { errorMessage.value = '请先阅读并勾选用户协议与隐私政策'; return }
|
||||
|
||||
Reference in New Issue
Block a user