无人机管理后台前端(已迁走)
罗广辉
2025-10-11 02409bfbe15f22fc3b5dccadabfd860a660a49d9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import axios from 'axios';
 
/**
 * 上传 License 文件
 * @param {File} file 要上传的文件
 * @returns {Promise} 返回上传结果
 */
export function uploadLicense(file) {
    const formData = new FormData();
    formData.append('file', file);
 
    return axios.post('/api/blade-system/license/uploadLicense', formData, {
        headers: {
            'Content-Type': 'multipart/form-data',
            Authorization: `Bearer ${localStorage.getItem('token')}`, // 替换为实际的认证 token
        },
    });
}