chore: 基线提交(重构前代码快照)
- git 初始化 + .gitignore 补全(根 .env / logs / instance / __pycache__ 等) - 修复 utils/.gitignore 误将整个 utils/ 源码层忽略的问题,补入全部工具源码(含 ip2region.xdb) - 含后端全部代码:application / extensions / utils / config / migrations - 含前端 ui/(后续整体迁走) - 不含根 .env(含密钥,本地保留) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,83 @@
|
||||
import { http } from '@/utils/http/axios';
|
||||
|
||||
/**
|
||||
* @description: 文章管理分页列表
|
||||
*/
|
||||
export function getArticlePage(params?) {
|
||||
return http.request({
|
||||
url: '/article/page',
|
||||
method: 'GET',
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取全部文章管理列表
|
||||
* @param params 参数
|
||||
* @returns 返回结果
|
||||
*/
|
||||
export function getArticleList(params?) {
|
||||
return http.request({
|
||||
url: '/article/list',
|
||||
method: 'GET',
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 根据ID获取文章管理详情
|
||||
* @param id 文章管理ID
|
||||
*/
|
||||
export function getArticleDetail(id) {
|
||||
return http.request({
|
||||
url: '/article/detail/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 添加文章管理
|
||||
* @param data 文章管理数据
|
||||
*/
|
||||
export function articleAdd(data: any) {
|
||||
return http.request({
|
||||
url: '/article/add',
|
||||
method: 'POST',
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 更新文章管理
|
||||
* @param data 文章管理数据
|
||||
*/
|
||||
export function articleUpdate(data: any) {
|
||||
return http.request({
|
||||
url: '/article/update',
|
||||
method: 'PUT',
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 删除文章管理
|
||||
* @param id 文章管理ID
|
||||
*/
|
||||
export function articleDelete(id) {
|
||||
return http.request({
|
||||
url: '/article/delete/' + id,
|
||||
method: 'DELETE',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 批量删除文章管理
|
||||
* @param data 文章管理ID数组
|
||||
*/
|
||||
export function articleBatchDelete(data: any) {
|
||||
return http.request({
|
||||
url: '/article/batchDelete',
|
||||
method: 'DELETE',
|
||||
data,
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
import { http } from '@/utils/http/axios';
|
||||
|
||||
/**
|
||||
* @description: 文章分类分页列表
|
||||
*/
|
||||
export function getCategoryPage(params?) {
|
||||
return http.request({
|
||||
url: '/category/page',
|
||||
method: 'GET',
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取全部文章分类列表
|
||||
* @param params 参数
|
||||
* @returns 返回结果
|
||||
*/
|
||||
export function getCategoryList(params?) {
|
||||
return http.request({
|
||||
url: '/category/list',
|
||||
method: 'GET',
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 根据ID获取文章分类详情
|
||||
* @param id 文章分类ID
|
||||
*/
|
||||
export function getCategoryDetail(id) {
|
||||
return http.request({
|
||||
url: '/category/detail/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 添加文章分类
|
||||
* @param data 文章分类数据
|
||||
*/
|
||||
export function categoryAdd(data: any) {
|
||||
return http.request({
|
||||
url: '/category/add',
|
||||
method: 'POST',
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 更新文章分类
|
||||
* @param data 文章分类数据
|
||||
*/
|
||||
export function categoryUpdate(data: any) {
|
||||
return http.request({
|
||||
url: '/category/update',
|
||||
method: 'PUT',
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 删除文章分类
|
||||
* @param id 文章分类ID
|
||||
*/
|
||||
export function categoryDelete(id) {
|
||||
return http.request({
|
||||
url: '/category/delete/' + id,
|
||||
method: 'DELETE',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 批量删除文章分类
|
||||
* @param data 文章分类ID数组
|
||||
*/
|
||||
export function categoryBatchDelete(data: any) {
|
||||
return http.request({
|
||||
url: '/category/batchDelete',
|
||||
method: 'DELETE',
|
||||
data,
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
import { http } from '@/utils/http/axios';
|
||||
|
||||
/**
|
||||
* @description: 列表
|
||||
*/
|
||||
export function getLinkList(params?) {
|
||||
return http.request({
|
||||
url: '/link/page',
|
||||
method: 'GET',
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 根据ID获取详情
|
||||
*/
|
||||
export function getLinkDetail(linkId) {
|
||||
return http.request({
|
||||
url: '/link/detail/' + linkId,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 添加
|
||||
*/
|
||||
export function linkAdd(data: any) {
|
||||
return http.request({
|
||||
url: '/link/add',
|
||||
method: 'POST',
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 更新
|
||||
*/
|
||||
export function linkUpdate(data: any) {
|
||||
return http.request({
|
||||
url: '/link/update',
|
||||
method: 'PUT',
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 删除
|
||||
*/
|
||||
export function linkDelete(linkId) {
|
||||
return http.request({
|
||||
url: '/link/delete/' + linkId,
|
||||
method: 'DELETE',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 批量删除
|
||||
*/
|
||||
export function linkBatchDelete(data: any) {
|
||||
return http.request({
|
||||
url: '/link/batchDelete',
|
||||
method: 'DELETE',
|
||||
data,
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user