更新首页

This commit is contained in:
2026-09-11 12:25:38 +08:00
parent 9e24153eac
commit c29c3be942
326 changed files with 6564 additions and 44307 deletions
+53 -9
View File
@@ -65,6 +65,17 @@
<h3 class="section-title">资质证明材料</h3>
<p class="section-desc">请上传以下材料以便我们审核您的入会资格</p>
<div class="materials-tip">
<div>企业会员需提交入会申请表加盖公章营业执照法人身份证企业简介</div>
<a-button type="link" @click="navigateTo('/about/join/downloads')">前往资料下载</a-button>
</div>
<a-form-item label="入会申请表(加盖公章)">
<a-upload :before-upload="beforeUpload" :custom-request="handleUpload('applicationForm')">
<a-button><UploadOutlined /> 上传申请表</a-button>
</a-upload>
</a-form-item>
<a-form-item label="营业执照">
<a-upload :before-upload="beforeUpload" :custom-request="handleUpload('license')">
<a-button><UploadOutlined /> 上传营业执照</a-button>
@@ -115,9 +126,22 @@
<script setup lang="ts">
import { message } from 'ant-design-vue'
import { CheckCircleOutlined, UploadOutlined } from '@ant-design/icons-vue'
import { submitSiteJoinApplication, uploadSiteJoinApplicationFile } from '@/api/site'
useHead({ title: '企业会员申请 - 决策咨询网' })
type UploadRequestOption = {
file: File
onSuccess: (response?: unknown) => void
onError: (error?: unknown) => void
}
type UploadResult = {
path: string
url: string
name: string
}
const currentStep = ref(0)
const submitting = ref(false)
@@ -129,6 +153,7 @@ const formData = reactive({
email: '',
address: '',
bio: '',
applicationForm: '',
license: '',
idCard: '',
intro: '',
@@ -144,14 +169,17 @@ function beforeUpload(file: File) {
}
function handleUpload(type: string) {
return async (option: any) => {
return async (option: UploadRequestOption) => {
try {
// TODO: 调用上传API
option.onSuccess()
const form = new FormData()
form.append('file', option.file)
const data = await uploadSiteJoinApplicationFile(form)
formData[type as keyof typeof formData] = data.path
option.onSuccess(data)
message.success('上传成功')
} catch {
option.onError()
message.error('上传失败')
} catch (e: unknown) {
option.onError(e)
message.error(e instanceof Error ? e.message : '上传失败')
}
}
}
@@ -169,11 +197,14 @@ function handleNext() {
async function handleSubmit() {
submitting.value = true
try {
// TODO: 调用API提交申请
await submitSiteJoinApplication({
type: 'enterprise',
...formData,
})
message.success('提交成功,请等待审核')
navigateTo('/about/join')
} catch (e: any) {
message.error(e?.message || '提交失败')
} catch (e: unknown) {
message.error(e instanceof Error ? e.message : '提交失败')
} finally {
submitting.value = false
}
@@ -229,6 +260,19 @@ async function handleSubmit() {
margin: -10px 0 20px;
}
.materials-tip {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
margin-bottom: 20px;
padding: 14px 16px;
background: #f8fafc;
border: 1px solid #dbeafe;
border-radius: 12px;
color: #475569;
}
.upload-hint {
font-size: 12px;
color: #9ca3af;