整体平台上传功能大改造
This commit is contained in:
@@ -24,7 +24,8 @@
|
||||
<el-form-item label="资质图片" prop="file_url">
|
||||
<el-upload
|
||||
class="avatar-uploader"
|
||||
action="/api/platform/common/upload"
|
||||
:action="uploadAction"
|
||||
:headers="uploadHeaders"
|
||||
:show-file-list="false"
|
||||
:on-success="handleUploadSuccess"
|
||||
:before-upload="beforeAvatarUpload"
|
||||
@@ -70,7 +71,13 @@
|
||||
const submitting = ref(false);
|
||||
const tenantName = ref('');
|
||||
const formRef = ref();
|
||||
|
||||
|
||||
// 上传地址:走平台端通用上传接口(原 /api/platform/common/upload 后端不存在,会 404)
|
||||
const uploadAction = import.meta.env.VITE_API_BASE_URL + '/platform/uploadfile';
|
||||
const uploadHeaders = {
|
||||
Authorization: 'Bearer ' + (localStorage.getItem('token') || '')
|
||||
};
|
||||
|
||||
const formData = reactive({
|
||||
tid: null,
|
||||
type: '',
|
||||
|
||||
Reference in New Issue
Block a user