init
This commit is contained in:
commit
1ab9f9c458
1319 files changed
+137505
No files matched your search
@@ -0,0 +1,71 @@
|
||||
/**
|
||||
* 通用API接口
|
||||
*/
|
||||
|
||||
import { get, post, uploadFile } from '@/utils/request.js';
|
||||
|
||||
/**
|
||||
* 获取轮播图列表
|
||||
*/
|
||||
export function getBannerListApi() {
|
||||
return get('/common/banner');
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取通知公告列表
|
||||
*/
|
||||
export function getNoticeListApi(params) {
|
||||
return get('/common/notice', params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取新闻列表
|
||||
*/
|
||||
export function getNewsListApi(params) {
|
||||
return get('/common/news', params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取字典数据
|
||||
*/
|
||||
export function getDictDataApi(dictType) {
|
||||
return get(`/common/dict/${dictType}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 文件上传
|
||||
*/
|
||||
export function uploadFileApi(filePath, options = {}) {
|
||||
return uploadFile('/common/upload', filePath, {
|
||||
name: 'file',
|
||||
...options,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取系统配置
|
||||
*/
|
||||
export function getConfigApi() {
|
||||
return get('/common/config');
|
||||
}
|
||||
|
||||
/**
|
||||
* 意见反馈
|
||||
*/
|
||||
export function feedbackApi(data) {
|
||||
return post('/common/feedback', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取版本信息
|
||||
*/
|
||||
export function getVersionApi() {
|
||||
return get('/common/version');
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查更新
|
||||
*/
|
||||
export function checkUpdateApi() {
|
||||
return get('/common/check-update');
|
||||
}
|
||||
Reference in new issue
Block a user