feat 接口联调

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
Ironsp
2026-05-25 08:34:17 +08:00
parent 0341cb07dc
commit 466230c2c0
4 changed files with 165 additions and 26 deletions

View File

@@ -0,0 +1,46 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { DemoVO, DemoForm, DemoQuery } from '@/api/demo/demo/types';
/**
* 查询首页logo
* /system/logo/get
*/
export const getDemo = () => {
return request({
url: '/system/logo/get',
method: 'get'
});
};
/**
* 上传图片
* /system/logo/upload
* @param file 文件对象
*/
export const uploadDemo = (file: File) => {
const formData = new FormData();
formData.append('file', file);
return request({
url: '/system/logo/upload',
method: 'post',
data: formData,
headers: {
'Content-Type': 'multipart/form-data'
}
});
};
/**
* 修改logo
* /system/logo/edit
* @param data
*/
export const updateDemo = (data: any) => {
return request({
url: '/system/logo/edit',
method: 'post',
data: data
});
};