MrShi
2026-06-09 3f9032e92fdd383bfefc87a0bec9b242e1223851
app/pages/certification-details/certification-details.vue
@@ -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">
@@ -66,6 +66,7 @@
         </view>
      </view>
      <button v-if="hasApprovedOfficial && statusType === 'approved'" class="cert-details-page__rebtn" @click="goRecertify">重新认证</button>
      <button v-if="statusType === 'rejected'" class="cert-details-page__rebtn" @click="goRecertify">重新认证</button>
      <view style="width: 100%; height: 30rpx;" v-if="statusType === 'rejected'"></view>
   </view>
@@ -77,12 +78,15 @@
         return {
            statusType: 'review',
            detailData: null,
            hasApprovedOfficial: false,
            basicInfo: [],
            vehicleInfo: [],
            idcardImgs: [],
            carImgs: [],
            licenseImgs: [],
            otherImgs: []
            otherImgs: [],
            needLicense: false,
            carTypeList: []
         }
      },
      computed: {
@@ -119,15 +123,29 @@
      },
      methods: {
         getVerifyDetail() {
            console.log('1111111')
            this.$u.api.verifyDetail().then(res => {
               uni.hideLoading()
               if (res.code === 200) {
                  this.detailData = res.data
                  this.hasApprovedOfficial = res.data.hasApprovedOfficial === true
                  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 +171,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 || '' },