doum
2026-04-21 0ad75ffcfc4c581ef54de705fae48b44803ed2a5
small-program/pages/store-apply/store-apply.vue
@@ -27,7 +27,7 @@
         <view class="form-group select-group">
            <view class="label-row"><text class="label">所在城市</text><text class="required">*</text></view>
            <view class="select-row" @click="showAreaPicker = true">
               <text class="select-text" :class="{ placeholder: !form.areaName }">{{ form.areaName || '请选择省市区' }}</text>
               <text class="select-text" :class="{ placeholder: !fullAreaName }">{{ fullAreaName || '请选择省市区' }}</text>
               <u-icon name="arrow-right" size="18" color="#9FA6B2"></u-icon>
            </view>
         </view>
@@ -140,6 +140,12 @@
            </view>
            <view class="divider"></view>
            <view class="form-group compact-group">
               <view class="label-row"><text class="label">支付宝姓名</text><text class="required">*</text></view>
               <input class="text-input" v-model="form.aliName" placeholder="请输入支付宝姓名" placeholder-class="placeholder" />
            </view>
            <view class="divider"></view>
            <view class="upload-section subject-upload-section">
               <view class="upload-title-row">
                  <view class="label-row"><text class="label">身份证正反面</text><text class="required">*</text></view>
@@ -205,6 +211,12 @@
            <view class="divider"></view>
            <view class="form-group compact-group">
               <view class="label-row"><text class="label">支付宝姓名</text><text class="required">*</text></view>
               <input class="text-input" v-model="form.aliName" placeholder="请输入支付宝姓名" placeholder-style="color: #c1c7d0;" />
            </view>
            <view class="divider"></view>
            <view class="form-group compact-group">
               <view class="label-row"><text class="label">法人身份证号</text><text class="required">*</text></view>
               <input class="text-input" v-model="form.legalPersonCard" placeholder="请输入法人身份证号码" placeholder-style="color: #c1c7d0;" />
            </view>
