feat ui设计稿bug修复

This commit is contained in:
Ironsp
2026-10-01 10:53:13 +08:00
parent 9ab6253c81
commit 1601bdd82c
89 changed files with 4741 additions and 3652 deletions

View File

@@ -1,7 +1,6 @@
<script setup lang="ts">
import { computed, onMounted, watch } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { AppButton } from '@/components'
import { useRoute } from 'vue-router'
// 业务详情页:数据只经 useHomeStore,不直接 import api
import { useHomeStore } from '@/stores/modules/home'
import type { BusinessType } from '@/types/api'
@@ -9,7 +8,6 @@ import HomeServiceContents from './cpns/HomeServiceContents.vue'
import HomeServiceTypes from './cpns/HomeServiceTypes.vue'
const route = useRoute()
const router = useRouter()
const homeStore = useHomeStore()
const line = computed(() => homeStore.currentBusiness)
@@ -25,58 +23,53 @@ onMounted(load)
</script>
<template>
<!-- 业务详情:设计实测内容区 x70→1850(宽 1780),故与其它常规页一致用 .container -->
<div class="business-detail">
<nav class="business-detail__breadcrumb text-secondary">
<RouterLink to="/" class="link">
首页
</RouterLink>
<span> &gt; </span>
<span>业务详情</span>
</nav>
<div class="container">
<nav class="business-detail__breadcrumb">
<RouterLink to="/" class="link">
首页
</RouterLink>
<span> &gt; </span>
<span>业务详情</span>
</nav>
<template v-if="line">
<header class="business-detail__hero">
<span class="business-detail__logo">
<!-- TODO(蓝湖): 替换业务图标切图 -->
{{ line.name.slice(0, 2) }}
</span>
<div class="business-detail__intro">
<h1 class="business-detail__name">
{{ line.name }}
</h1>
<p class="business-detail__slogan text-secondary">
{{ line.slogan }}
</p>
</div>
</header>
<template v-if="line">
<header class="business-detail__hero">
<div class="business-detail__intro">
<h1 class="business-detail__name">
{{ line.name }}
</h1>
<p class="business-detail__slogan">
{{ line.slogan }}
</p>
</div>
</header>
<HomeServiceTypes :service-types="line.serviceTypes" />
<HomeServiceTypes :service-types="line.serviceTypes" />
<HomeServiceContents :contents="line.contents" />
<HomeServiceContents :contents="line.contents" />
</template>
<div class="business-detail__cta">
<AppButton type="primary" size="lg" @click="router.push('/demand')">
立即提报
</AppButton>
</div>
</template>
<p v-else class="text-secondary">
正在加载业务详情...
</p>
<p v-else class="business-detail__loading">
正在加载业务详情...
</p>
</div>
</div>
</template>
<style lang="less" scoped>
.business-detail {
padding-top: @spacing-lg;
// 设计实测:面包屑 y104、头图条 y190、白卡 y429/y736
padding-top: 32px; // 面包屑顶 = 104 − 顶栏 72
padding-bottom: @spacing-xxl;
&__breadcrumb {
margin-bottom: 36px;
// 设计稿面包屑 24 设计px / 500 / #666666
font-size: 18px;
// 设计稿面包屑 @(70,104) 24px/500 #666666
margin-bottom: 49px; // 头图条顶 190 − 面包屑底(104+37)
font-size: 24px;
font-weight: 500;
line-height: 37px;
color: @home-breadcrumb;
.link {
@@ -84,52 +77,52 @@ onMounted(load)
}
}
// 设计稿头图卡 1780×219 设计px:浅蓝渐变底、左上图标块 + 标题 + 副标题
// 设计稿头图条 矩形 195 @(70,190) 1780×219(浅蓝渐变底)
&__hero {
.flex(column, flex-start);
gap: 18px;
margin-bottom: @spacing-base;
padding: 19px 22px 24px;
padding: 129px 29px 0; // 业务名 @(99,319) → 卡内 x29 / y129
border-radius: @radius-lg;
background: @home-detail-hero-bg;
height: 219px;
box-sizing: border-box;
}
&__loading {
padding: 80px 0;
font-size: 16px;
color: @text-color-secondary;
}
&__logo {
.flex(row, center);
width: 62px;
height: 62px;
border-radius: @radius-lg;
background: @home-detail-logo-bg;
color: @primary-strong;
font-size: @font-size-xl;
font-weight: 600;
display: none; // 设计稿头图条内无独立 logo 块
}
&__intro {
.flex(column, flex-start);
gap: 6px;
gap: 8px; // 名称底 319+33=352 → 副标题顶 360
}
&__name {
// 设计稿详情标题 26 设计px / #333333
font-size: @font-size-xl;
font-weight: 600;
// 设计稿业务名 @(99,319) 26px / #333333
margin: 0;
font-size: 26px;
font-weight: 400;
line-height: 33px;
color: @home-body;
}
&__slogan {
// 设计稿副标题 14 设计px → 可读下限 11px / #333333
font-size: 11px;
// 设计稿副标题 @(99,360) 14px/400 #333333
margin: 0;
font-size: 14px;
font-weight: 400;
line-height: 18px;
color: @home-body;
}
&__cta {
padding-top: @spacing-base;
.app-button {
width: 100%;
}
display: none; // 设计稿无底部 CTA 块
}
}
</style>