From 7a4b8764b68e0dbaeb90e292a8a4bd47cb379e68 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期一, 27 四月 2026 17:26:02 +0800
Subject: [PATCH] 小程序端和PC端bug修复

---
 small-program/pages/store-apply/store-apply.vue |  139 +++++++++++++++++++++++++++++++---------------
 1 files changed, 93 insertions(+), 46 deletions(-)

diff --git a/small-program/pages/store-apply/store-apply.vue b/small-program/pages/store-apply/store-apply.vue
index 6e22773..4689fc5 100644
--- a/small-program/pages/store-apply/store-apply.vue
+++ b/small-program/pages/store-apply/store-apply.vue
@@ -128,12 +128,12 @@
 			<view class="form-group subject-first-group">
 				<view class="label-row"><text class="label">闂ㄥ簵绫诲瀷</text><text class="required">*</text></view>
 				<view class="switch-row type-switch-row">
-					<view class="switch-pill" :class="{ active: qualificationType === 'personal' }" @tap="switchQualification('personal')">涓汉</view>
-					<view class="switch-pill" :class="{ active: qualificationType === 'company' }" @tap="switchQualification('company')">浼佷笟</view>
+					<view class="switch-pill" :class="{ active: form.companyType ===0 }" @tap="form.companyType =0">涓汉</view>
+					<view class="switch-pill" :class="{ active: form.companyType ===1}" @tap="form.companyType =1">浼佷笟</view>
 				</view>
 			</view>
 
-			<template v-if="qualificationType === 'personal'">
+			<template v-if="form.companyType ===0">
 				<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.aliAccount" placeholder="璇疯緭鍏ヤ釜浜烘敮浠樺疂璐﹀彿" placeholder-class="placeholder" />
@@ -153,12 +153,12 @@
 					<view class="upload-grid double-upload-grid">
 						<view class="upload-box id-upload-box" @click="chooseIdCardFront">
 							<image v-if="!form.idcardImg" class="camera-icon" src="/static/icon/ic_camera@2x.png" mode="widthFix"></image>
-							<image v-else class="preview-image" :src="getFullPath(form.idcardImg)" mode="aspectFill"></image>
+							<image v-else class="preview-image" :src="idcardImgUrl" mode="aspectFill"></image>
 							<text v-if="!form.idcardImg" class="upload-text">涓婁紶浜哄儚闈�</text>
 						</view>
 						<view class="upload-box id-upload-box" @click="chooseIdCardBack">
 							<image v-if="!form.idcardImgBack" class="camera-icon" src="/static/icon/ic_camera@2x.png" mode="widthFix"></image>
-							<image v-else class="preview-image" :src="getFullPath(form.idcardImgBack)" mode="aspectFill"></image>
+							<image v-else class="preview-image" :src="idcardImgBackUrl" mode="aspectFill"></image>
 							<text v-if="!form.idcardImgBack" class="upload-text">涓婁紶鍥藉窘闈�</text>
 						</view>
 					</view>
@@ -228,13 +228,13 @@
 					</view>
 					<view class="upload-grid double-upload-grid">
 						<view class="upload-box id-upload-box" @click="chooseLegalPersonCardFront">
-							<image v-if="!form.legalPersonCard" class="camera-icon" src="/static/icon/ic_camera@2x.png" mode="widthFix"></image>
-							<image v-else class="preview-image" :src="getFullPath(form.legalPersonCard)" mode="aspectFill"></image>
-							<text v-if="!form.legalPersonCard" class="upload-text">涓婁紶浜哄儚闈�</text>
+							<image v-if="!form.legalPersonCardFront" class="camera-icon" src="/static/icon/ic_camera@2x.png" mode="widthFix"></image>
+							<image v-else class="preview-image" :src=" legalPersonCardFrontUrl" mode="aspectFill"></image>
+							<text v-if="!form.legalPersonCardFront" class="upload-text">涓婁紶浜哄儚闈�</text>
 						</view>
 						<view class="upload-box id-upload-box" @click="chooseLegalPersonCardBack">
 							<image v-if="!form.legalPersonCardBack" class="camera-icon" src="/static/icon/ic_camera@2x.png" mode="widthFix"></image>
-							<image v-else class="preview-image" :src="getFullPath(form.legalPersonCardBack)" mode="aspectFill"></image>
+							<image v-else class="preview-image" :src="legalPersonCardBackUrl" mode="aspectFill"></image>
 							<text v-if="!form.legalPersonCardBack" class="upload-text">涓婁紶鍥藉窘闈�</text>
 						</view>
 					</view>
@@ -247,12 +247,23 @@
 					<view class="upload-grid">
 						<view class="upload-box license-upload-box" @click="chooseBusinessImage">
 							<image v-if="!form.businessImg" class="camera-icon" src="/static/icon/ic_camera@2x.png" mode="widthFix"></image>
