文件上传组件

This commit is contained in:
田岩
2025-06-25 14:19:51 +08:00
parent c8c4e3285a
commit 49e51eabe3
19 changed files with 92 additions and 4 deletions
+2 -2
View File
@@ -7,7 +7,7 @@ import {
export const uploadFile = (file, data) => {
const url = '/plimg/fileUpload/stuMgrUploadImg';
const url = '/traoss/tras3/upload';
const base_url = get_base_url(url);
const token = getToken();
const header = {};
@@ -16,7 +16,7 @@ export const uploadFile = (file, data) => {
return new Promise((resolve, reject) => {
uni.uploadFile({
url: `${base_url}${url}`,
header: header,
header: header,
filePath: file,
name: 'file',
formData: data,