From 38d111cb6defedff3bf06314ca30d22a01faae22 Mon Sep 17 00:00:00 2001
From: rk <94314517@qq.com>
Date: 星期一, 09 二月 2026 16:30:36 +0800
Subject: [PATCH] 功能开发
---
mini-program/pages/details/details.vue | 167 ++++++++++++++++++++++++++++++++++++++-----------------
1 files changed, 116 insertions(+), 51 deletions(-)
diff --git a/mini-program/pages/details/details.vue b/mini-program/pages/details/details.vue
index be3c8f6..9e45ca8 100644
--- a/mini-program/pages/details/details.vue
+++ b/mini-program/pages/details/details.vue
@@ -1,35 +1,44 @@
<template>
- <view class="box">
+ <view class="box" v-if="item">
<view class="item">
<view class="item-tx">
- <image src="/static/logo.png" mode="widthFix"></image>
+ <image :src="item.fullImgurl" mode="widthFix"></image>
</view>
<view class="item-info">
<view class="item-info-a">
- <text>鍒樻案鎱�</text>
- <text>P6锝滈攢鍞煿璁笀</text>
+ <text>{{item.name}}</text>
+ <template v-if="item.levelName && item.positon">
+ <text>{{item.levelName}}锝渰{item.positon}}</text>
+ </template>
+ <template v-if="item.levelName && !item.positon">
+ <text>{{item.levelName}}</text>
+ </template>
+ <template v-if="!item.levelName && item.positon">
+ <text>{{item.positon}}</text>
+ </template>
</view>
- <view class="item-info-b">
- <view class="item-info-b-row">甯傚満绫�</view>
- <view class="item-info-b-row">鑾峰绫�</view>
- <view class="item-info-b-row">鍩硅绫�</view>
+ <view class="item-info-b" v-if="item.typeList && item.typeList.length > 0">
+ <view class="item-info-b-row" v-for="(child, i) in item.typeList" :key="i">{{child.name}}</view>
</view>
<view class="item-info-c">
<view class="item-info-c-item">
<view class="item-info-c-item-label">浠庝笟骞撮檺锛�</view>
- <view class="item-info-c-item-val">10骞�</view>
+ <view class="item-info-c-item-val">{{item.workYears}}骞�</view>
</view>
<view class="item-info-c-item">
<view class="item-info-c-item-label">杩戝崐骞存湇鍔″晢鍦烘暟锛�</view>
- <view class="item-info-c-item-val">38涓�</view>
+ <view class="item-info-c-item-val">{{item.serveNum}}涓�</view>
</view>
</view>
- <view class="item-info-d">
- 浠庝簨璁捐鍟嗕笟鍖栧凡鏈夊骞达紝鎿呴暱鍚勭椋庢牸锛屾湇鍔″ぇ瀹㈡埛瓒呰繃50鎴封��<text>鏇村</text>
+ <view class="item-info-d" v-if="item.isShow">
+ {{item.zhankai ? item.content : item.contentCopy}}<text @click.stop="zhankai(item)">{{item.zhankai ? '鏀惰捣' : '鏇村'}}</text>
</view>
- <view class="item-info-price">
+ <view class="item-info-d" v-else>
+ {{item.content}}
+ </view>
+ <view class="item-info-price" v-if="item.fee">
<text>鏍囧噯鏀惰垂</text>
- <text>2900</text>
+ <text>{{item.fee}}</text>
</view>
</view>
</view>
@@ -40,53 +49,90 @@
</view>
<view class="card-list">
<view class="card-list-item">
- <view class="card-list-item-title">杩愯惀鎿嶇洏锛�</view>
- <view class="card-list-item-text">鍩庡競杩愯惀瑙勫垝锛屽鍏ラ棬搴楁棩甯告爣鍑嗗寲绠$悊銆佹爣鍑嗘暟鎹�乑7鍔ㄤ綔鎵ц绛夛紱</view>
- </view>
- <view class="card-list-item">
- <view class="card-list-item-title">鍩硅鎻愬崌锛�</view>
- <view class="card-list-item-text">鐞嗚瀹炶返鍩硅浠ュ強鍛樺伐缁煎悎鑳藉姏鏋勫缓锛�</view>
- </view>
- <view class="card-list-item">
- <view class="card-list-item-title">涓诲姩钀ラ攢锛�</view>
- <view class="card-list-item-text">杩�40浣欏満娆″ぇ鍨嬩富棰樿惀閿�鐖嗙牬娲诲姩钀藉湴锛氬紑涓氥�佸懆骞村簡銆佹柊鍝佸彂甯冧細绛夛紱鎿呴暱閰掑簵銆佸井鑱旂洘缁勫缓銆佸晢鍦轰腑搴�佸簵闈㈢垎鐮寸瓑锛�</view>
- </view>
- <view class="card-list-item">
- <view class="card-list-item-title">澶у崟鎴愪氦锛�</view>
- <view class="card-list-item-text">瀹㈡埛鍏ㄦ祦绋嬫湇鍔′互鍙婂ぇ瀹㈡埛璺熻釜鍜屾垚浜ゆ唇璋堬紱</view>
+ <text v-for="(child, index) in item.fieldList" :key="index">{{child.name}} <template v-if="item.fieldList.length- 1 !== index">銆�</template></text>
</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="(item, index) in 5" :key="index">
+ <view class="work-item" v-for="(child, index) in item.casesList" :key="index">
<view class="left">
- <view class="left-title">浜戝崡-澶х悊銆婁笁搴楀悓搴嗗紑涓氭椿鍔ㄣ��</view>
+ <view class="left-title">{{child.name}}</view>
<view class="left-time">
<image src="/static/ic_time@2x.png" mode="widthFix"></image>
- <text>2025-10-01 ~ 2025-10-15</text>
+ <text>{{child.startDate}} ~ {{child.endDate}}</text>
</view>
- <view class="left-info">灞呯劧涔嬪鍟嗗満钀藉湴锛屽悎璁″畾鍗�150鍗曪紝鍚屾瘮澧為暱210%锛屾敹娆�280涓�</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(child.fileList)">
+ <image :src="child.fileList[0].url" mode="widthFix"></image>
+ <view class="right-num">鍏眥{child.fileList.length}}寮�</view>
</view>
</view>
</view>
</view>
+ <previewImage ref="previewImage" :opacity="1" :circular="true" :imgs="imgs" />
</view>
</template>
<script>
+ import previewImage from '@/components/kxj-previewImage/kxj-previewImage.vue';
export default {
+ components: { previewImage}, //娉ㄥ唽鎻掍欢
data() {
return {
+ id: null,
+ item: null,
+ imgs: []
};
+ },
+ onLoad(option) {
+ this.id = option.id
+ this.getDetails()
+ },
+ methods: {
+ yulan(arr) {
+ this.imgs = arr.map(item => item.url)
+ this.$refs.previewImage.open(this.imgs[0]);
+ // uni.previewImage({
+ // current: url,
+ // urls: this.item.casesList[index].fileList.map(item => item.url),
+ // indicator: 'number'
+ // })
+ },
+ zhankai() {
+ this.item.zhankai = !this.item.zhankai
+ },
+ getDetails() {
+ this.$u.api.memberDetail({
+ id: this.id
+ }).then(res => {
+ if (res.code === 200) {
+ 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;
+ if (res.data.casesList) {
+ this.imageUrls = res.data.casesList.map(item => item.url)
+ }
+ this.item = res.data
+ }
+ })
+ }
}
}
</script>
@@ -156,18 +202,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;
}
}
}
@@ -175,7 +224,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;
@@ -187,8 +236,9 @@
font-size: 22rpx;
color: #2E68C4;
margin-right: 8rpx;
+ margin-bottom: 8rpx;
&:last-child {
- margin: 0;
+ margin-right: 0;
}
}
}
@@ -203,20 +253,21 @@
align-items: center;
.item-info-c-item-label {
font-weight: 400;
- font-size: 24rpx;
+ font-size: 26rpx;
color: #777777;
}
.item-info-c-item-val {
font-weight: 400;
- font-size: 24rpx;
+ font-size: 26rpx;
color: #333333;
}
}
}
.item-info-d {
width: 100%;
+ line-height: 40rpx;
font-weight: 400;
- font-size: 24rpx;
+ font-size: 26rpx;
color: #333333;
margin-top: 20rpx;
text {
@@ -243,6 +294,7 @@
margin-right: 12rpx;
}
text {
+ line-height: 40rpx;
font-weight: 600;
font-size: 32rpx;
color: #222222;
@@ -295,6 +347,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%;
}
@@ -305,20 +373,17 @@
width: 100%;
.card-list-item {
display: flex;
- flex-direction: column;
- margin-bottom: 20rpx;
+ align-items: center;
+ flex-wrap: wrap;
+ margin-bottom: 30rpx;
+ line-height: 40rpx;
&:last-child {
margin: 0 !important;
}
- .card-list-item-title {
- font-weight: 500;
+ text {
+ font-weight: 400;
font-size: 28rpx;
color: #333333;
- }
- .card-list-item-text {
- font-weight: 500;
- font-size: 26rpx;
- color: #666666;
}
}
}
--
Gitblit v1.9.3