优化ui,公司背景,底部导航栏图标,筛选功能,详情导航栏,单位

This commit is contained in:
2026-09-01 11:31:24 +08:00
parent 492ece2152
commit 67b04ff65e
11 changed files with 105 additions and 25 deletions
+13 -2
View File
@@ -3,6 +3,8 @@
<view class="chart-wrap">
<view class="header-row">
<text class="title">产品尺码</text>
<!-- 单位小字设计稿 1566-116011px Medium 50%与标题底对齐 -->
<text class="unit">单位cm</text>
</view>
<view class="table">
@@ -50,10 +52,10 @@ export default {
background: #ffffff;
}
/* 标题行:产品尺码 + 单位 */
/* 标题行:产品尺码(左) + 单位(右),按文字基线对齐(字下边界齐平) */
.header-row {
display: flex;
align-items: center;
align-items: baseline;
margin-bottom: 20rpx; /* 10px */
}
.title {
@@ -61,6 +63,15 @@ export default {
color: #000000;
line-height: 33rpx;
}
/* 单位小字:紧接标题右侧(不靠右对齐),11px → 21rpx,行高 17px → 33rpx,黑色 50% 透明 */
.unit {
margin-left: 12rpx;
font-size: 21rpx;
font-weight: 500;
color: #000000;
opacity: 0.5;
line-height: 33rpx;
}
/* 表格 */
.table {
display: flex;
+41
View File
@@ -6,6 +6,47 @@
background: #ffffff;
}
/* 自定义导航栏(UI-0014):固定顶部白底,状态栏占位 + 44px 导航行 */
.nav-bar {
position: fixed;
top: 0;
left: 0;
right: 0;
background: #ffffff;
z-index: 999;
}
.nav-inner {
position: relative;
height: 44px;
display: flex;
align-items: center;
justify-content: center;
}
/* 返回按钮:44px 命中区,箭头用 CSS 边框绘制,无需图标资源 */
.nav-back {
position: absolute;
left: 0;
top: 0;
width: 44px;
height: 44px;
display: flex;
align-items: center;
justify-content: center;
}
.nav-back-arrow {
width: 18rpx;
height: 18rpx;
border-left: 4rpx solid #000000;
border-bottom: 4rpx solid #000000;
transform: rotate(45deg);
margin-left: 8rpx;
}
.nav-title {
font-size: 32rpx;
font-weight: 500;
color: #000000;
}
/* 区块之间的灰色分隔条:390x6px #F5F5F5 */
.section-divider {
width: 100%;
+21 -1
View File
@@ -1,6 +1,16 @@
<template>
<!-- 产品详情页 - 接入 /public/goods/{goodId} 接口 -->
<view class="detail-page" :style="{ paddingTop: statusBarHeight + 'px' }">
<view class="detail-page" :style="{ paddingTop: (statusBarHeight + 44) + 'px' }">
<!-- 自定义导航栏返回按钮 + 标题UI-0014navigationStyle:custom 需自绘 -->
<view class="nav-bar" :style="{ paddingTop: statusBarHeight + 'px' }">
<view class="nav-inner">
<view class="nav-back" @tap="goBack">
<view class="nav-back-arrow"></view>
</view>
<text class="nav-title">产品详情</text>
</view>
</view>
<!-- 产品图片轮播 + 指示点 -->
<DetailSwiper :images="productImages" />
@@ -153,6 +163,16 @@ export default {
}
},
methods: {
// 返回上一页;无历史(如直接打开详情)时回首页 tab
goBack() {
const pages = getCurrentPages()
if (pages.length > 1) {
uni.navigateBack({ delta: 1 })
} else {
uni.switchTab({ url: '/pages/index/index' })
}
},
async loadDetail(goodId) {
if (!goodId) return
this.loading = true