refactor: 重构存储与接口适配,统一金额单位与会话管理

- 新增配置、存储、金额转换工具服务
- 按userId隔离本地缓存,替换旧设备级存储
- 统一移动端金额单位为万元,新增转换适配逻辑
- 重构认证与请求逻辑,支持真实后端会话
- 调整搜索、帮助、融资模块的模拟开关与数据适配
- 更新文档说明开发状态与配置规则
This commit is contained in:
hujun
2026-09-22 17:25:52 +08:00
parent 4a69357606
commit dcf12a4471
25 changed files with 1619 additions and 143 deletions
+3 -3
View File
@@ -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 }