From 59b1f0e9967902aa10f5e017d5a0bdfd1b60c9ea Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期三, 29 四月 2026 09:42:45 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
small-program/pages/store-apply/store-apply.vue | 118 +++++++++++++++++++++++++++++++++++++++-------------------
1 files changed, 79 insertions(+), 39 deletions(-)
diff --git a/small-program/pages/store-apply/store-apply.vue b/small-program/pages/store-apply/store-apply.vue
index 4689fc5..0e07eb8 100644
--- a/small-program/pages/store-apply/store-apply.vue
+++ b/small-program/pages/store-apply/store-apply.vue
@@ -4,12 +4,18 @@
<view class="process-wrap">
<view class="process-step" :class="{ active: currentStep === 1 }" @tap="currentStep = 1">
- <view class="step-dot"></view>
+ <view class="step-dot" :class="{ 'step-dot--done': currentStep > 1 }">
+ <view v-if="currentStep === 1" class="step-dot__inner"></view>
+ <u-icon v-else name="checkmark" color="#ffffff" size="14"></u-icon>
+ </view>
<text>闂ㄥ簵淇℃伅</text>
</view>
<view class="process-line"></view>
<view class="process-step" :class="{ active: currentStep === 2 }" @tap="currentStep = 2">
- <view class="step-dot step-index">2</view>
+ <view class="step-dot" :class="{ 'step-dot--inactive': currentStep !== 2 }">
+ <view v-if="currentStep === 2" class="step-dot__inner"></view>
+ <text v-else class="step-dot__index">2</text>
+ </view>
<text>涓讳綋璧勮川</text>
</view>
</view>
@@ -91,7 +97,7 @@
<view class="upload-section">
<view class="upload-title-row between-row">
- <view class="label-row"><text class="label">闂ㄥ簵鍐呴儴鎷涚墝</text><text class="required">*</text></view>
+ <view class="label-row"><text class="label">闂ㄥ簵鍐呴儴鐓х墖</text><text class="required">*</text></view>
<text class="upload-tip">鏈�澶氫笂浼�3寮犵収鐗�</text>
</view>
<view class="upload-grid">
@@ -203,7 +209,11 @@
<input class="text-input" v-model="form.legalPersonName" 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.legalPersonPhone" 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.aliAccount" placeholder="璇疯緭鍏ヤ紒涓氭敮浠樺疂璐﹀彿" placeholder-style="color: #c1c7d0;" />
@@ -228,14 +238,14 @@
</view>
<view class="upload-grid double-upload-grid">
<view class="upload-box id-upload-box" @click="chooseLegalPersonCardFront">
- <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>
+ <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="idcardImgUrl" mode="aspectFill"></image>
+ <text v-if="!form.idcardImg" 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="legalPersonCardBackUrl" mode="aspectFill"></image>
- <text v-if="!form.legalPersonCardBack" class="upload-text">涓婁紶鍥藉窘闈�</text>
+ <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="idcardImgBackUrl" mode="aspectFill"></image>
+ <text v-if="!form.idcardImgBack" class="upload-text">涓婁紶鍥藉窘闈�</text>
</view>
</view>
</view>
@@ -313,8 +323,6 @@
laborContractImgs: [],
socialSecurityImgs: [],
legalPersonCard: '',
- legalPersonCardFront: '',
- legalPersonCardBack: '',
legalPersonName: '',
legalPersonPhone: '',
aliAccount: '',
@@ -324,8 +332,6 @@
businessImgUrl:'',
idcardImgUrl: '',
idcardImgBackUrl: '',
- legalPersonCardFrontUrl: '',
- legalPersonCardBackUrl: '',
previewMode: 'filled',
imgPrefix: '',
currentStep: 1,
@@ -372,8 +378,17 @@
uni.showToast({ title: '璇疯緭鍏ヨ仈绯讳汉鐢佃瘽', icon: 'none' })
return
}
+ const mobileRegex = /^1\d{10}$/
+ if (!mobileRegex.test(this.form.linkPhone)) {
+ uni.showToast({ title: '璇疯緭鍏ユ纭殑鎵嬫満鍙�', icon: 'none' })
+ return
+ }
if (!this.form.idcard) {
uni.showToast({ title: '璇疯緭鍏ヨ仈绯讳汉韬唤璇佸彿', icon: 'none' })
+ return
+ }
+ if (!/^\d{18}$/.test(this.form.idcard)) {
+ uni.showToast({ title: '璇疯緭鍏�18浣嶈韩浠借瘉鍙�', icon: 'none' })
return
}
if (!this.form.storeFrontImgs || this.form.storeFrontImgs.length === 0) {
@@ -381,7 +396,7 @@
return
}
if (!this.form.storeInteriorImgs || this.form.storeInteriorImgs.length === 0) {
- uni.showToast({ title: '璇蜂笂浼犻棬搴楀唴閮ㄦ嫑鐗�', icon: 'none' })
+ uni.showToast({ title: '璇蜂笂浼犻棬搴楀唴閮ㄧ収鐗�', icon: 'none' })
return
}
this.currentStep = 2
@@ -422,6 +437,16 @@
uni.showToast({ title: '璇疯緭鍏ユ硶浜哄鍚�', icon: 'none' })
return
}
+ if (!this.form.legalPersonPhone) {
+ uni.showToast({ title: '璇疯緭鍏ユ硶浜烘墜鏈哄彿', icon: 'none' })
+ return
+ }
+ const mobileRegex = /^1\d{10}$/
+ const landlineRegex = /^\d{3,4}-?\d{7,8}$/
+ if (!mobileRegex.test(this.form.legalPersonPhone) && !landlineRegex.test(this.form.legalPersonPhone)) {
+ uni.showToast({ title: '璇疯緭鍏ユ纭殑鎵嬫満鍙锋垨鍥哄畾鐢佃瘽', icon: 'none' })
+ return
+ }
if (!this.form.aliAccount) {
uni.showToast({ title: '璇疯緭鍏ヤ紒涓氭敮浠樺疂璐﹀彿', icon: 'none' })
return
@@ -434,11 +459,15 @@
uni.showToast({ title: '璇疯緭鍏ユ硶浜鸿韩浠借瘉鍙�', icon: 'none' })
return
}
- if (!this.form.legalPersonCardFront) {
+ if (!/^\d{18}$/.test(this.form.legalPersonCard)) {
+ uni.showToast({ title: '璇疯緭鍏�18浣嶈韩浠借瘉鍙�', icon: 'none' })
+ return
+ }
+ if (!this.form.idcardImg) {
uni.showToast({ title: '璇蜂笂浼犳硶浜鸿韩浠借瘉浜哄儚闈�', icon: 'none' })
return
}
- if (!this.form.legalPersonCardBack) {
+ if (!this.form.idcardImgBack) {
uni.showToast({ title: '璇蜂笂浼犳硶浜鸿韩浠借瘉鍥藉窘闈�', icon: 'none' })
return
}
@@ -446,8 +475,6 @@
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' })
@@ -497,9 +524,7 @@
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'
+ this.qualificationType = data.companyType === 'personal' ? 'personal' : 'company'
if (data.storeFrontImgs) {
this.storeFrontImages = data.storeFrontImgUrls
this.uploadedImagesStoreFront = data.storeFrontImgUrls.map(url => ({ url }))
@@ -528,7 +553,6 @@
this.form.socialSecurityImgs = data.socialSecurityImgs
}
this.form.legalPersonCard = data.legalPersonCard || ''
- this.form.legalPersonCardBack = data.legalPersonCardBack || ''
this.form.businessImg = data.businessImg || ''
}
} catch (error) {
@@ -696,7 +720,7 @@
this.form.storeInteriorImgs = this.idCardImages.map(url => this.getShortPath(url))
},
async chooseIdCardImage() {
- const maxCount = 2
+ const maxCount = 3
const currentCount = this.idCardImages.length
const remainingCount = maxCount - currentCount
if (remainingCount <= 0) {
@@ -858,8 +882,8 @@
uni.showLoading({ title: '涓婁紶涓�...', mask: true })
try {
const uploadResults = await this.uploadFiles(tempFilePaths, 1)
- this.form.legalPersonCardFront = uploadResults[0].imgaddr || uploadResults[0].path || uploadResults[0]
- this.legalPersonCardFrontUrl = 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) {
@@ -878,8 +902,8 @@
uni.showLoading({ title: '涓婁紶涓�...', mask: true })
try {
const uploadResults = await this.uploadFiles(tempFilePaths, 1)
- this.form.legalPersonCardBack = uploadResults[0].imgaddr || uploadResults[0].path || uploadResults[0]
- this.legalPersonCardBackUrl = 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) {
@@ -1019,21 +1043,38 @@
}
.step-dot {
- width: 26rpx;
- height: 26rpx;
+ width: 50rpx;
+ height: 50rpx;
border-radius: 50%;
- background: #16b0fa;
+ background: #afe4fe;
margin-bottom: 14rpx;
- border: 5rpx solid #a2e2ff;
- }
-
- .step-index {
- background: #b9bdc6;
- font-size: 18rpx;
- color: #ffffff;
display: flex;
align-items: center;
justify-content: center;
+ box-sizing: border-box;
+
+ &__inner {
+ width: 26rpx;
+ height: 26rpx;
+ border-radius: 50%;
+ background: #13b2fc;
+ box-sizing: border-box;
+ }
+
+ &__index {
+ font-size: 30rpx;
+ font-weight: 400;
+ color: #ffffff;
+ line-height: 1;
+ }
+
+ &--inactive {
+ background: #8C939F;
+ }
+
+ &--done {
+ background: #10B2FA;
+ }
}
.process-line {
@@ -1121,7 +1162,6 @@
.text-input,
.select-row {
- height: 54rpx;
margin-top: 14rpx;
font-weight: 400;
font-size: 30rpx;
--
Gitblit v1.9.3