refactor: 重构项目分包结构与资源管理
1. 调整页面路由,将业务页面迁移到对应分包,主包仅保留首页 2. 拆分公共服务模块,将账户、融资相关逻辑移入对应分包 3. 统一资源路径,将专属静态资源放入各分包static目录,更新导航栏图标资源 4. 修复启动引导逻辑,实现仅首次冷启动显示引导页 5. 更新README文档,补充分包配置与开发规范说明
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
export type FinanceProduct = {
|
||||
id: string, bank: string, initials: string, color: string,
|
||||
amount: number, rate: number, term: string, score: number,
|
||||
advantages: string[], age: string, work: string, credit: string, materials: string
|
||||
}
|
||||
|
||||
// 列表和详情共用产品标识;正式数据由 API 适配层提供。
|
||||
export const demoProducts: FinanceProduct[] = [
|
||||
{ id: '1', bank: '招商银行·闪电贷', initials: '招', color: '#c93547', amount: 50, rate: 3.85, term: '12–36个月', score: 96, advantages: ['线上申请', '无需抵押', '额度循环', '还款灵活'], age: '22–55周岁', work: '现单位工作满6个月', credit: '近两年无严重逾期', materials: '身份证 · 银行卡 · 收入证明' },
|
||||
{ id: '2', bank: '平安银行·新一贷', initials: '平', color: '#ed7924', amount: 30, rate: 4.20, term: '12–60个月', score: 91, advantages: ['信用融资', '期限可选', '在线预审', '无需担保'], age: '23–55周岁', work: '有稳定工作或经营收入', credit: '征信记录良好', materials: '身份证 · 收入证明 · 居住证明' },
|
||||
{ id: '3', bank: '建设银行·快e贷', initials: '建', color: '#2869b7', amount: 20, rate: 4.35, term: '12–36个月', score: 88, advantages: ['线上办理', '便捷用款', '信用授信', '支持提前还款'], age: '22–60周岁', work: '有稳定收入来源', credit: '符合机构信用要求', materials: '身份证 · 银行卡 · 资产或收入证明' }
|
||||
]
|
||||
|
||||
export function parseProduct(item: UTSJSONObject): FinanceProduct {
|
||||
return {
|
||||
id: item['id'] as string ?? '', bank: item['bank'] as string ?? '融资产品',
|
||||
initials: item['initials'] as string ?? '融', color: item['color'] as string ?? '#2869b7',
|
||||
amount: item['amount'] as number ?? 0, rate: item['rate'] as number ?? 0,
|
||||
term: item['term'] as string ?? '以审批为准', score: item['score'] as number ?? 0,
|
||||
advantages: item['advantages'] as string[] ?? [], age: item['age'] as string ?? '以机构要求为准',
|
||||
work: item['work'] as string ?? '以机构要求为准', credit: item['credit'] as string ?? '以机构要求为准',
|
||||
materials: item['materials'] as string ?? '以机构要求为准'
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user