This commit is contained in:
zlwu committed 2025-06-26 18:30:03 +08:00
commit 1ab9f9c458
1319 files changed
+137505

No files matched your search

+61
View File
@@ -0,0 +1,61 @@
/**
* 认证相关API
*/
import { post, get } from '@/utils/request.js';
/**
* 用户登录
*/
export function loginApi(data) {
return post('/auth/login', data);
}
/**
* 用户退出
*/
export function logoutApi() {
return post('/auth/logout');
}
/**
* 获取用户信息
*/
export function getUserInfoApi() {
return get('/auth/userinfo');
}
/**
* 刷新Token
*/
export function refreshTokenApi(refreshToken) {
return post('/auth/refresh', { refreshToken });
}
/**
* 修改密码
*/
export function changePasswordApi(data) {
return post('/auth/change-password', data);
}
/**
* 重置密码
*/
export function resetPasswordApi(data) {
return post('/auth/reset-password', data);
}
/**
* 发送验证码
*/
export function sendCodeApi(data) {
return post('/auth/send-code', data);
}
/**
* 绑定手机号
*/
export function bindPhoneApi(data) {
return post('/auth/bind-phone', data);
}
+71
View File
@@ -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');
}