refactor: 重构存储与接口适配,统一金额单位与会话管理
- 新增配置、存储、金额转换工具服务 - 按userId隔离本地缓存,替换旧设备级存储 - 统一移动端金额单位为万元,新增转换适配逻辑 - 重构认证与请求逻辑,支持真实后端会话 - 调整搜索、帮助、融资模块的模拟开关与数据适配 - 更新文档说明开发状态与配置规则
This commit is contained in:
@@ -19,6 +19,8 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="uts">
|
||||
import { getUserStorage, setUserStorage } from '@/services/storage.uts'
|
||||
|
||||
import { usePageLayout } from '@/services/layout.uts'
|
||||
import AppHeader from '@/components/AppHeader.uvue'
|
||||
import BottomNav from '@/components/BottomNav.uvue'
|
||||
@@ -36,14 +38,14 @@
|
||||
const unreadCount = computed((): number => notices.value.filter((item: Notice): boolean => item.unread).length)
|
||||
onShow(() => {
|
||||
notices.value.forEach((item: Notice): void => {
|
||||
if (uni.getStorageSync('finance.notice.read.' + item.id) == true) item.unread = false
|
||||
if (getUserStorage('finance.notice.read.' + item.id) == true) item.unread = false
|
||||
})
|
||||
})
|
||||
const markRead = (id: string): void => {
|
||||
const item = notices.value.find((value: Notice): boolean => value.id == id)
|
||||
if (item == null) return
|
||||
item.unread = false
|
||||
uni.setStorageSync('finance.notice.read.' + id, true)
|
||||
setUserStorage('finance.notice.read.' + id, true)
|
||||
}
|
||||
const openNotice = (item: Notice): void => {
|
||||
markRead(item.id)
|
||||
|
||||
Reference in New Issue
Block a user