rk
2026-04-28 a59ff44b2eaa7020f0529632d9ec064c4dc38e27
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 || '' },