huk f1a2f287bf fix(video): 修改视频禁播功能描述及操作逻辑
- 将接口注释从"视频删除"更新为"视频禁播"
- 更新前端按钮文字从"删除"改为"禁播"- 修改操作函数名从 handleDelete 改为 handleForbid
- 调整确认弹窗提示文字内容
2025-09-30 10:04:33 +08:00

163 lines
3.4 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { CategoryForm, CategoryQuery, CategoryTreeVO, CategoryVO, Formaget, QueryParamOV } from '@/api/workflow/category/types';
import { AxiosPromise } from 'axios';
import request from '@/utils/request';
export interface QueryChildOV {
current: number;
size: number;
fatherCommentId: number | string;
}
/**
* 视频列表
* @param query
* @returns {*}
*/
export const listCategory = (query?: CategoryQuery): AxiosPromise<CategoryVO[]> => {
return request({
// url: '/workflow/category/list',old
url: '/cms/vlog/page',
method: 'post',
data: query
});
};
/**
* 视频通过和反驳
* @param vlogId 视频id
* @param reason 反驳理由
* @param status 状态1通过 2反驳
*/
export const updateaudit = (data?: Formaget) => {
return request({
url: `/cms/vlog/changeVlogStatus`,
method: 'post',
data: { vlogId: data.vlogId, status: data.status, reason: data.reason }
});
};
/**
* 视频评论列表
* @param vlogId 视频id
* @param mobile 手机号
*/
export const getcommentlist = (data?: QueryParamOV) => {
return request({
url: `/cms/comment/list`,
method: 'post',
data
});
};
/**
* 视频评论列表
// * @param vlogId 视频id
// * @param reason 反驳理由
// * @param status 状态1通过 2反驳
*/
export const getchildList = (data?: QueryChildOV) => {
return request({
url: `/cms/comment/childList?fatherCommentId=${data.fatherCommentId}&current=${data.current}&size=${data.size}`,
method: 'get'
});
};
/**
* 获取去视频详情
* @param vlogId 视频id
*/
export const gerdetail = (data?: string) => {
return request({
url: `/video/detail?fileId=${data}`,
method: 'get'
});
};
/**
* 删除评论
* @param data 评论id
*/
export const deldetail = (data?: string) => {
return request({
url: `/cms/comment/delete?commentId=${data}`,
method: 'post'
});
};
/**
* 上下架评论
* @param id 评论id
*/
export const deloffline = (data?: string) => {
return request({
url: `/cms/comment/offline?commentId=${data}`,
method: 'post'
});
};
/**
* 视频禁播
* @param vlogId 视频id
*/
export const updateaforbid = (vlogId?: string) => {
return request({
url: `/cms/video/forbid`,
method: 'post',
data: { fileIds: vlogId, operation: 'forbid' }
});
};
/**
* 查询流程分类详细
* @param categoryId
*/
export const getCategory = (categoryId: string | number): AxiosPromise<CategoryVO> => {
return request({
url: '/workflow/category/' + categoryId,
method: 'get'
});
};
/**
* 新增流程分类
* @param data
*/
export const addCategory = (data: CategoryForm) => {
return request({
url: '/workflow/category',
method: 'post',
data: data
});
};
/**
* 修改流程分类
* @param data
*/
export const updateCategory = (data: CategoryForm) => {
return request({
url: '/workflow/category',
method: 'put',
data: data
});
};
/**
* 删除流程分类
* @param categoryId
*/
export const delCategory = (categoryId: string | number | Array<string | number>) => {
return request({
url: '/workflow/category/' + categoryId,
method: 'delete'
});
};
/**
* 获取流程分类树列表
* @param query 流程实例id
* @returns
*/
export const categoryTree = (query?: CategoryForm): AxiosPromise<CategoryTreeVO[]> => {
return request({
url: `/workflow/category/categoryTree`,
method: 'get',
params: query
});
};