feat: 完成项目基础功能搭建与样式优化

1.  新增评估选择组件、本地草稿存储与新闻/金融内容服务
2.  重构页面布局与样式:调整按钮阴影、图标尺寸、导航栏样式
3.  更新启动页、报告页、消息中心等页面UI与交互逻辑
4.  替换图标资源,调整禁用态透明度
5.  补充README文档与本地数据模拟实现
This commit is contained in:
hujun
2026-09-18 12:59:43 +08:00
parent b0ee4f9d7e
commit 94a4558290
30 changed files with 1376 additions and 640 deletions
+41 -20
View File
@@ -1,32 +1,53 @@
<template>
<view class="page" :style="pageStyle()">
<view class="page page-white" :style="pageStyle()">
<AppHeader title="新闻详情" />
<scroll-view scroll-y class="detail-scroll" :style="contentStyle(96, false)"><view class="detail-content"><text class="detail-title">{{ title }}</text><view class="detail-meta"><text>融资课堂 · 2026-09-08</text><text>6 分钟阅读</text></view><image class="detail-image" src="/static/mobile/images/news-city.png" mode="aspectFill"></image><text class="detail-paragraph">融资申请前,先把自己的征信、收入和负债情况梳理清楚,可以显著减少补充资料的时间,也更容易选择适合自己的产品。</text><text class="detail-heading">一、先看信用记录</text><text class="detail-paragraph">保持按时还款,控制信用卡使用率,并提前处理逾期或异常记录。机构会综合判断信用历史的连续性和稳定性。</text><text class="detail-heading">二、准备稳定的收入证明</text><text class="detail-paragraph">工资流水、纳税记录和经营收款记录都可以帮助机构了解还款能力。资料越完整,评估结果越稳定。</text><text class="detail-heading">三、选择匹配的融资方案</text><text class="detail-paragraph">额度、利率、期限和还款方式需要一起比较,优先选择与自身现金流匹配的产品。</text></view></scroll-view>
<scroll-view scroll-y :style="contentStyle(96, false)">
<view v-if="available" class="detail-content">
<text class="detail-category">{{ article.category }}</text><text class="detail-title">{{ article.title }}</text>
<text class="detail-source">{{ article.source }}</text><text class="detail-meta">{{ article.date }} · {{ article.readingTime }}阅读</text>
<image class="detail-image" :src="article.image" mode="aspectFill"></image>
<text class="detail-summary">{{ article.summary }}</text>
<view v-for="section in article.sections" :key="section.title" class="detail-section"><text class="detail-heading">{{ section.title }}</text><text class="detail-paragraph">{{ section.body }}</text></view>
<text class="detail-note">内容仅供信息参考,具体申请条件以相关机构官方说明为准。</text>
</view>
<view v-else class="empty-content"><text class="empty-title">暂未找到这篇新闻</text><text class="empty-copy">返回新闻列表,查看其他资讯。</text><button class="primary-button empty-button" @click="goNews">返回新闻</button></view>
</scroll-view>
</view>
</template>
<script setup lang="uts">
import { usePageLayout } from '@/services/layout.uts'
const { contentStyle, pageStyle } = usePageLayout()
import { newsArticles, findNewsArticle, NewsArticle } from '@/services/content.uts'
import AppHeader from '@/components/AppHeader.uvue'
const title = ref('如何提高个人贷款通过率')
onLoad((options) => { if (options != null && options['title'] != null) title.value = options['title'] as string })
const { contentStyle, pageStyle } = usePageLayout()
const article = ref<NewsArticle>(newsArticles[0])
const available = ref(true)
onLoad((options) => {
if (options == null) return
const id = options['id'] == null ? '' : options['id'] as string
const legacyTitle = options['title'] == null ? '' : options['title'] as string
if (id == '' && legacyTitle == '') return
const selected = findNewsArticle(id, legacyTitle)
available.value = selected != null
if (selected != null) article.value = selected
})
const goNews = (): void => { uni.redirectTo({ url: '/pages/news/news' }) }
</script>
<style>
.detail-scroll { }
.detail-content { padding: 30rpx 28rpx 80rpx; background-color: #fff; }
.detail-title { color: #172640; font-size: 38rpx; line-height: 54rpx; font-weight: 800; }
.detail-meta { flex-direction: row; justify-content: space-between; color: #95a1b1; font-size: 20rpx; margin-top: 16rpx; }
.detail-image { width: 100%; height: 300rpx; border-radius: 18rpx; margin-top: 26rpx; }
.detail-heading {
/* #ifndef APP */
display: block;
/* #endif */
color: #22314b; font-size: 28rpx; line-height: 42rpx; font-weight: 800; margin-top: 30rpx; }
.detail-paragraph {
/* #ifndef APP */
display: block;
/* #endif */
color: #59677c; font-size: 25rpx; line-height: 46rpx; margin-top: 20rpx; }
.detail-content { padding: 30rpx 30rpx 64rpx; }
.detail-category { color: #0868f7; font-size: 24rpx; font-weight: 600; margin-bottom: 14rpx; }
.detail-title { color: #172640; font-size: 38rpx; line-height: 56rpx; font-weight: 700; }
.detail-source { color: #66758a; font-size: 24rpx; margin-top: 22rpx; }
.detail-meta { color: #66758a; font-size: 22rpx; margin-top: 10rpx; }
.detail-image { width: 100%; height: 300rpx; border-radius: 18rpx; margin-top: 28rpx; }
.detail-summary { color: #405675; font-size: 27rpx; line-height: 46rpx; padding: 22rpx; margin-top: 24rpx; background-color: #f2f6fc; border-radius: 12rpx; }
.detail-section { margin-top: 30rpx; }
.detail-heading { color: #172640; font-size: 30rpx; line-height: 44rpx; font-weight: 700; }
.detail-paragraph { color: #4d5e75; font-size: 28rpx; line-height: 50rpx; margin-top: 12rpx; }
.detail-note { color: #66758a; font-size: 22rpx; line-height: 36rpx; border-top: 1rpx solid #e8eef6; padding-top: 22rpx; margin-top: 36rpx; }
.empty-content { padding: 100rpx 40rpx; align-items: center; }
.empty-title { color: #172640; font-size: 32rpx; font-weight: 700; }
.empty-copy { color: #66758a; font-size: 26rpx; margin-top: 20rpx; }
.empty-button { width: 100%; margin-top: 38rpx; }
</style>