无人机管理后台前端(已迁走)
张含笑
2025-08-05 c832bf2e80ac465e71b7a1c1f7a59d4252030989
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
        },
    });
}