From a59ff44b2eaa7020f0529632d9ec064c4dc38e27 Mon Sep 17 00:00:00 2001
From: rk <94314517@qq.com>
Date: 星期二, 28 四月 2026 22:08:46 +0800
Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/gtzxinglijicun

---
 app/pages/certification-details/certification-details.vue |   33 +++++++++++++++++++++++++++------
 1 files changed, 27 insertions(+), 6 deletions(-)

diff --git a/app/pages/certification-details/certification-details.vue b/app/pages/certification-details/certification-details.vue
index 80da670..6533a86 100644
--- a/app/pages/certification-details/certification-details.vue
+++ b/app/pages/certification-details/certification-details.vue
@@ -1,5 +1,5 @@
 <template>
-	<view class="cert-details-page">
+	<view class="cert-details-page" v-if="detailData">
 		<view class="cert-details-page__status-card" :class="'cert-details-page__status-card--' + statusType">
 			<view class="cert-details-page__status-head">
 				<image class="cert-details-page__status-icon" :src="statusIcon" mode="aspectFit"></image>
@@ -47,7 +47,7 @@
 				</view>
 			</view>
 
-			<view class="cert-details-page__upload-group">
+			<view v-if="needLicense" class="cert-details-page__upload-group">
 				<text class="cert-details-page__upload-title">椹鹃┒璇佺収鐗�</text>
 				<view class="cert-details-page__upload-list cert-details-page__upload-list--single">
 					<view v-for="(img, index) in licenseImgs" :key="index" class="cert-details-page__upload-img">
@@ -82,7 +82,9 @@
 				idcardImgs: [],
 				carImgs: [],
 				licenseImgs: [],
-				otherImgs: []
+				otherImgs: [],
+				needLicense: false,
+				carTypeList: []
 			}
 		},
 		computed: {
@@ -119,15 +121,28 @@
 		},
 		methods: {
 			getVerifyDetail() {
-				console.log('1111111')
 				this.$u.api.verifyDetail().then(res => {
 					uni.hideLoading()
 					if (res.code === 200) {
 						this.detailData = res.data
+						console.log(res.data)
 						this.setStatusType(res.data.auditStatus)
 						this.formatBasicInfo(res.data)
 						this.formatVehicleInfo(res.data)
 						this.formatImages(res.data)
+						this.getCategoryList(res.data.carType)
+					}
+				})
+			},
+
+			getCategoryList(carType) {
+				this.$u.api.getCategoryList({ type: 1 }).then(res => {
+					if (res.code === 200) {
+						this.carTypeList = res.data
+						if (carType) {
+							const selectedCarType = this.carTypeList.find(item => item.id === carType)
+							this.needLicense = selectedCarType && selectedCarType.otherField === 1
+						}
 					}
 				})
 			},
@@ -153,8 +168,14 @@
 				]
 			},
 			formatVehicleInfo(data) {
-				const startDate = data.cardStartDate ? data.cardStartDate.split(' ')[0].replace(/-/g, '骞�').replace(/鏈�/g, '').replace(/鏃�/g, '') : ''
-				const endDate = data.cardEndDate ? data.cardEndDate.split(' ')[0].replace(/-/g, '骞�').replace(/鏈�/g, '').replace(/鏃�/g, '') : ''
+				const formatDate = (dateStr) => {
+					if (!dateStr) return ''
+					const date = dateStr.split(' ')[0]
+					const [year, month, day] = date.split('-')
+					return `${year}骞�${month}鏈�${day}鏃
+				}
+				const startDate = formatDate(data.cardStartDate)
+				const endDate = formatDate(data.cardEndDate)
 				this.vehicleInfo = [
 					{ label: '杞︾墝鍙�', value: data.carCode || '' },
 					{ label: '杞﹁締绫诲瀷', value: data.carTypeName || '' },

--
Gitblit v1.9.3