@@ -259,7 +271,11 @@
   import { mapState } from 'vuex'
   export default {
      computed: {
         ...mapState(['userInfo'])
         ...mapState(['userInfo']),
         fullAreaName() {
            const arr = [this.form.provinceName, this.form.cityName, this.form.areaName].filter(Boolean)
            return arr.join('/')
         }
      },
      data() {
         return {
@@ -267,6 +283,9 @@
               telephone: '',
               companyType: 0,
               name: '',
               provinceName: '',
               cityName: '',
               areaName: '',
               areaId: '',
               longitude: '',
               latitude: '',
@@ -286,10 +305,12 @@
               legalPersonName: '',
               legalPersonPhone: '',
               aliAccount: '',
               aliName: '',
               businessImg: ''
            },
            previewMode: 'filled',
            imgPrefix: '',
            currentStep: 1,
            qualificationType: 'company',
            showAreaPicker: false,
@@ -364,6 +385,14 @@
                  uni.showToast({ title: '请上传身份证国徽面', icon: 'none' })
                  return
               }
               if (!this.form.aliAccount) {
                  uni.showToast({ title: '请输入个人支付宝账号', icon: 'none' })
                  return
               }
               if (!this.form.aliName) {
                  uni.showToast({ title: '请输入支付宝姓名', icon: 'none' })
                  return
               }
               if (!this.form.laborContractImgs || this.form.laborContractImgs.length === 0) {
                  uni.showToast({ title: '请上传劳动合同', icon: 'none' })
                  return
@@ -379,6 +408,10 @@
               }
               if (!this.form.aliAccount) {
                  uni.showToast({ title: '请输入企业支付宝账号', icon: 'none' })
                  return
               }
               if (!this.form.aliName) {
                  uni.showToast({ title: '请输入支付宝姓名', icon: 'none' })
                  return
               }
               if (!this.form.legalPersonCard) {
@@ -417,9 +450,12 @@
               if (res.code === 200 && res.data) {
                  const data = res.data
                  const imgPrefix = data.imgPrefix || ''
                  this.imgPrefix = data.imgPrefix || ''
                  this.form.name = data.name || ''
                  this.form.areaId = data.areaId || ''
                  this.form.provinceName = data.provinceName || ''
                  this.form.cityName = data.cityName || ''
                  this.form.areaName = data.areaName || ''
                  this.form.areaId = data.areaId || ''
                  this.form.address = data.address || ''
                  this.form.longitude = data.longitude || ''
                  this.form.latitude = data.latitude || ''
@@ -427,63 +463,44 @@
                  this.form.linkPhone = data.linkPhone || ''
                  this.form.idcard = data.idcard || ''
                  this.form.aliAccount = data.aliAccount || ''
                  this.form.aliName = data.aliName || ''
                  this.form.companyType = data.companyType || 0
                  this.form.telephone = data.telephone || this.userInfo.telephone || ''
                  this.form.legalPersonName = data.legalPersonName || ''
                  this.form.legalPersonPhone = data.legalPersonPhone || ''
                  this.qualificationType = data.companyType === 0 ? 'personal' : 'company'
                  if (data.storeFrontImgs) {
                     let storeFrontImgs = data.storeFrontImgs
                     if (typeof storeFrontImgs === 'string') {
                        storeFrontImgs = storeFrontImgs.split(',')
                     }
                     this.storeFrontImages = storeFrontImgs
                     this.uploadedImagesStoreFront = storeFrontImgs.map(url => ({ url: imgPrefix + url }))
                     this.form.storeFrontImgs = storeFrontImgs
                     this.storeFrontImages = data.storeFrontImgUrls
                     this.uploadedImagesStoreFront = data.storeFrontImgUrls.map(url => ({ url }))
                     this.form.storeFrontImgs = data.storeFrontImgs
                  }
                  if (data.storeInteriorImgs) {
                     let storeInteriorImgs = data.storeInteriorImgs
                     if (typeof storeInteriorImgs === 'string') {
                        storeInteriorImgs = storeInteriorImgs.split(',')
                     }
                     this.idCardImages = storeInteriorImgs
                     this.uploadedImagesIdCard = storeInteriorImgs.map(url => ({ url: imgPrefix + url }))
                     this.form.storeInteriorImgs = storeInteriorImgs
                     this.idCardImages = data.storeInteriorImgUrls
                     this.uploadedImagesIdCard = data.storeInteriorImgUrls.map(url => ({ url }))
                     this.form.storeInteriorImgs = data.storeInteriorImgs
                  }
                  if (data.otherMaterialImgs) {
                     let otherMaterialImgs = data.otherMaterialImgs
                     if (typeof otherMaterialImgs === 'string') {
                        otherMaterialImgs = otherMaterialImgs.split(',')
                     }
                     this.permitImages = otherMaterialImgs
                     this.uploadedImagesPermit = otherMaterialImgs.map(url => ({ url: imgPrefix + url }))
                     this.form.otherMaterialImgs = otherMaterialImgs
                     this.permitImages = data.otherMaterialImgUrls
                     this.uploadedImagesPermit = data.otherMaterialImgUrls.map(url => ({ url }))
                     this.form.otherMaterialImgs = data.otherMaterialImgs
                  }
                  this.form.idcardImg = data.idcardImg ? imgPrefix + data.idcardImg : ''
                  this.form.idcardImgBack = data.idcardImgBack ? imgPrefix + data.idcardImgBack : ''
                  this.form.idcardImg = data.idcardImg || ''
                  this.form.idcardImgBack = data.idcardImgBack || ''
                  if (data.laborContractImgs) {
                     let laborContractImgs = data.laborContractImgs
                     if (typeof laborContractImgs === 'string') {
                        laborContractImgs = laborContractImgs.split(',')
                     }
                     this.laborContractImages = laborContractImgs
                     this.uploadedLaborContractImages = laborContractImgs.map(url => ({ url: imgPrefix + url }))
                     this.form.laborContractImgs = laborContractImgs
                     this.laborContractImages = data.laborContractImgUrls
                     this.uploadedLaborContractImages = data.laborContractImgUrls.map(url => ({ url }))
                     this.form.laborContractImgs = data.laborContractImgs
                  }
                  if (data.socialSecurityImgs) {
                     let socialSecurityImgs = data.socialSecurityImgs
                     if (typeof socialSecurityImgs === 'string') {
                        socialSecurityImgs = socialSecurityImgs.split(',')
                     }
                     this.socialSecurityImages = socialSecurityImgs
                     this.uploadedSocialSecurityImages = socialSecurityImgs.map(url => ({ url: imgPrefix + url }))
                     this.form.socialSecurityImgs = socialSecurityImgs
                     this.socialSecurityImages = data.socialSecurityImgUrls
                     this.uploadedSocialSecurityImages = data.socialSecurityImgUrls.map(url => ({ url }))
                     this.form.socialSecurityImgs = data.socialSecurityImgs
                  }
                  this.form.legalPersonCard = data.legalPersonCard ? imgPrefix + data.legalPersonCard : ''
                  this.form.legalPersonCardBack = data.legalPersonCardBack ? imgPrefix + data.legalPersonCardBack : ''
                  this.form.businessImg = data.businessImg ? imgPrefix + data.businessImg : ''
                  this.form.legalPersonCard = data.legalPersonCard || ''
                  this.form.legalPersonCardBack = data.legalPersonCardBack || ''
                  this.form.businessImg = data.businessImg || ''
                  if (data.businessImg) {
                     this.businessImages = [data.businessImg]
                     this.businessImages = [data.businessImgUrl]
                  }
               }
            } catch (error) {
@@ -891,11 +908,10 @@
         },
         getShortPath(url) {
            if (!url) return ''
            const baseUrl = this.$baseUrl || ''
            if (url.startsWith('http')) {
               return url
               return url.replace(this.imgPrefix, '')
            }
            return url.replace(baseUrl, '')
            return url
         },
         getFullPath(url) {
            if (!url) return ''