diff --git a/App.uvue b/App.uvue index 3e72170..c5aa6b1 100644 --- a/App.uvue +++ b/App.uvue @@ -26,9 +26,9 @@ .page { background-color: #f5f8fc; } .page-white { background-color: #ffffff; } .content { padding: 24rpx 28rpx 190rpx; } - .primary-button, .orange-button { height: 92rpx; border-radius: 16rpx; color: #ffffff; font-size: 30rpx; font-weight: 700; line-height: 92rpx; text-align: center; box-shadow: 0 14rpx 28rpx rgba(0, 100, 255, 0.20); } + .primary-button, .orange-button { height: 92rpx; border-radius: 16rpx; color: #ffffff; font-size: 30rpx; font-weight: 700; line-height: 92rpx; text-align: center; box-shadow: 0 5rpx 14rpx rgba(0, 100, 255, 0.10); } .primary-button { background-color: #0868f7; } - .orange-button { background-color: #ff7a16; box-shadow: 0 14rpx 28rpx rgba(255, 122, 22, 0.18); } + .orange-button { background-color: #ff7a16; box-shadow: 0 5rpx 14rpx rgba(255, 122, 22, 0.10); } .section-title { font-size: 32rpx; font-weight: 700; color: #13213c; } .muted { color: #8793a8; } .surface { background-color: #ffffff; border: 2rpx solid #e8eef7; border-radius: 16rpx; } diff --git a/README.md b/README.md index 177694b..8d20285 100644 --- a/README.md +++ b/README.md @@ -36,3 +36,9 @@ $projectPath = (Get-Location).Path - 线上使用的轻量位图位于 `static/mobile/`,原始图片保留在 `static/images/` 与 `static/icons-generated/`。箭头继续使用 `static/icons/` 下的 SVG。 - 微信打包忽略原始图片目录和未使用的 `static/logo.png`,规则位于 `manifest.json` 的 `mp-weixin.packOptions.ignore`。新增资源要检查引用与排除规则,最终包体以微信开发者工具结果为准。 - API 地址目前为空,表示模拟模式。接入后端时需补齐环境配置、认证、错误契约及真实业务校验,再进行联调。 + +## 当前前端交互 + +个人与企业评估分别保存本机草稿;选图仅供本机预览,资料上传和数据查询尚未接入。课程章节进度、消息已读与体验签到均保存在当前设备,不代表服务器账户数据。 + +新闻与课程的数据定义位于 `services/content.uts`,产品定义位于 `services/finance.uts`。产品列表与详情共用 ID;预留 `GET /matches`(`items` 数组)及 `GET /products/:id`(单个产品),字段见 `FinanceProduct`,其中 `amount` 为万元数值、`rate` 为年化百分比数值。申请入口目前仅引导准备资料,不向金融机构提交申请。 diff --git a/components/AppHeader.uvue b/components/AppHeader.uvue index 8ef6280..5f2bf25 100644 --- a/components/AppHeader.uvue +++ b/components/AppHeader.uvue @@ -2,7 +2,7 @@ - + {{ title }} @@ -13,9 +13,11 @@ import { usePageLayout } from '@/services/layout.uts' const { statusStyle } = usePageLayout() import AppIcon from '@/components/AppIcon.uvue' - const props = defineProps({ title: { type: String, default: '' }, back: { type: Boolean, default: true } }) + const props = defineProps({ title: { type: String, default: '' }, back: { type: Boolean, default: true }, customBack: { type: Boolean, default: false } }) + const emit = defineEmits(['back']) const handleBack = () => { if (!props.back) return + if (props.customBack) { emit('back'); return } const pages = getCurrentPages() if (pages.length > 1) uni.navigateBack({ delta: 1 }) else uni.reLaunch({ url: '/pages/home/home' }) @@ -26,7 +28,7 @@ .header-wrap { background-color: #ffffff; } .status-bar { } .app-header { height: 96rpx; padding: 0 24rpx; flex-direction: row; align-items: center; justify-content: space-between; border-bottom: 1rpx solid #edf1f7; } - .header-side { width: 100rpx; height: 96rpx; align-items: flex-start; justify-content: center; } + .header-side { width: 88rpx; height: 96rpx; align-items: flex-start; justify-content: center; flex-shrink: 0; } .header-right { align-items: flex-end; } .back-icon { transform: rotate(180deg); margin-top: 0; } .header-title { font-size: 34rpx; font-weight: 700; color: #111d35; } diff --git a/components/AppIcon.uvue b/components/AppIcon.uvue index a1fabbf..02b33f5 100644 --- a/components/AppIcon.uvue +++ b/components/AppIcon.uvue @@ -16,5 +16,5 @@ display: block; /* #endif */ flex-shrink: 0; transform: scale(1.2); } .vector-icon { transform: none; } - .muted-icon { opacity: .48; } + .muted-icon { opacity: .70; } diff --git a/components/AssessmentSelect.uvue b/components/AssessmentSelect.uvue new file mode 100644 index 0000000..1c0b371 --- /dev/null +++ b/components/AssessmentSelect.uvue @@ -0,0 +1,16 @@ + + + diff --git a/components/BottomNav.uvue b/components/BottomNav.uvue index 78e8702..4e8a36c 100644 --- a/components/BottomNav.uvue +++ b/components/BottomNav.uvue @@ -1,23 +1,29 @@ diff --git a/pages/analyzing/analyzing.uvue b/pages/analyzing/analyzing.uvue index 7477f1b..9109942 100644 --- a/pages/analyzing/analyzing.uvue +++ b/pages/analyzing/analyzing.uvue @@ -2,10 +2,10 @@ AI分析中 - 正在为您分析最优方案... + 正在整理融资评估信息… - {{ progress > index ? '✓' : '·' }}{{ item }} - 预计需要30-60秒,请稍候... + {{ progress > index ? '✓' : '·' }}{{ item }} + 正在生成示例报告,请稍候… 查看演示结果 @@ -47,6 +47,8 @@ .ai-core-image { width: 185rpx; height: 185rpx; border-radius: 50%; } .analysis-list { margin-top: 30rpx; width: 390rpx; } .analysis-item { flex-direction: row; align-items: center; margin-top: 23rpx; font-size: 26rpx; color: #d8e6ff; } + .analysis-label { font-size: 27rpx; color: #d8e6ff; } + .analysis-mark { font-size: 24rpx; color: #ffffff; } .analysis-check { width: 38rpx; height: 38rpx; border-radius: 50%; border: 2rpx solid #4c73a7; align-items: center; justify-content: center; margin-right: 17rpx; } .analysis-check.done { background-color: #158aff; border-color: #41d7ff; color: white; } .estimate { margin-top: 64rpx; color: #8faeda; font-size: 22rpx; } diff --git a/pages/archive/archive.uvue b/pages/archive/archive.uvue index 12efc6d..ffa918b 100644 --- a/pages/archive/archive.uvue +++ b/pages/archive/archive.uvue @@ -1,41 +1,63 @@ diff --git a/pages/article/article.uvue b/pages/article/article.uvue index 875b022..daec7fa 100644 --- a/pages/article/article.uvue +++ b/pages/article/article.uvue @@ -1,32 +1,53 @@ diff --git a/pages/assessment/assessment.uvue b/pages/assessment/assessment.uvue index 57ac4f2..3a50bbc 100644 --- a/pages/assessment/assessment.uvue +++ b/pages/assessment/assessment.uvue @@ -1,120 +1,201 @@ diff --git a/pages/assistant/assistant.uvue b/pages/assistant/assistant.uvue index 954f6e0..20545fc 100644 --- a/pages/assistant/assistant.uvue +++ b/pages/assistant/assistant.uvue @@ -3,18 +3,20 @@ - 您好!我是AI融资助手,可以帮您解答融资相关问题。 + 您好!我是AI融资助手,可以帮您了解融资条件、准备材料和比较方案。 - {{ item }} + {{ item }} - {{ item.text }} + {{ item.text }} - {{ errorMessage }}重试 + 正在整理建议… + {{ errorMessage }}重试 + - + @@ -25,25 +27,37 @@ import AppIcon from '@/components/AppIcon.uvue' import { sendAssistantMessage } from '@/services/api.uts' const questions = ['我的融资额度受哪些因素影响?', '如何提高贷款通过率?', '企业融资需要哪些材料?', '有哪些适合我的方案?'] - const messages = ref([]) + type ChatMessage = { role: string, text: string } + const messages = ref([]) const draft = ref('') const lastMessageId = ref('') const lastQuestion = ref('') const sending = ref(false) const errorMessage = ref('') - const send = async () => { + const scrollToEnd = async () => { + lastMessageId.value = '' + await nextTick() + lastMessageId.value = 'chat-end' + } + const requestAnswer = async (text: string) => { + sending.value = true + errorMessage.value = '' + scrollToEnd() + try { const answer = await sendAssistantMessage(text); const response: ChatMessage = { role: 'assistant', text: answer }; messages.value.push(response) } catch (error) { errorMessage.value = '暂未收到回复,请重试' } + sending.value = false + scrollToEnd() + } + const send = () => { const text = draft.value.trim() if (text.length == 0 || sending.value) return lastQuestion.value = text - messages.value.push({ role: 'user', text: text }) + const message: ChatMessage = { role: 'user', text: text } + messages.value.push(message) draft.value = '' - sending.value = true - errorMessage.value = '' - try { const answer = await sendAssistantMessage(text); messages.value.push({ role: 'assistant', text: answer }); lastMessageId.value = 'message-' + (messages.value.length - 1) } catch (error) { errorMessage.value = '消息发送失败,请稍后重试' } - sending.value = false + requestAnswer(text) } - const ask = (text: string) => { draft.value = text; send() } - const retry = () => { draft.value = lastQuestion.value; errorMessage.value = ''; send() } + const ask = (text: string) => { if (sending.value) return; draft.value = text; send() } + const retry = () => { if (!sending.value && lastQuestion.value.length > 0) requestAnswer(lastQuestion.value) } diff --git a/pages/classroom/classroom.uvue b/pages/classroom/classroom.uvue index 399d575..c3046eb 100644 --- a/pages/classroom/classroom.uvue +++ b/pages/classroom/classroom.uvue @@ -1,11 +1,26 @@ @@ -30,11 +30,11 @@ import AppHeader from '@/components/AppHeader.uvue' import AppIcon from '@/components/AppIcon.uvue' const type = ref('personal') - const benefits = ref(['最高可借额度', '审批快 放款快', '多种产品任你选']) + const benefits = ref(['了解可选融资额度', '在线评估,便捷省时', '多家机构方案对比']) onLoad((options) => { if (options != null && options['type'] == 'enterprise') { type.value = 'enterprise' - benefits.value = ['最高可借额度', '企业信用贷款', '多种融资方案'] + benefits.value = ['匹配企业资金需求', '多维度经营资质评估', '多种融资方案对比'] } }) const start = () => { uni.navigateTo({ url: '/pages/assessment/assessment?type=' + type.value }) } @@ -50,9 +50,9 @@ .intro-sub { font-size: 23rpx; color: #5f6d82; margin-top: 8rpx; margin-bottom: 30rpx; } .benefit { flex-direction: row; align-items: center; margin-top: 18rpx; color: #23324a; font-size: 25rpx; font-weight: 600; } .benefit .app-icon { margin-right: 12rpx; } -/* #ifndef APP */ -.enterprise-page .benefit .app-icon { filter: hue-rotate(330deg) saturate(1.7); } -/* #endif */ + .benefit-text { color: #34445c; font-size: 25rpx; line-height: 38rpx; } + .benefit-dot { width: 10rpx; height: 10rpx; border-radius: 5rpx; background-color: #0868f7; margin-right: 14rpx; flex-shrink: 0; } + .enterprise-page .benefit-dot { background-color: #f47a1a; } .entry-image { position: absolute; width: 285rpx; height: 300rpx; right: -35rpx; bottom: -22rpx; } .start-button { margin-top: 30rpx; } @@ -61,9 +61,8 @@ .process-item { align-items: center; color: #455369; font-size: 22rpx; } .process-icon { width: 88rpx; height: 88rpx; border-radius: 26rpx; background-color: #e9f2ff; align-items: center; justify-content: center; margin-bottom: 14rpx; } .enterprise-page .process-icon { background-color: #fff0e5; } -/* #ifndef APP */ -.enterprise-page .process-icon .app-icon { filter: hue-rotate(330deg) saturate(1.7); } -/* #endif */ + .process-label { font-size: 24rpx; color: #455369; } + .privacy-text { font-size: 22rpx; color: #748398; text-align: center; line-height: 34rpx; } .arrow { margin-top: -28rpx; } .privacy-tip { margin-top: 55rpx; align-items: center; color: #97a3b4; font-size: 21rpx; } diff --git a/pages/home/home.uvue b/pages/home/home.uvue index 0e4479b..cb2d3bb 100644 --- a/pages/home/home.uvue +++ b/pages/home/home.uvue @@ -1,6 +1,6 @@ @@ -38,4 +38,5 @@ .splash-art { width: 550rpx; height: 420rpx; margin-top: 35rpx; } .launch-line { position: absolute; bottom: 82rpx; flex-direction: row; align-items: center; color: #9aa7ba; font-size: 22rpx; } .launch-dot { width: 9rpx; height: 9rpx; border-radius: 50%; background-color: #2d8cff; margin-right: 12rpx; box-shadow: 0 0 18rpx rgba(45, 140, 255, .7); } + .launch-text { color: #7d8ca3; font-size: 24rpx; } diff --git a/pages/lesson/lesson.uvue b/pages/lesson/lesson.uvue index 6e4a9a7..3db3229 100644 --- a/pages/lesson/lesson.uvue +++ b/pages/lesson/lesson.uvue @@ -1,55 +1,112 @@ diff --git a/pages/login/login.uvue b/pages/login/login.uvue index 2787017..8e23fbb 100644 --- a/pages/login/login.uvue +++ b/pages/login/login.uvue @@ -1,101 +1,85 @@ diff --git a/pages/matches/matches.uvue b/pages/matches/matches.uvue index 4964992..d99b21e 100644 --- a/pages/matches/matches.uvue +++ b/pages/matches/matches.uvue @@ -1,18 +1,21 @@