84 lines
1.5 KiB
TypeScript
84 lines
1.5 KiB
TypeScript
import { http } from '@/utils/http/axios';
|
|
|
|
/**
|
|
* @description: 案例演示分页列表
|
|
*/
|
|
export function getExamplePage(params?) {
|
|
return http.request({
|
|
url: '/example/page',
|
|
method: 'GET',
|
|
params,
|
|
});
|
|
}
|
|
|
|
/**
|
|
* 获取全部案例演示列表
|
|
* @param params 参数
|
|
* @returns 返回结果
|
|
*/
|
|
export function getExampleList(params?) {
|
|
return http.request({
|
|
url: '/example/list',
|
|
method: 'GET',
|
|
params,
|
|
});
|
|
}
|
|
|
|
/**
|
|
* @description: 根据ID获取案例演示详情
|
|
* @param id 案例演示ID
|
|
*/
|
|
export function getExampleDetail(id) {
|
|
return http.request({
|
|
url: '/example/detail/' + id,
|
|
method: 'get',
|
|
});
|
|
}
|
|
|
|
/**
|
|
* @description: 添加案例演示
|
|
* @param data 案例演示数据
|
|
*/
|
|
export function exampleAdd(data: any) {
|
|
return http.request({
|
|
url: '/example/add',
|
|
method: 'POST',
|
|
data,
|
|
});
|
|
}
|
|
|
|
/**
|
|
* @description: 更新案例演示
|
|
* @param data 案例演示数据
|
|
*/
|
|
export function exampleUpdate(data: any) {
|
|
return http.request({
|
|
url: '/example/update',
|
|
method: 'PUT',
|
|
data,
|
|
});
|
|
}
|
|
|
|
/**
|
|
* @description: 删除案例演示
|
|
* @param id 案例演示ID
|
|
*/
|
|
export function exampleDelete(id) {
|
|
return http.request({
|
|
url: '/example/delete/' + id,
|
|
method: 'DELETE',
|
|
});
|
|
}
|
|
|
|
/**
|
|
* @description: 批量删除案例演示
|
|
* @param data 案例演示ID数组
|
|
*/
|
|
export function exampleBatchDelete(data: any) {
|
|
return http.request({
|
|
url: '/example/batchDelete',
|
|
method: 'DELETE',
|
|
data,
|
|
});
|
|
}
|