吉安感知网项目-前端
罗广辉
2026-01-26 beb95fb5fc166804056abafd70fc01ac27de7621
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
        },
    });
}