From fea8e0742ee241a94c5bbd4f452d6ad82cf4dd9c Mon Sep 17 00:00:00 2001
From: rk <94314517@qq.com>
Date: 星期五, 06 二月 2026 10:58:26 +0800
Subject: [PATCH] 功能开发

---
 mini-program/pages/details/details.vue |   66 ++++++++++++++++++++++++++-------
 1 files changed, 52 insertions(+), 14 deletions(-)

diff --git a/mini-program/pages/details/details.vue b/mini-program/pages/details/details.vue
index ab0977e..fd6c4b0 100644
--- a/mini-program/pages/details/details.vue
+++ b/mini-program/pages/details/details.vue
@@ -1,6 +1,6 @@
 <template>
-	<view class="box">
-		<view class="item" v-if="item">
+	<view class="box" v-if="item">
+		<view class="item">
 			<view class="item-tx">
 				<image :src="item.fullImgurl" mode="widthFix"></image>
 			</view>
@@ -36,7 +36,7 @@
 				<view class="item-info-d" v-else>
 					{{item.content}}
 				</view>
-				<view class="item-info-price">
+				<view class="item-info-price" v-if="item.fee">
 					<text>鏍囧噯鏀惰垂</text>
 					<text>{{item.fee}}</text>
 				</view>
@@ -47,17 +47,17 @@
 				<view class="card-title-xian"></view>
 				<text>鎿呴暱棰嗗煙</text>
 			</view>
-			<view class="card-list">
+			<view class="card-list" v-if="item.fieldList && item.fieldList.length > 0">
 				<view class="card-list-item" v-for="(child, index) in item.fieldList" :key="index">
 					<view class="card-list-item-title">{{child.name}}锛�</view>
 					<view class="card-list-item-text">{{child.remark}}</view>
 				</view>
 			</view>
 		</view>
-		<view class="card">
+		<view class="card" v-if="item.casesList">
 			<view class="card-title">
 				<view class="card-title-xian"></view>
-				<text>浼樼椤圭洰妗堜緥 (40)</text>
+				<text>浼樼椤圭洰妗堜緥 ({{item.casesList.length}})</text>
 			</view>
 			<view class="work">
 				<view class="work-item" v-for="(child, index) in item.casesList" :key="index">
@@ -69,8 +69,9 @@
 						</view>
 						<view class="left-info">{{child.detail}}</view>
 					</view>
-					<view class="right">
-						<image src="/static/logo.png" mode="widthFix"></image>
+					<view class="right" v-if="child.fileList && child.fileList.length > 0" @click="yulan(index, child.fileList[0].url)">
+						<image :src="child.fileList[0].url" mode="widthFix"></image>
+						<view class="right-num">鍏眥{child.fileList.length}}寮�</view>
 					</view>
 				</view>
 			</view>
@@ -91,18 +92,33 @@
 			this.getDetails()
 		},
 		methods: {
+			yulan(index, url) {
+				uni.previewImage({
+					current: url,
+					urls: this.item.casesList[index].fileList.map(item => item.url)
+				})
+			},
+			zhankai() {
+				this.item.zhankai = !this.item.zhankai
+			},
 			getDetails() {
 				this.$u.api.memberDetail({
 					id: this.id
 				}).then(res => {
 					if (res.code === 200) {
-						console.log(res)
 						res.data.isShow = false
 						if (res.data.content && res.data.content.length > 30) {
 							res.data.isShow = true
 							res.data.zhankai = false
 							res.data.contentCopy = res.data.content.substring(0, 30) + '...'
 						}
+						let arr = []
+						res.data.fieldList.forEach(item => {
+							if (item.remark) {
+								arr.push(item)
+							}
+						})
+						res.data.fieldList = arr;
 						this.item = res.data
 					}
 				})
@@ -176,18 +192,21 @@
 				}
 				.item-info-a {
 					display: flex;
-					align-items: center;
+					align-items: flex-start;
 					text {
 						&:nth-child(1) {
+							flex-shrink: 0;
 							font-weight: 600;
 							font-size: 30rpx;
 							color: #222222;
 						}
 						&:nth-child(2) {
+							width: 300rpx;
 							font-weight: 400;
 							font-size: 24rpx;
 							color: #777777;
 							margin-left: 10rpx;
+							margin-top: 7rpx;
 						}
 					}
 				}
@@ -195,7 +214,7 @@
 					display: flex;
 					flex-wrap: wrap;
 					align-items: center;
-					margin-top: 8rpx;
+					margin-top: 16rpx;
 					.item-info-b-row {
 						padding: 0 8rpx;
 						box-sizing: border-box;
@@ -207,8 +226,9 @@
 						font-size: 22rpx;
 						color: #2E68C4;
 						margin-right: 8rpx;
+						margin-bottom: 8rpx;
 						&:last-child {
-							margin: 0;
+							margin-right: 0;
 						}
 					}
 				}
@@ -235,6 +255,7 @@
 				}
 				.item-info-d {
 					width: 100%;
+					line-height: 40rpx;
 					font-weight: 400;
 					font-size: 24rpx;
 					color: #333333;
@@ -315,6 +336,22 @@
 						overflow: hidden;
 						border-radius: 8rpx;
 						margin-left: 20rpx;
+						position: relative;
+						.right-num {
+							position: absolute;
+							bottom: 0;
+							right: 0;
+							z-index: 9;
+							padding: 0 10rpx;
+							box-sizing: border-box;
+							height: 32rpx;
+							line-height: 32rpx;
+							background: rgba(0,0,0,0.5);
+							font-weight: 400;
+							font-size: 20rpx;
+							color: #FFFFFF;
+							border-radius: 20rpx 0rpx 8rpx 0rpx;
+						}
 						image {
 							width: 100%;
 						}
@@ -326,7 +363,7 @@
 				.card-list-item {
 					display: flex;
 					flex-direction: column;
-					margin-bottom: 20rpx;
+					margin-bottom: 30rpx;
 					&:last-child {
 						margin: 0 !important;
 					}
@@ -334,9 +371,10 @@
 						font-weight: 500;
 						font-size: 28rpx;
 						color: #333333;
+						margin-bottom: 15rpx;
 					}
 					.card-list-item-text {
-						font-weight: 500;
+						font-weight: 400;
 						font-size: 26rpx;
 						color: #666666;
 					}

--
Gitblit v1.9.3