-							<image v-else class="preview-image" :src="getFullPath(form.businessImg)" mode="aspectFill"></image>
+							<image v-else class="preview-image" :src="businessImgUrl" mode="aspectFill"></image>
 							<text v-if="!form.businessImg" class="upload-text">鐐瑰嚮涓婁紶</text>
 						</view>
 					</view>
 				</view>
 			</template>
+			<view class="agreement-row">
+				<image class="agree-icon" :src="agreed ? '/static/icon/ic_accept_sel@2x.png' : '/static/icon/ic_accept@2x.png'" mode="aspectFit" @tap="agreed = !agreed"></image>
+				<view class="agreement-text-wrap">
+					<text class="agreement-text">鎴戝凡闃呰骞跺悓鎰�</text>
+					<text class="agreement-link" @click="goToService(5)">銆婇闄╂壙璇恒��</text>
+					<text class="agreement-text">銆�</text>
+					<text class="agreement-link" @click="goToService(6)">銆婅鏉庡瘎瀛橀』鐭ャ��</text>
+					<text class="agreement-text">鍙�</text>
+					<text class="agreement-link" @click="goToService(7)">銆婁唬鐞嗙偣鍚堜綔鍗忚銆�</text>
+				</view>
+			</view>
 		</view>
 
 		<view class="bottom-btn-wrap">
@@ -279,6 +290,7 @@
 		},
 		data() {
 			return {
+				agreed:false,
 				form: {
 					telephone: '',
 					companyType: 0,
@@ -301,6 +313,7 @@
 					laborContractImgs: [],
 					socialSecurityImgs: [],
 					legalPersonCard: '',
+					legalPersonCardFront: '',
 					legalPersonCardBack: '',
 					legalPersonName: '',
 					legalPersonPhone: '',
@@ -308,11 +321,14 @@
 					aliName: '',
 					businessImg: ''
 				},
-
+				businessImgUrl:'',
+				idcardImgUrl: '',
+				idcardImgBackUrl: '',
+				legalPersonCardFrontUrl: '',
+				legalPersonCardBackUrl: '',
 				previewMode: 'filled',
 				imgPrefix: '',
 				currentStep: 1,
-				qualificationType: 'company',
 				showAreaPicker: false,
 				areaList: [],
 				areaColumns: [],
@@ -324,7 +340,6 @@
 				uploadedSocialSecurityImages: [],
 				storeFrontImages: [],
 				idCardImages: [],
-				businessImages: [],
 				permitImages: [],
 				laborContractImages: [],
 				socialSecurityImages: []
@@ -371,10 +386,11 @@
 				}
 				this.currentStep = 2
 			},
