feat: 完成项目基础功能搭建与样式优化
1. 新增评估选择组件、本地草稿存储与新闻/金融内容服务 2. 重构页面布局与样式:调整按钮阴影、图标尺寸、导航栏样式 3. 更新启动页、报告页、消息中心等页面UI与交互逻辑 4. 替换图标资源,调整禁用态透明度 5. 补充README文档与本地数据模拟实现
This commit is contained in:
+48
-26
@@ -1,41 +1,63 @@
|
||||
<template>
|
||||
<view class="page" :style="pageStyle()">
|
||||
<AppHeader title="我的融资档案" />
|
||||
<view class="archive-content">
|
||||
<view class="completion"><view class="completion-head"><text class="completion-title">档案完整度 75%</text><text class="completion-score">75%</text></view><text class="completion-desc">完善信息可获得更精准的融资方案</text><view class="progress-track"><view class="progress-bar"></view></view></view>
|
||||
<view class="archive-list"><view class="archive-row" v-for="item in archiveItems" :key="item.name" @click="edit(item.name)"><view class="archive-icon"><AppIcon :name="item.icon" :size="40" /></view><text class="archive-name">{{ item.name }}</text><text :class="item.done ? 'state done' : 'state pending'">{{ item.done ? '已完善' : '待完善' }}</text><AppIcon name="chevron-right" :size="28" muted /></view></view>
|
||||
<button class="primary-button complete-button" @click="complete">完善档案</button>
|
||||
</view>
|
||||
<scroll-view scroll-y :style="contentStyle(96, false)"><view class="archive-content">
|
||||
<view class="archive-switch"><text :class="type == 'personal' ? 'switch-item switch-active' : 'switch-item'" @click="switchType('personal')">个人档案</text><text :class="type == 'enterprise' ? 'switch-item switch-active' : 'switch-item'" @click="switchType('enterprise')">企业档案</text></view>
|
||||
<view class="completion"><view class="completion-head"><text class="completion-title">档案完整度</text><text class="completion-score">{{ progress.percent }}<text class="score-unit">%</text></text></view><view class="progress-track"><view class="progress-bar" :style="'width:' + progress.percent + '%;'"></view></view><text class="completion-desc">{{ progress.percent == 100 ? '基础信息已完善,可继续查看评估方案。' : '完善基础信息,让融资评估更贴近您的情况。' }}</text></view>
|
||||
<view class="archive-list"><view class="archive-row" v-for="item in archiveItems" :key="item.step" @click="edit(item.step)"><AppIcon :name="item.icon" :size="48" /><view class="archive-labels"><text class="archive-name">{{ item.name }}</text><text class="archive-note">{{ item.note }}</text></view><text :class="item.done ? 'state state-done' : 'state'">{{ item.done ? (item.step == 3 ? '已选择' : '已完善') : (item.step == 3 ? '选填' : '待完善') }}</text><AppIcon name="chevron-right" :size="28" /></view></view>
|
||||
<button class="primary-button complete-button" @click="complete">{{ progress.percent == 100 ? '查看并确认信息' : '继续完善档案' }}</button>
|
||||
<text class="local-note">草稿保存在当前设备,资料与授权可自主选择。</text>
|
||||
</view></scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="uts">
|
||||
import { usePageLayout } from '@/services/layout.uts'
|
||||
const { pageStyle } = usePageLayout()
|
||||
import AppHeader from '@/components/AppHeader.uvue'
|
||||
import AppIcon from '@/components/AppIcon.uvue'
|
||||
type ArchiveItem = { icon: string, name: string, done: boolean }
|
||||
const archiveItems: ArchiveItem[] = [{ icon: 'file-text', name: '基本信息', done: true }, { icon: 'income', name: '经营 / 收入信息', done: true }, { icon: 'asset', name: '资产 / 负债信息', done: true }, { icon: 'authorization', name: '资料授权', done: false }]
|
||||
const edit = (name: string) => { uni.showToast({ title: '编辑' + name, icon: 'none' }) }
|
||||
const complete = () => { uni.navigateTo({ url: '/pages/assessment/assessment' }) }
|
||||
import { AssessmentProgress, activeAssessmentType, assessmentProgress } from '@/services/assessment.uts'
|
||||
const { pageStyle, contentStyle } = usePageLayout()
|
||||
type ArchiveItem = { icon: string, name: string, note: string, done: boolean, step: number }
|
||||
const type = ref('personal')
|
||||
const progress = ref<AssessmentProgress>({ percent: 0, basicDone: false, incomeDone: false, assetsDone: false, authorizationSelected: false })
|
||||
const archiveItems = computed((): ArchiveItem[] => [
|
||||
{ icon: 'file-text', name: '基本信息', note: type.value == 'enterprise' ? '企业与联系人信息' : '身份与联系方式', done: progress.value.basicDone, step: 0 },
|
||||
{ icon: 'income', name: type.value == 'enterprise' ? '经营信息' : '职业与收入', note: type.value == 'enterprise' ? '经营行业、年限与营收' : '职业、收入与缴纳情况', done: progress.value.incomeDone, step: 1 },
|
||||
{ icon: 'asset', name: '资产与负债', note: '资产情况与信用卡使用', done: progress.value.assetsDone, step: 2 },
|
||||
{ icon: 'authorization', name: '资料与授权', note: '本地资料与数据授权意向', done: progress.value.authorizationSelected, step: 3 }
|
||||
])
|
||||
const refresh = () => { progress.value = assessmentProgress(type.value) }
|
||||
onShow(() => { type.value = activeAssessmentType(); refresh() })
|
||||
const switchType = (next: string) => { type.value = next; uni.setStorageSync('assessmentActiveType', next); refresh() }
|
||||
const edit = (step: number) => { uni.setStorageSync('assessmentEditStep', step); uni.navigateTo({ url: '/pages/assessment/assessment?type=' + type.value }) }
|
||||
const complete = () => {
|
||||
if (progress.value.percent == 100) uni.navigateTo({ url: '/pages/confirm/confirm' })
|
||||
else if (!progress.value.basicDone) edit(0)
|
||||
else if (!progress.value.incomeDone) edit(1)
|
||||
else edit(2)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.archive-content { padding: 26rpx 28rpx; }
|
||||
.completion { padding: 30rpx; border-radius: 18rpx; background: linear-gradient(140deg, #e9f3ff, #f8fbff); border: 1rpx solid #dce9fa; }
|
||||
.archive-content { padding: 26rpx 30rpx 64rpx; }
|
||||
.archive-switch { flex-direction: row; background-color: #eaf0f8; border-radius: 16rpx; padding: 6rpx; margin-bottom: 24rpx; }
|
||||
.switch-item { flex: 1; text-align: center; font-size: 27rpx; color: #708099; padding: 18rpx 0; border-radius: 12rpx; }
|
||||
.switch-active { background-color: #fff; color: #0868f7; font-weight: 600; }
|
||||
.completion { padding: 30rpx; border-radius: 20rpx; background-color: #edf5ff; }
|
||||
.completion-head { flex-direction: row; justify-content: space-between; align-items: center; }
|
||||
.completion-title { font-size: 30rpx; font-weight: 800; }
|
||||
.completion-score { color: #0868f7; font-size: 27rpx; font-weight: 800; }
|
||||
.completion-desc { color: #748196; font-size: 22rpx; margin-top: 12rpx; }
|
||||
.progress-track { height: 15rpx; border-radius: 8rpx; background-color: #dce8f6; margin-top: 24rpx; overflow: hidden; }
|
||||
.progress-bar { width: 75%; height: 15rpx; border-radius: 8rpx; background-color: #0868f7; }
|
||||
.archive-list { margin-top: 24rpx; background-color: #fff; border: 1rpx solid #e5ecf5; border-radius: 18rpx; padding: 0 24rpx; }
|
||||
.archive-row { height: 110rpx; flex-direction: row; align-items: center; border-bottom: 1rpx solid #edf1f6; }
|
||||
.archive-icon { width: 54rpx; height: 54rpx; border-radius: 17rpx; background-color: #e8f2ff; color: #0868f7; align-items: center; justify-content: center; font-size: 21rpx; font-weight: 800; margin-right: 17rpx; }
|
||||
.archive-name { flex: 1; font-size: 25rpx; }
|
||||
.state { font-size: 22rpx; margin-right: 14rpx; }
|
||||
.done { color: #11aa76; }
|
||||
.pending { color: #ff7917; }
|
||||
.chevron { color: #a7b2c1; font-size: 36rpx; }
|
||||
.complete-button { margin-top: 34rpx; }
|
||||
.completion-title { font-size: 30rpx; font-weight: 600; color: #233d64; }
|
||||
.completion-score { color: #0868f7; font-size: 52rpx; line-height: 64rpx; font-weight: 800; }
|
||||
.score-unit { color: #0868f7; font-size: 28rpx; font-weight: 600; }
|
||||
.completion-desc { color: #6c819d; font-size: 25rpx; line-height: 38rpx; margin-top: 20rpx; }
|
||||
.progress-track { height: 12rpx; border-radius: 6rpx; background-color: #d9e6f8; margin-top: 20rpx; overflow: hidden; }
|
||||
.progress-bar { height: 12rpx; border-radius: 6rpx; background-color: #0868f7; }
|
||||
.archive-list { margin-top: 24rpx; background-color: #fff; border: 1rpx solid #e5ecf5; border-radius: 18rpx; padding: 0 22rpx; }
|
||||
.archive-row { min-height: 126rpx; flex-direction: row; align-items: center; border-bottom: 1rpx solid #edf1f6; }
|
||||
.archive-labels { flex: 1; min-width: 0; margin: 0 18rpx; }
|
||||
.archive-name { font-size: 28rpx; color: #26374e; font-weight: 500; }
|
||||
.archive-note { font-size: 23rpx; color: #8190a4; margin-top: 8rpx; line-height: 34rpx; }
|
||||
.state { font-size: 23rpx; color: #8c99ab; margin-right: 10rpx; flex-shrink: 0; }
|
||||
.state-done { color: #16a478; }
|
||||
.complete-button { margin-top: 32rpx; }
|
||||
.local-note { font-size: 23rpx; color: #8795a8; line-height: 36rpx; margin-top: 22rpx; text-align: center; }
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user