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