-			switchQualification(type) {
-				this.qualificationType = type
-				this.form.companyType = type === 'personal' ? 0 : 1
-			},
+			goToService(type) {
+				uni.navigateTo({
+					url: '/pages/rich-text/rich-text?type='+type
+				})
+			},  
 			async submitApply() {
 				if (this.form.companyType === 0) {
 					if (!this.form.idcardImg) {
@@ -415,6 +431,10 @@
 						return
 					}
 					if (!this.form.legalPersonCard) {
+						uni.showToast({ title: '璇疯緭鍏ユ硶浜鸿韩浠借瘉鍙�', icon: 'none' })
+						return
+					}
+					if (!this.form.legalPersonCardFront) {
 						uni.showToast({ title: '璇蜂笂浼犳硶浜鸿韩浠借瘉浜哄儚闈�', icon: 'none' })
 						return
 					}
@@ -426,6 +446,12 @@
 						uni.showToast({ title: '璇蜂笂浼犺惀涓氭墽鐓�', icon: 'none' })
 						return
 					}
+					this.form.idcardImgBack = this.form.legalPersonCardBack
+					this.form.idcardImg = this.form.legalPersonCardFront
+				}
+				if (!this.agreed) {
+					uni.showToast({ title: '璇峰厛闃呰骞跺悓鎰忓崗璁�', icon: 'none' })
+					return
 				}
 				uni.showLoading({ title: '鎻愪氦涓�...', mask: true })
 				try {
@@ -436,7 +462,7 @@
 						setTimeout(() => {
 							uni.navigateBack()
 						}, 1500)
-					} else {
+					}else {
 						uni.showToast({ title: res.msg || '鎻愪氦澶辫触', icon: 'none' })
 					}
 				} catch (error) {
@@ -468,6 +494,11 @@
 						this.form.telephone = data.telephone || this.userInfo.telephone || ''
 						this.form.legalPersonName = data.legalPersonName || ''
 						this.form.legalPersonPhone = data.legalPersonPhone || ''
+						this.businessImgUrl=data.businessImgUrl||''
+						this.idcardImgUrl=data.idcardImgUrl||''
+						this.idcardImgBackUrl=data.idcardImgBackUrl||''
+						this.legalPersonCardFrontUrl=data.idcardImgUrl||''
+						this.legalPersonCardBackUrl=data.idcardImgBackUrl||''
 						this.qualificationType = data.companyType === 0 ? 'personal' : 'company'
 						if (data.storeFrontImgs) {
 							this.storeFrontImages = data.storeFrontImgUrls
@@ -499,9 +530,6 @@
 						this.form.legalPersonCard = data.legalPersonCard || ''
 						this.form.legalPersonCardBack = data.legalPersonCardBack || ''
 						this.form.businessImg = data.businessImg || ''
-						if (data.businessImg) {
-							this.businessImages = [data.businessImgUrl]
-						}
 					}
 				} catch (error) {
 					console.log('鑾峰彇搴楅摵淇℃伅澶辫触', error)
@@ -650,7 +678,7 @@
 							const fullPaths = uploadResults.map(item => item.url || item.path || item)
 							this.uploadedImagesStoreFront = [...this.uploadedImagesStoreFront, ...fullPaths.map(url => ({ url }))]
 							this.storeFrontImages = [...this.storeFrontImages, ...fullPaths]
-							this.form.storeFrontImgs = this.storeFrontImages.map(url => this.getShortPath(url))
+							this.form.storeFrontImgs= [...this.form.storeFrontImgs, ...uploadResults.map(item => item.imgaddr)] 
 							uni.hideLoading()
 							uni.showToast({
 								title: '涓婁紶鎴愬姛',
@@ -693,7 +721,7 @@
 							const fullPaths = uploadResults.map(item => item.url || item.path || item)
 							this.uploadedImagesIdCard = [...this.uploadedImagesIdCard, ...fullPaths.map(url => ({ url }))]
 							this.idCardImages = [...this.idCardImages, ...fullPaths]
-							this.form.storeInteriorImgs = this.idCardImages.map(url => this.getShortPath(url))
+							this.form.storeInteriorImgs= [...this.form.storeInteriorImgs, ...uploadResults.map(item => item.imgaddr)] 
 							uni.hideLoading()
 							uni.showToast({
 								title: '涓婁紶鎴愬姛',
@@ -711,18 +739,8 @@
 				this.form.businessImg = this.businessImages.map(url => this.getShortPath(url)).join(',')
 			},
 			async chooseBusinessImage() {
-				const maxCount = 3
-				const currentCount = this.businessImages.length
-				const remainingCount = maxCount - currentCount
-				if (remainingCount <= 0) {
-					uni.showToast({
-						title: `鏈�澶氫笂浼�${maxCount}寮犲浘鐗嘸,
-						icon: 'none'
-					})
-					return
-				}
 				uni.chooseImage({
-					count: remainingCount,
+					count: 1,
 					sizeType: ['compressed'],
 					sourceType: ['album', 'camera'],
 					success: async (res) => {
@@ -732,11 +750,10 @@
 							mask: true
 						})
 						try {
-							const uploadResults = await this.uploadFiles(tempFilePaths, maxCount)
-							const fullPaths = uploadResults.map(item => item.url || item.path || item)
-							this.uploadedImagesBusiness = [...this.uploadedImagesBusiness, ...fullPaths.map(url => ({ url }))]
-							this.businessImages = [...this.businessImages, ...fullPaths]
-							this.form.businessImg = this.businessImages.map(url => this.getShortPath(url)).join(',')
+							const uploadResults = await this.uploadFiles(tempFilePaths, 1)
+							this.form.businessImg = uploadResults[0].imgaddr  
+							this.businessImgUrl = uploadResults[0].url  
+							console.log("=======================",this.businessImgUrl)
 							uni.hideLoading()
 							uni.showToast({
 								title: '涓婁紶鎴愬姛',
@@ -779,7 +796,7 @@
 							const fullPaths = uploadResults.map(item => item.url || item.path || item)
 							this.uploadedImagesPermit = [...this.uploadedImagesPermit, ...fullPaths.map(url => ({ url }))]
 							this.permitImages = [...this.permitImages, ...fullPaths]
-							this.form.otherMaterialImgs = this.permitImages.map(url => this.getShortPath(url))
+							this.form.otherMaterialImgs= [...this.form.otherMaterialImgs, ...uploadResults.map(item => item.imgaddr)] 
 							uni.hideLoading()
 							uni.showToast({
 								title: '涓婁紶鎴愬姛',
@@ -801,7 +818,8 @@
 						uni.showLoading({ title: '涓婁紶涓�...', mask: true })
 						try {
 							const uploadResults = await this.uploadFiles(tempFilePaths, 1)
-							this.form.idcardImg = this.getShortPath(uploadResults[0].url || uploadResults[0].path || uploadResults[0])
+							this.form.idcardImg = uploadResults[0].imgaddr || uploadResults[0].path || uploadResults[0]
+							this.idcardImgUrl = uploadResults[0].url || uploadResults[0].path || uploadResults[0]
 							uni.hideLoading()
 							uni.showToast({ title: '涓婁紶鎴愬姛', icon: 'success' })
 						} catch (error) {
@@ -820,7 +838,8 @@
 						uni.showLoading({ title: '涓婁紶涓�...', mask: true })
 						try {
 							const uploadResults = await this.uploadFiles(tempFilePaths, 1)
-							this.form.idcardImgBack = this.getShortPath(uploadResults[0].url || uploadResults[0].path || uploadResults[0])
+							this.form.idcardImgBack = uploadResults[0].imgaddr || uploadResults[0].path || uploadResults[0]
+							this.idcardImgBackUrl = uploadResults[0].url || uploadResults[0].path || uploadResults[0]
 							uni.hideLoading()
 							uni.showToast({ title: '涓婁紶鎴愬姛', icon: 'success' })
 						} catch (error) {
@@ -839,7 +858,8 @@
 						uni.showLoading({ title: '涓婁紶涓�...', mask: true })
 						try {
 							const uploadResults = await this.uploadFiles(tempFilePaths, 1)
-							this.form.legalPersonCard = this.getShortPath(uploadResults[0].url || uploadResults[0].path || uploadResults[0])
+							this.form.legalPersonCardFront = uploadResults[0].imgaddr || uploadResults[0].path || uploadResults[0]
+							this.legalPersonCardFrontUrl = uploadResults[0].url || uploadResults[0].path || uploadResults[0]
 							uni.hideLoading()
 							uni.showToast({ title: '涓婁紶鎴愬姛', icon: 'success' })
 						} catch (error) {
@@ -858,7 +878,8 @@
 						uni.showLoading({ title: '涓婁紶涓�...', mask: true })
 						try {
 							const uploadResults = await this.uploadFiles(tempFilePaths, 1)
-							this.form.legalPersonCardBack = this.getShortPath(uploadResults[0].url || uploadResults[0].path || uploadResults[0])
+							this.form.legalPersonCardBack = uploadResults[0].imgaddr || uploadResults[0].path || uploadResults[0]
+							this.legalPersonCardBackUrl = uploadResults[0].url || uploadResults[0].path || uploadResults[0]
 							uni.hideLoading()
 							uni.showToast({ title: '涓婁紶鎴愬姛', icon: 'success' })
 						} catch (error) {
@@ -892,7 +913,7 @@
 							const fullPaths = uploadResults.map(item => item.url || item.path || item)
 							this.uploadedLaborContractImages = [...this.uploadedLaborContractImages, ...fullPaths.map(url => ({ url }))]
 							this.laborContractImages = [...this.laborContractImages, ...fullPaths]
-							this.form.laborContractImgs = this.laborContractImages.map(url => this.getShortPath(url))
+							this.form.laborContractImgs= [...this.form.laborContractImgs, ...uploadResults.map(item => item.imgaddr)] 
 							uni.hideLoading()
 							uni.showToast({ title: '涓婁紶鎴愬姛', icon: 'success' })
 						} catch (error) {
@@ -940,7 +961,7 @@
 							const fullPaths = uploadResults.map(item => item.url || item.path || item)
 							this.uploadedSocialSecurityImages = [...this.uploadedSocialSecurityImages, ...fullPaths.map(url => ({ url }))]
 							this.socialSecurityImages = [...this.socialSecurityImages, ...fullPaths]
-							this.form.socialSecurityImgs = this.socialSecurityImages.map(url => this.getShortPath(url))
+							this.form.socialSecurityImgs= [...this.form.socialSecurityImgs, ...uploadResults.map(item => item.imgaddr)] 
 							uni.hideLoading()
 							uni.showToast({ title: '涓婁紶鎴愬姛', icon: 'success' })
 						} catch (error) {
@@ -1285,7 +1306,33 @@
 		color: #666666;
 		margin-top: 12rpx;
 	}
+.agreement-row {
+		margin-top: 60rpx;
+		display: flex;
+		align-items: flex-start;
+	}
 
+	.agree-icon {
+		width: 34rpx;
+		height: 34rpx;
+		margin-top: 4rpx;
+		flex-shrink: 0;
+	}
+
+	.agreement-text-wrap {
+		margin-left: 14rpx;
+		flex: 1;
+		font-size: 24rpx;
+		line-height: 1.8;
+	}
+
+	.agreement-text {
+		color: #555555;
+	}
+
+	.agreement-link {
+		color: #2E68C4;
+	}
 	.preview-image {
 		width: 100%;
 		height: 100%;

--
Gitblit v1.9.3