个人展示改为个人照片及改为非必填
This commit is contained in:
@ -49,26 +49,24 @@
|
|||||||
|
|
||||||
<template v-if="status >= 2">
|
<template v-if="status >= 2">
|
||||||
<view class="mx-30rpx mt-38rpx">
|
<view class="mx-30rpx mt-38rpx">
|
||||||
<!-- 茶艺师资格证书 -->
|
<!-- 照片信息 -->
|
||||||
<view class="bg-white rounded-16rpx px-30rpx py-28rpx mt-20rpx">
|
<view class="bg-white rounded-16rpx px-30rpx py-28rpx mt-20rpx">
|
||||||
<view class="flex items-center">
|
<view class="flex items-center">
|
||||||
<view class="text-32rpx leading-44rpx text-#303133 mr-10rpx">茶艺师资格证书</view>
|
<view class="text-32rpx leading-44rpx text-#303133 mr-10rpx">照片信息</view>
|
||||||
<view class="flex items-center">
|
<view class="flex items-center">
|
||||||
<wd-img width="16rpx" height="16rpx" :src="`${OSS}icon/icon_validate.png`"></wd-img>
|
<wd-img width="16rpx" height="16rpx" :src="`${OSS}icon/icon_validate.png`"></wd-img>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="mt-32rpx flex items-center">
|
<view class="mt-32rpx">
|
||||||
<wd-upload
|
<wd-upload :header="{ 'token': token }" v-model:file-list="fileList2" :limit="1"
|
||||||
:header="{'token': token}"
|
image-mode="scaleToFill" :action="action">
|
||||||
v-model:file-list="fileList"
|
<view
|
||||||
:limit="1"
|
class="border-2rpx border-dashed border-[#E5E5E5] w-184rpx h-184rpx flex flex-col items-center justify-center rounded-16rpx">
|
||||||
image-mode="scaleToFill"
|
<view class="">
|
||||||
:action="action">
|
<wd-img width="64rpx" height="64rpx" :src="`${OSS}icon/icon_upload.png`"
|
||||||
<view class="border-2rpx border-dashed border-[#E5E5E5] w-184rpx h-184rpx flex flex-col items-center justify-center rounded-16rpx">
|
mode="aspectFill" />
|
||||||
<view>
|
|
||||||
<wd-img width="64rpx" height="64rpx" :src="`${OSS}icon/icon_upload.png`" mode="aspectFill" />
|
|
||||||
</view>
|
</view>
|
||||||
<view class="font-400 text-26rpx leading-36rpx text-#303133">资格证书</view>
|
<view class="font-400 text-26rpx leading-36rpx text-#303133">本人头像</view>
|
||||||
</view>
|
</view>
|
||||||
</wd-upload>
|
</wd-upload>
|
||||||
</view>
|
</view>
|
||||||
@ -170,16 +168,79 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 照片信息 -->
|
<!-- 身份证 -->
|
||||||
<view class="bg-white rounded-16rpx px-30rpx py-28rpx mt-20rpx">
|
<view class="bg-white rounded-16rpx px-30rpx py-28rpx mt-20rpx">
|
||||||
<view class="flex items-center">
|
<view class="flex items-center">
|
||||||
<view class="text-32rpx leading-44rpx text-#303133 mr-10rpx">照片信息</view>
|
<view class="text-32rpx leading-44rpx text-#303133 mr-10rpx">身份证</view>
|
||||||
<view class="flex items-center">
|
<view class="flex items-center">
|
||||||
<wd-img width="16rpx" height="16rpx" :src="`${OSS}icon/icon_validate.png`"></wd-img>
|
<wd-img width="16rpx" height="16rpx" :src="`${OSS}icon/icon_validate.png`"></wd-img>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="mt-32rpx flex items-center gap-16rpx">
|
||||||
|
<wd-upload
|
||||||
|
:header="{'token': token}"
|
||||||
|
v-model:file-list="frontCard"
|
||||||
|
:limit="1"
|
||||||
|
image-mode="scaleToFill"
|
||||||
|
:action="action">
|
||||||
|
<view class="border-2rpx border-dashed border-[#E5E5E5] w-184rpx h-184rpx flex flex-col items-center justify-center rounded-16rpx">
|
||||||
|
<view>
|
||||||
|
<wd-img width="64rpx" height="64rpx" :src="`${OSS}icon/icon_upload.png`" mode="aspectFill" />
|
||||||
|
</view>
|
||||||
|
<view class="font-400 text-26rpx leading-36rpx text-#303133">身份证正面</view>
|
||||||
|
</view>
|
||||||
|
</wd-upload>
|
||||||
|
|
||||||
|
<wd-upload
|
||||||
|
:header="{'token': token}"
|
||||||
|
v-model:file-list="backCard"
|
||||||
|
:limit="1"
|
||||||
|
image-mode="scaleToFill"
|
||||||
|
:action="action">
|
||||||
|
<view class="border-2rpx border-dashed border-[#E5E5E5] w-184rpx h-184rpx flex flex-col items-center justify-center rounded-16rpx">
|
||||||
|
<view>
|
||||||
|
<wd-img width="64rpx" height="64rpx" :src="`${OSS}icon/icon_upload.png`" mode="aspectFill" />
|
||||||
|
</view>
|
||||||
|
<view class="font-400 text-26rpx leading-36rpx text-#303133">身份证反面</view>
|
||||||
|
</view>
|
||||||
|
</wd-upload>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 茶艺师资格证书 -->
|
||||||
|
<view class="bg-white rounded-16rpx px-30rpx py-28rpx mt-20rpx">
|
||||||
|
<view class="flex items-center">
|
||||||
|
<view class="text-32rpx leading-44rpx text-#303133 mr-10rpx">茶艺师资格证书</view>
|
||||||
|
<view class="flex items-center">
|
||||||
|
<wd-img width="16rpx" height="16rpx" :src="`${OSS}icon/icon_validate.png`"></wd-img>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="mt-32rpx flex items-center">
|
||||||
|
<wd-upload
|
||||||
|
:header="{'token': token}"
|
||||||
|
v-model:file-list="fileList"
|
||||||
|
:limit="1"
|
||||||
|
image-mode="scaleToFill"
|
||||||
|
:action="action">
|
||||||
|
<view class="border-2rpx border-dashed border-[#E5E5E5] w-184rpx h-184rpx flex flex-col items-center justify-center rounded-16rpx">
|
||||||
|
<view>
|
||||||
|
<wd-img width="64rpx" height="64rpx" :src="`${OSS}icon/icon_upload.png`" mode="aspectFill" />
|
||||||
|
</view>
|
||||||
|
<view class="font-400 text-26rpx leading-36rpx text-#303133">资格证书</view>
|
||||||
|
</view>
|
||||||
|
</wd-upload>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 个人照片 -->
|
||||||
|
<view class="bg-white rounded-16rpx px-30rpx py-28rpx mt-20rpx">
|
||||||
|
<view class="flex items-center">
|
||||||
|
<view class="text-32rpx leading-44rpx text-#303133 mr-10rpx">个人照片</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<view class="mt-32rpx">
|
<view class="mt-32rpx">
|
||||||
<wd-upload :header="{ 'token': token }" v-model:file-list="fileList2" :limit="1"
|
<wd-upload :header="{ 'token': token }" v-model:file-list="fileList4" :limit="9" multiple
|
||||||
image-mode="scaleToFill" :action="action">
|
image-mode="scaleToFill" :action="action">
|
||||||
<view
|
<view
|
||||||
class="border-2rpx border-dashed border-[#E5E5E5] w-184rpx h-184rpx flex flex-col items-center justify-center rounded-16rpx">
|
class="border-2rpx border-dashed border-[#E5E5E5] w-184rpx h-184rpx flex flex-col items-center justify-center rounded-16rpx">
|
||||||
@ -187,7 +248,9 @@
|
|||||||
<wd-img width="64rpx" height="64rpx" :src="`${OSS}icon/icon_upload.png`"
|
<wd-img width="64rpx" height="64rpx" :src="`${OSS}icon/icon_upload.png`"
|
||||||
mode="aspectFill" />
|
mode="aspectFill" />
|
||||||
</view>
|
</view>
|
||||||
<view class="font-400 text-26rpx leading-36rpx text-#303133">本人头像</view>
|
<view class="flex items-center">
|
||||||
|
<view class="font-400 text-26rpx leading-36rpx text-#303133">个人照片</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</wd-upload>
|
</wd-upload>
|
||||||
</view>
|
</view>
|
||||||
@ -212,30 +275,6 @@
|
|||||||
</view>
|
</view>
|
||||||
</wd-upload>
|
</wd-upload>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 个人展示 -->
|
|
||||||
<view class="bg-white rounded-16rpx px-30rpx py-28rpx mt-20rpx">
|
|
||||||
<view class="flex items-center">
|
|
||||||
<view class="text-32rpx leading-44rpx text-#303133 mr-10rpx">个人展示</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="mt-32rpx">
|
|
||||||
<wd-upload :header="{ 'token': token }" v-model:file-list="fileList4" :limit="9" multiple
|
|
||||||
image-mode="scaleToFill" :action="action">
|
|
||||||
<view
|
|
||||||
class="border-2rpx border-dashed border-[#E5E5E5] w-184rpx h-184rpx flex flex-col items-center justify-center rounded-16rpx">
|
|
||||||
<view class="">
|
|
||||||
<wd-img width="64rpx" height="64rpx" :src="`${OSS}icon/icon_upload.png`"
|
|
||||||
mode="aspectFill" />
|
|
||||||
</view>
|
|
||||||
<view class="flex items-center">
|
|
||||||
<view class="font-400 text-26rpx leading-36rpx text-#303133">个人展示</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</wd-upload>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -325,6 +364,8 @@ const fileList = ref<any[]>([]) // 资格证
|
|||||||
const fileList2 = ref<any[]>([]) // 照片信息
|
const fileList2 = ref<any[]>([]) // 照片信息
|
||||||
const fileList3 = ref<any[]>([]) // 个人展示
|
const fileList3 = ref<any[]>([]) // 个人展示
|
||||||
const fileList4 = ref<any[]>([]) // 健康证
|
const fileList4 = ref<any[]>([]) // 健康证
|
||||||
|
const frontCard = ref<any[]>([]) // 身份证正面
|
||||||
|
const backCard = ref<any[]>([]) // 身份证反面
|
||||||
const action = import.meta.env.VITE_UPLOAD_BASEURL
|
const action = import.meta.env.VITE_UPLOAD_BASEURL
|
||||||
|
|
||||||
// 验证码倒计时
|
// 验证码倒计时
|
||||||
@ -347,21 +388,27 @@ const form = ref<{
|
|||||||
code: string // 验证码
|
code: string // 验证码
|
||||||
health_certificate?: string // 健康证
|
health_certificate?: string // 健康证
|
||||||
information?: string // 个人展示
|
information?: string // 个人展示
|
||||||
|
image?: string // 个人展示
|
||||||
|
front_card?: string // 身份证正面
|
||||||
|
back_card?: string // 身份证反面
|
||||||
broker_user_id?: number // 经纪人ID(可选,扫码绑定经纪人时携带)
|
broker_user_id?: number // 经纪人ID(可选,扫码绑定经纪人时携带)
|
||||||
label_id?: string // 专属圈子标签ID,逗号分隔
|
label_id?: string // 专属圈子标签ID,逗号分隔
|
||||||
}>({
|
}>({
|
||||||
license_img: '',
|
license_img: '', // 营业执照
|
||||||
username: '',
|
username: '', // 茶艺师名字
|
||||||
gender: 2,
|
gender: 2, // 茶艺师性别(1男 2女)
|
||||||
both: '',
|
both: '', // 出生年月
|
||||||
height: '',
|
height: '', // 身高
|
||||||
weight: '',
|
weight: '', // 体重
|
||||||
city_id: 0,
|
city_id: 0, // 城市ID
|
||||||
avatar: '',
|
avatar: '', // 头像
|
||||||
mobile: '',
|
mobile: '', // 联系电话
|
||||||
code: '',
|
code: '', // 验证码
|
||||||
health_certificate: '',
|
health_certificate: '', // 健康证
|
||||||
information: '',
|
information: '', // 个人展示(2026-04-07暂时废弃)
|
||||||
|
image: '', // 本人照片
|
||||||
|
front_card: '', // 身份证正面
|
||||||
|
back_card: '', // 身份证反面
|
||||||
broker_user_id: 0, // 经纪人ID(可选,扫码绑定经纪人时携带)
|
broker_user_id: 0, // 经纪人ID(可选,扫码绑定经纪人时携带)
|
||||||
label_id: '' // 专属圈子标签ID,逗号分隔
|
label_id: '' // 专属圈子标签ID,逗号分隔
|
||||||
})
|
})
|
||||||
@ -472,8 +519,8 @@ const TeaSpecialist = {
|
|||||||
* 提交申请
|
* 提交申请
|
||||||
*/
|
*/
|
||||||
handleSubmit: async () => {
|
handleSubmit: async () => {
|
||||||
if (fileList.value.length == 0) {
|
if (fileList2.value.length == 0) {
|
||||||
toast.show('请上传茶艺师资格证书')
|
toast.show('请上传本人头像')
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -513,16 +560,32 @@ const TeaSpecialist = {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 身份证正面和反面校验
|
||||||
|
if (frontCard.value.length === 0) {
|
||||||
|
toast.show('请上传身份证正面照片')
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
if (!form.value.city_id) {
|
if (!form.value.city_id) {
|
||||||
toast.show('请选择服务区域')
|
toast.show('请选择服务区域')
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fileList2.value.length == 0) {
|
if (backCard.value.length === 0) {
|
||||||
toast.show('请上传本人头像')
|
toast.show('请上传身份证反面照片')
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fileList.value.length == 0) {
|
||||||
|
toast.show('请上传茶艺师资格证书')
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// if (fileList4.value.length == 0) {
|
||||||
|
// toast.show('请至少上传一张个人展示照片')
|
||||||
|
// return false
|
||||||
|
// }
|
||||||
|
|
||||||
if (!mobile(form.value.mobile)) {
|
if (!mobile(form.value.mobile)) {
|
||||||
toast.show('请检查手机号码')
|
toast.show('请检查手机号码')
|
||||||
return false
|
return false
|
||||||
@ -537,12 +600,16 @@ const TeaSpecialist = {
|
|||||||
form.value.license_img = fileList.value.length > 0 ? removeImageUrlPrefix(fileList.value)[0] : '' // 茶艺师资格证书
|
form.value.license_img = fileList.value.length > 0 ? removeImageUrlPrefix(fileList.value)[0] : '' // 茶艺师资格证书
|
||||||
form.value.avatar = fileList2.value.length > 0 ? removeImageUrlPrefix(fileList2.value)[0] : '' // 个人照片
|
form.value.avatar = fileList2.value.length > 0 ? removeImageUrlPrefix(fileList2.value)[0] : '' // 个人照片
|
||||||
form.value.health_certificate = fileList3.value.length > 0 ? removeImageUrlPrefix(fileList3.value)[0] : '' // 健康证
|
form.value.health_certificate = fileList3.value.length > 0 ? removeImageUrlPrefix(fileList3.value)[0] : '' // 健康证
|
||||||
form.value.information = fileList4.value.length > 0 ? removeImageUrlPrefix(fileList4.value) : '' // 个人展示
|
form.value.image = fileList4.value.length > 0 ? removeImageUrlPrefix(fileList4.value) : '' // 个人展示
|
||||||
form.value.information = Array.isArray(form.value.information) ? form.value.information.join(',') : form.value.information
|
form.value.image = Array.isArray(form.value.image) ? form.value.image.join(',') : form.value.image
|
||||||
|
form.value.front_card = frontCard.value.length > 0 ? removeImageUrlPrefix(frontCard.value)[0] : '' // 身份证正面
|
||||||
|
form.value.back_card = backCard.value.length > 0 ? removeImageUrlPrefix(backCard.value)[0] : '' // 身份证反面
|
||||||
|
|
||||||
let data = form.value
|
let data = form.value
|
||||||
data.both = both.value
|
data.both = both.value
|
||||||
|
console.log("🚀 ~ form.value:", form.value)
|
||||||
|
|
||||||
|
return
|
||||||
toast.loading({
|
toast.loading({
|
||||||
loadingType: 'ring',
|
loadingType: 'ring',
|
||||||
loadingColor: '#4C9F44',
|
loadingColor: '#4C9F44',
|
||||||
@ -550,7 +617,6 @@ const TeaSpecialist = {
|
|||||||
})
|
})
|
||||||
try {
|
try {
|
||||||
toast.close()
|
toast.close()
|
||||||
|
|
||||||
await addTeaSpecialist(data)
|
await addTeaSpecialist(data)
|
||||||
status.value = 0 // 提交成功,变更状态为待审核
|
status.value = 0 // 提交成功,变更状态为待审核
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user