| | |
| | | <view class="driver-cert-card__upload-list"> |
| | | <view class="driver-cert-card__upload-item" @click="handleUpload('idcardImg', 1)" style="height: 196rpx;"> |
| | | <template v-if="previewImages.idcardImg"> |
| | | <image class="driver-cert-card__upload-img" :src="previewImages.idcardImg" mode="widthFix"></image> |
| | | <view class="driver-cert-card__upload-img"> |
| | | <image style="height: 100%;" :src="previewImages.idcardImg" mode="heightFix"></image> |
| | | </view> |
| | | <view class="driver-cert-card__upload-remove" @click.stop="removeImage('idcardImg')">删除</view> |
| | | </template> |
| | | <template v-else> |
| | |
| | | </view> |
| | | <view class="driver-cert-card__upload-item" @click="handleUpload('idcardImgBack', 1)" style="height: 196rpx;"> |
| | | <template v-if="previewImages.idcardImgBack"> |
| | | <image class="driver-cert-card__upload-img" :src="previewImages.idcardImgBack" mode="widthFix"></image> |
| | | <view class="driver-cert-card__upload-img"> |
| | | <image style="height: 100%;" :src="previewImages.idcardImgBack" mode="heightFix"></image> |
| | | </view> |
| | | <view class="driver-cert-card__upload-remove" @click.stop="removeImage('idcardImgBack')">删除</view> |
| | | </template> |
| | | <template v-else> |
| | |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="driver-cert-card__upload-block driver-cert-card__upload-block--stacked"> |
| | | <view v-if="needLicense" class="driver-cert-card__upload-block driver-cert-card__upload-block--stacked"> |
| | | <view class="driver-cert-card__upload-title-row"> |
| | | <text class="driver-cert-card__label">驾驶证照片</text> |
| | | <text class="driver-cert-card__required">*</text> |
| | |
| | | <view class="driver-cert-page__bottom-bar"> |
| | | <view v-if="currentStep === 2" class="driver-cert-page__agreement" @click="isAgreed = !isAgreed"> |
| | | <image class="driver-cert-page__agreement-icon" :src="isAgreed ? '/static/image/ic_accept_sel@2x.png' : '/static/image/ic_accept@2x.png'" mode="widthFix"></image> |
| | | <text class="driver-cert-page__agreement-text">我已阅读并同意《风险声明》、《行李寄存员须知》及《服务协议》</text> |
| | | <text class="driver-cert-page__agreement-text">我已阅读并同意</text> |
| | | <text class="driver-cert-page__agreement-link" @click.stop="openAgreement('errandRiskCommitment')">《风险承诺》</text> |
| | | <text class="driver-cert-page__agreement-text">、</text> |
| | | <text class="driver-cert-page__agreement-link" @click.stop="openAgreement('errandLuggageStorageNotice')">《行李寄存须知》</text> |
| | | <text class="driver-cert-page__agreement-text">及</text> |
| | | <text class="driver-cert-page__agreement-link" @click.stop="openAgreement('errandServiceAgreement')">《服务协议》</text> |
| | | </view> |
| | | |
| | | <view class="driver-cert-page__actions" :class="{ 'driver-cert-page__actions--dual': currentStep === 2 }"> |
| | |
| | | :minDate="datePickerMode === 'end' ? this.form.cardStartDate : 0" |
| | | @confirm="confirmDate" |
| | | @cancel="showDatePicker = false" /> |
| | | |
| | | <u-popup :show="showDriverCertPopup" mode="center" :mask-click="false" round="24"> |
| | | <view class="driver-cert-notice"> |
| | | <text class="driver-cert-notice__title">司机认证</text> |
| | | <text class="driver-cert-notice__content">实名信息仅用于司机从业资质审核、寄存订单履约核验与账户安全防护,我们承诺严格保护您的隐私。感谢您的信任。</text> |
| | | <button class="driver-cert-notice__button" @click="acknowledgeDriverCertNotice">已知晓</button> |
| | | </view> |
| | | </u-popup> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { mapState } from 'vuex' |
| | | import { chooseImageWithNotice } from '@/utils/utils' |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | color: '', |
| | | carType: '' |
| | | }, |
| | | needLicense: false, |
| | | showCarTypePicker: false, |
| | | carTypeList: [], |
| | | carTypeColumns: [], |
| | |
| | | otherImgUrls: [] |
| | | }, |
| | | isAgreed: false, |
| | | imgPrefix: '' |
| | | imgPrefix: '', |
| | | showDriverCertPopup: false |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapState(['userInfo']) |
| | | }, |
| | | onLoad() { |
| | | this.showDriverCertPopup = this.userInfo.auditStatus == 99 && !uni.getStorageSync('driver_cert_notice_agreed') |
| | | this.getAreaList() |
| | | this.getCategoryList() |
| | | this.getVerifyDetail() |
| | | }, |
| | | methods: { |
| | | acknowledgeDriverCertNotice() { |
| | | uni.setStorageSync('driver_cert_notice_agreed', true) |
| | | this.showDriverCertPopup = false |
| | | }, |
| | | getMaritalStatusText(value) { |
| | | if (!value && value !== 0) return '请选择' |
| | | const item = this.maritalOptions.find(option => option.value === String(value)) |
| | |
| | | this.vehicleForm.plateNumber = res.data.carCode || '' |
| | | this.vehicleForm.carType = res.data.carType || '' |
| | | this.vehicleForm.color = res.data.carColor || '' |
| | | if (this.carTypeList.length > 0) { |
| | | const selectedCarType = this.carTypeList.find(item => item.id === res.data.carType) |
| | | this.needLicense = selectedCarType && selectedCarType.otherField === 1 |
| | | } |
| | | this.previewImages.idcardImg = res.data.idcardImg ? res.data.imgPrefix + res.data.idcardImg : '' |
| | | this.previewImages.idcardImgBack = res.data.idcardImgBack ? res.data.imgPrefix + res.data.idcardImgBack : '' |
| | | this.form.carImgUrls = (res.data.carImgList || []).map(item => item.fileurl) |
| | |
| | | uni.showToast({ title: `最多上传${maxCount}张`, icon: 'none' }) |
| | | return |
| | | } |
| | | uni.chooseImage({ |
| | | chooseImageWithNotice({ |
| | | count: maxCount, |
| | | sizeType: ['compressed'], |
| | | sourceType: ['album', 'camera'], |
| | |
| | | const tempFilePaths = allTempPaths.slice(0, remaining) |
| | | this.uploadFiles(field, tempFilePaths, maxCount) |
| | | } |
| | | }) |
| | | }).catch(() => {}) |
| | | }, |
| | | uploadFiles(field, tempFilePaths, maxCount) { |
| | | const uploadPath = this.uploadPaths[field] |
| | |
| | | text: item.name |
| | | } |
| | | })] |
| | | if (this.vehicleForm.carType) { |
| | | const selectedCarType = this.carTypeList.find(item => item.id === this.vehicleForm.carType) |
| | | this.needLicense = selectedCarType && selectedCarType.otherField === 1 |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | |
| | | confirmCarType(e) { |
| | | const { id, text } = e.value[0] |
| | | this.vehicleForm.carType = id |
| | | const selectedCarType = this.carTypeList.find(item => item.id === id) |
| | | console.log(selectedCarType) |
| | | this.needLicense = selectedCarType && selectedCarType.otherField === '1' |
| | | this.showCarTypePicker = false |
| | | }, |
| | | openDatePicker(mode) { |
| | |
| | | uni.showToast({ title: '请上传车辆照片', icon: 'none' }) |
| | | return false |
| | | } |
| | | if (this.form.licenseImgUrls.length === 0) { |
| | | if (this.needLicense && this.form.licenseImgUrls.length === 0) { |
| | | uni.showToast({ title: '请上传驾驶证照片', icon: 'none' }) |
| | | return false |
| | | } |
| | |
| | | uni.pageScrollTo({ |
| | | scrollTop: 0, |
| | | duration: 0 |
| | | }) |
| | | }, |
| | | openAgreement(type) { |
| | | uni.navigateTo({ |
| | | url: '/pages/agreement/agreement?type=' + type |
| | | }) |
| | | } |
| | | } |
| | |
| | | line-height: 1.6; |
| | | color: #98a0ad; |
| | | } |
| | | |
| | | &__agreement-link { |
| | | font-size: 22rpx; |
| | | line-height: 1.6; |
| | | color: #106EFA; |
| | | } |
| | | } |
| | | |
| | | .driver-cert-card { |
| | |
| | | |
| | | &__upload-img { |
| | | width: 100%; |
| | | height: 100%; |
| | | border-radius: 8rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | overflow: hidden; |
| | | } |
| | | |
| | | &__upload-remove { |
| | |
| | | color: #b7bdc7; |
| | | } |
| | | } |
| | | </style> |
| | | |
| | | .driver-cert-notice { |
| | | width: 620rpx; |
| | | padding: 48rpx 36rpx 36rpx; |
| | | background: #ffffff; |
| | | border-radius: 24rpx; |
| | | box-sizing: border-box; |
| | | |
| | | &__title { |
| | | display: block; |
| | | text-align: center; |
| | | font-size: 34rpx; |
| | | font-weight: 600; |
| | | color: #222222; |
| | | } |
| | | |
| | | &__content { |
| | | display: block; |
| | | margin-top: 28rpx; |
| | | font-size: 28rpx; |
| | | line-height: 1.7; |
| | | color: #555555; |
| | | } |
| | | |
| | | &__button { |
| | | margin-top: 40rpx; |
| | | width: 100%; |
| | | height: 88rpx; |
| | | line-height: 88rpx; |
| | | border-radius: 44rpx; |
| | | background: #106efa; |
| | | font-size: 28rpx; |
| | | color: #ffffff; |
| | | padding: 0; |
| | | |
| | | &::after { |
| | | border: 0; |
| | | } |
| | | } |
| | | } |
| | | </style> |