main #2

Merged
jingrow merged 250 commits from main into v1 2026-01-13 22:45:50 +08:00
2 changed files with 56 additions and 20 deletions
Showing only changes of commit d863ade893 - Show all commits

View File

@ -42,9 +42,6 @@
@click="showUploadRealName"
class="inline-flex items-center px-3 py-1.5 text-sm font-medium text-white bg-gradient-to-r from-blue-600 to-blue-700 hover:from-blue-700 hover:to-blue-800 rounded-lg transition-all duration-200 shadow-sm hover:shadow-md"
>
<svg class="mr-1.5 h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"></path>
</svg>
上传实名资料
</button>
</div>

View File

@ -25,7 +25,7 @@
<div>
<label class="block text-sm font-medium text-gray-700 mb-2">域名所有者</label>
<div class="text-sm text-gray-900">
(个人) 旷蓓娟
{{ ownerType ? `(${ownerType === 'I' ? '个人' : '企业'})` : '' }} {{ domainDoc?.owner_name || '未知' }}
</div>
</div>
@ -37,15 +37,13 @@
v-model="formData.idType"
class="px-3 py-1.5 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white text-sm"
>
<option value="SFZ">身份证</option>
<option value="HZ">护照</option>
<option value="GAJMTX">港澳居民来往内地通行证</option>
<option value="TWJMTX">台湾居民来往大陆通行证</option>
<option value="WJLSFZ">外国人永久居留身份证</option>
<option value="GAJZZ">港澳台居民居住证</option>
<option value="ORG">组织机构代码证</option>
<option value="YYZZ">工商营业执照</option>
<option value="TYDM">统一社会信用代码证书</option>
<option
v-for="option in idTypeOptions"
:key="option.value"
:value="option.value"
>
{{ option.label }}
</option>
</select>
<input
type="text"
@ -131,7 +129,7 @@
<button
type="button"
class="px-4 py-2 border border-gray-300 rounded-md text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none"
@click="$emit('close')"
@click="show = false"
>
重置
</button>
@ -159,15 +157,17 @@ export default {
},
props: {
domain: String,
domainDoc: Object
domainDoc: Object,
onSuccess: Function
},
emits: ['success', 'close'],
data() {
return {
show: true,
loading: false,
ownerType: null, //
formData: {
idType: 'SFZ',
idType: '',
idNumber: ''
},
uploadedFiles: []
@ -175,7 +175,32 @@ export default {
},
computed: {
isValid() {
return this.formData.idNumber.trim() && this.uploadedFiles.length > 0;
return this.formData.idNumber.trim() && this.formData.idType && this.uploadedFiles.length > 0;
},
idTypeOptions() {
if (!this.ownerType) {
//
return [];
}
if (this.ownerType === 'I') {
//
return [
{ value: 'SFZ', label: '身份证' },
{ value: 'HZ', label: '护照' },
{ value: 'GAJMTX', label: '港澳居民来往内地通行证' },
{ value: 'TWJMTX', label: '台湾居民来往大陆通行证' },
{ value: 'WJLSFZ', label: '外国人永久居留身份证' },
{ value: 'GAJZZ', label: '港澳台居民居住证' }
];
} else {
//
return [
{ value: 'ORG', label: '组织机构代码证' },
{ value: 'YYZZ', label: '工商营业执照' },
{ value: 'TYDM', label: '统一社会信用代码证书' }
];
}
}
},
resources: {
@ -281,9 +306,12 @@ export default {
// Jingrow {message: {...}}
if (response && response.message && response.message.status === "success") {
// toast
this.$emit('success');
this.$emit('close');
//
if (this.onSuccess) {
this.onSuccess();
}
//
this.show = false;
} else {
const errorMessage = response?.message?.message || response?.message || '上传失败,请重试';
console.error('上传失败:', errorMessage);
@ -323,6 +351,11 @@ export default {
return false;
}
if (!this.formData.idType) {
alert('请选择证件类型');
return false;
}
if (this.uploadedFiles.length === 0) {
alert('请上传证件材料');
return false;
@ -339,6 +372,9 @@ export default {
if (response && response.status === 'Success' && response.data) {
const owner = response.data;
//
this.ownerType = owner.c_regtype;
//
if (owner.c_idnum_gswl) {
this.formData.idNumber = owner.c_idnum_gswl;
@ -346,6 +382,9 @@ export default {
//
if (owner.c_idtype_gswl) {
this.formData.idType = owner.c_idtype_gswl;
} else if (this.ownerType) {
//
this.formData.idType = this.ownerType === 'I' ? 'SFZ' : 'ORG';
}
}
}