Files
airz-uniapp/services/finance.uts
T
hujun 94a4558290 feat: 完成项目基础功能搭建与样式优化
1.  新增评估选择组件、本地草稿存储与新闻/金融内容服务
2.  重构页面布局与样式:调整按钮阴影、图标尺寸、导航栏样式
3.  更新启动页、报告页、消息中心等页面UI与交互逻辑
4.  替换图标资源,调整禁用态透明度
5.  补充README文档与本地数据模拟实现
2026-09-18 12:59:43 +08:00

25 lines
2.1 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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 ?? '以机构要求为准'
}
}