diff --git a/src/apis/admin.ts b/src/apis/admin.ts
index 68f6f1b..1e510bf 100644
--- a/src/apis/admin.ts
+++ b/src/apis/admin.ts
@@ -10,4 +10,6 @@ export const useList = (params:any) => request.get('/v1/order/use_list',{params}
// 容器实例列表
export const hostCaseList = (params:any) => request.get('/v1/host_case/case_list',{params})
// 镜像列表
-export const getImageList = (params:any) => request.get('/v1/image/image_list',{params})
\ No newline at end of file
+export const getImageList = (params:any) => request.get('/v1/image/image_list',{params})
+// 删除镜像
+export const delImageItem = (params:any) => request.delete(`/v1/image/delete_image/${params.image_id}`)
\ No newline at end of file
diff --git a/src/apis/certification.ts b/src/apis/certification.ts
new file mode 100644
index 0000000..2a3823c
--- /dev/null
+++ b/src/apis/certification.ts
@@ -0,0 +1,10 @@
+// 认证接口
+import request from '@/utils/index'
+
+// 个人认证
+export const personalCertification = (params:any) => request.put('/v1/certification/Personal_certification', params)
+
+// 企业认证
+export const enterpriseCertification = (params:any) => request.put('/v1/certification/company_certification', params)
+// 获取认证信息
+export const certificationInfoApi = () => request.get('/v1/certification/certification_info')
diff --git a/src/views/admin/account/enterRealAuth/index.vue b/src/views/admin/account/enterRealAuth/index.vue
index 3ead09d..7aa2c5f 100644
--- a/src/views/admin/account/enterRealAuth/index.vue
+++ b/src/views/admin/account/enterRealAuth/index.vue
@@ -13,8 +13,8 @@
-
-
+
+
营业执照
@@ -29,32 +29,33 @@
上传营业执照
-
-
![营业执照]()
+
+
支持 jpg、jpeg、png 格式图片,大小不超过 10M
-
-
+
+
-
-
+
+
- 企业法人
- 被授权人
+ 企业法人
+ 被授权人
-
-
- 中国大陆二代居民身份证
+
+
+ 中国大陆二代居民身份证
@@ -68,8 +69,8 @@
拍摄身份证正面
-
-
![身份证正面]()
+
+
@@ -80,32 +81,33 @@
拍摄身份证正面
-
-
![身份证正面]()
+
+
支持 jpg、jpeg、png 格式图片,大小不超过 10M
-
-
+
-
+
-
-
![授权书]()
+
+
@@ -127,7 +129,7 @@
@@ -137,8 +139,6 @@
import {
ref,
reactive,
- UploadChangeParam,
- UploadFile
} from 'vue';
import {
message,
@@ -153,42 +153,56 @@ import {
} from '@ant-design/icons-vue';
import { useRouter } from 'vue-router';
+import { enterpriseCertification } from '@/apis/certification';
import SmsCodeInput from '@/components/SmsCodeInput.vue';
+import { fetchUserInfo } from '@/apis/modules/login';
+import dayjs from 'dayjs'
const router = useRouter();
// 表单引用
const formRef = ref();
-
+const btnLoading = ref(false);
// 表单数据
interface FormState {
- certType: string | null;
- businessLicenseUrl: string | null;
- enterpriseName: string;
- creditCode: string;
- identity: 'legal_representative' | 'authorized_person' | null;
- idCardFrontUrl: string | null;
- idCardBackUrl: string | null;
+ companyDocumentType: string | null;
+ documentType: string | null;
+ company_name: string;
+ unified_social_credit_code: string;
+ identity: 'LegalPerson' | 'AuthorizedPerson' | null;
name: string;
idNumber: string;
agreed: boolean;
phone: string;
code: string;
realName: string;
+ company_license: string | null;
+ power_of_attorney: string | null;
+ id_card_back: string | null;
+ id_card_front: string | null;
+ id_card: string | null;
+ certification_start?: string;
+ certification_end?: string;
+ creditCode?: any[];
}
const formState = reactive({
- certType: null,
- businessLicenseUrl: null,
- enterpriseName: '',
- creditCode: '',
- identity: null,
- idCardFrontUrl: null,
- idCardBackUrl: null,
+ companyDocumentType: '',
+ documentType: null,
+ company_name: '',
+ unified_social_credit_code: '',
+ identity: 'LegalPerson',
+ id_card_back: "",
+ id_card_front: "",
name: '',
idNumber: '',
agreed: false,
phone: '',
code: '',
realName: '',
+ company_license: "",
+ power_of_attorney: "",
+ id_card: "",
+ certification_start: '',
+ certification_end: ''
});
// 文件大小限制:10MB
@@ -212,7 +226,7 @@ const handleBusinessLicenseChange = (info: UploadChangeParam) => {
if (info.file.status === 'done') {
// 模拟获取 URL(实际应调用上传接口)
const url = URL.createObjectURL(info.file.originFileObj!);
- formState.businessLicenseUrl = url;
+ formState.id_card_front = url;
}
};
@@ -234,7 +248,7 @@ const handleIdCardBackChange = (info: UploadChangeParam) => {
// 自定义校验函数
const validateBusinessLicense = () => {
- if (!formState.businessLicenseUrl) {
+ if (!formState.id_card_front) {
return Promise.reject(new Error('请上传证件照'));
}
return Promise.resolve();
@@ -256,17 +270,35 @@ const validateIdCardBack = () => {
// 提交
const handleSubmit = async () => {
- try {
- await formRef.value?.validateFields();
- if (!formState.agreed) {
- message.error('请阅读并同意协议');
- return;
+
+ formRef.value?.validateFields().then(async () => {
+ try {
+ if (!formState.agreed) {
+ message.error('请阅读并同意协议');
+ return;
+ }
+ btnLoading.value = true;
+ formState.id_card_front = 'https://example.com/id_card_front.jpg'
+ formState.id_card_back = 'https://example.com/id_card_back.jpg'
+ if (formState.creditCode) {
+ formState.certification_start = dayjs(formState.creditCode[0]).format('YYYY-MM-DD');
+ formState.certification_end = dayjs(formState.creditCode[1]).format('YYYY-MM-DD');
+ }
+ const res = await enterpriseCertification(formState);
+ btnLoading.value = false;
+ message.success('认证提交成功');
+ const userRes = await fetchUserInfo();
+ localStorage.setItem('userInfo', JSON.stringify(userRes));
+ router.push('/layout/admin/realnameAuth');
+ } catch (error: any) {
+ console.log('Validation failed:', error);
+ message.error(error)
+ btnLoading.value = false;
}
- message.success('提交成功!');
- // TODO: 调用 API 提交表单
- } catch (error) {
- console.log('Validation failed:', error);
- }
+
+ });
+ // TODO: 调用 API 提交表单
+
};
// 取消
diff --git a/src/views/admin/account/personalRealAuth/index.vue b/src/views/admin/account/personalRealAuth/index.vue
index 72071e6..7b71370 100644
--- a/src/views/admin/account/personalRealAuth/index.vue
+++ b/src/views/admin/account/personalRealAuth/index.vue
@@ -6,7 +6,7 @@
- |
+ |
个人认证
Fast亼算云严格遵守国家相关个人信息隐私保护规定,并不存储使用您的个人信息,请完成相关认证。
@@ -14,12 +14,12 @@
-
-
+
+
-
-
- 中国大陆二代居民身份证
+
+
+ 中国大陆二代居民身份证
@@ -33,8 +33,8 @@
拍摄身份证正面
-
-
![身份证正面]()
+
+
@@ -42,20 +42,20 @@
@change="handleBusinessLicenseChange" accept="image/png,image/jpeg" class="avatar-uploader2">

-
拍摄身份证正面
+
拍摄身份证反面
-
-
![身份证正面]()
+
+
支持 jpg、jpeg、png 格式图片,大小不超过 10M
-
-
+
@@ -91,8 +91,6 @@
import {
ref,
reactive,
- UploadChangeParam,
- UploadFile
} from 'vue';
import {
message,
@@ -106,16 +104,20 @@ import {
} from '@ant-design/icons-vue';
import { useRouter } from 'vue-router';
+import { personalCertification } from '@/apis/certification';
import SmsCodeInput from '@/components/SmsCodeInput.vue';
+import { fetchUserInfo } from '@/apis/modules/login';
+import dayjs from 'dayjs'
const router = useRouter();
+const btnLoading = ref(false);
// 表单引用
const formRef = ref();
// 表单数据
interface FormState {
- certType: string | null;
+ documentType: string | null;
businessLicenseUrl: string | null;
- enterpriseName: string;
+ id_card: string;
creditCode: string;
identity: 'legal_representative' | 'authorized_person' | null;
idCardFrontUrl: string | null;
@@ -125,12 +127,16 @@ interface FormState {
agreed: boolean;
phone: string;
code: string;
+ certification_start: string;
+ certification_end: string;
+ id_card_front: string;
+ id_card_back: string;
}
const formState = reactive({
- certType: null,
+ documentType: null,
businessLicenseUrl: null,
- enterpriseName: '',
+ id_card: '',
creditCode: '',
identity: null,
idCardFrontUrl: null,
@@ -140,6 +146,10 @@ const formState = reactive({
agreed: false,
phone: '',
code: '',
+ certification_start: '',
+ certification_end: '',
+ id_card_front: '',
+ id_card_back: '',
});
// 文件大小限制:10MB
@@ -207,17 +217,31 @@ const validateIdCardBack = () => {
// 提交
const handleSubmit = async () => {
- try {
- await formRef.value?.validateFields();
- if (!formState.agreed) {
- message.error('请阅读并同意协议');
- return;
+ formRef.value?.validateFields().then(async () => {
+ try {
+ btnLoading.value = true;
+ if (!formState.agreed) {
+ message.error('请阅读并同意协议');
+ return;
+ }
+ formState.id_card_front = 'https://example.com/id_card_front.jpg'
+ formState.id_card_back = 'https://example.com/id_card_back.jpg'
+ formState.certification_start = dayjs(formState.creditCode[0]).format('YYYY-MM-DD');
+ formState.certification_end = dayjs(formState.creditCode[1]).format('YYYY-MM-DD');
+ await personalCertification(formState);
+ message.success('认证提交成功');
+ const userRes = await fetchUserInfo();
+ localStorage.setItem('userInfo', JSON.stringify(userRes));
+ router.push('/layout/admin/realnameAuth');
+ btnLoading.value = false;
+ } catch (error: any) {
+ message.error(error);
+ btnLoading.value = false;
+ console.log('Validation failed:', error);
}
- message.success('提交成功!');
// TODO: 调用 API 提交表单
- } catch (error) {
- console.log('Validation failed:', error);
- }
+ });
+
};
// 取消
diff --git a/src/views/admin/account/realnameAuth/index.vue b/src/views/admin/account/realnameAuth/index.vue
index 4f88f6c..ed637e5 100644
--- a/src/views/admin/account/realnameAuth/index.vue
+++ b/src/views/admin/account/realnameAuth/index.vue
@@ -5,17 +5,42 @@
实名认证
请选择您的认证类型
-
-
+
认证审核中...
+
认证失败
+
+
+
+ {{ certificationInfo.certificationType }}
+
+
+
+
+
认证类型 {{ certificationInfo.certificationType }}
+
认证类型 {{ certificationInfo.idCard }}
+
认证人 {{ certificationInfo.name }}
+
+ 变更为企业认证
+
+
+
+
认证时间2025-11-18
+
身份证号放假就佛法家
+
+
+
+

+
+
+
+
-
+
个人认证
-
-
-
+
@@ -61,50 +85,11 @@
-
-
-
-
-
-
- ⚠️
- 您的实名认证信息将会加密保存,不会泄露给第三方
-
-
-
-
-
-
-
-
-
-
-
-