Commit a9a722c0 by lijiabin

【需求 17679】 wip: 加入接口、常量、页面路由等

parent 5d0b8441
...@@ -145,3 +145,40 @@ export const addOrCancelCommentLike = (commentId: number | string) => { ...@@ -145,3 +145,40 @@ export const addOrCancelCommentLike = (commentId: number | string) => {
method: 'POST', method: 'POST',
}) })
} }
/**
* 修改文章的是否推荐/置顶字段
*/
export const updateArticleRecommend = (articleId: number) => {
return service.request({
url: `/api/cultureArticle/isRecommend?articleId=${articleId}`,
method: 'POST',
data: {},
})
}
/**
* 删除文章接口
*/
export const deleteArticle = (id: number) => {
return service.request({
url: `/api/personalCenter/deleteArticle`,
method: 'POST',
data: {
id,
},
})
}
/**
* 删除评论接口
*/
export const deleteComment = (commentId: number) => {
return service.request({
url: `/api/cultureComment/deleteComment`,
method: 'POST',
data: {
commentId,
},
})
}
...@@ -7,6 +7,7 @@ import type { PageSearchParams } from '@/utils/request/types' ...@@ -7,6 +7,7 @@ import type { PageSearchParams } from '@/utils/request/types'
export interface ArticleSearchParams extends PageSearchParams { export interface ArticleSearchParams extends PageSearchParams {
type?: ArticleTypeEnum type?: ArticleTypeEnum
sortLogic?: number sortLogic?: number
title?: string
} }
/** /**
...@@ -16,20 +17,21 @@ export type AddOrUpdateArticleDto = ...@@ -16,20 +17,21 @@ export type AddOrUpdateArticleDto =
| AddOrUpdatePostDto | AddOrUpdatePostDto
| AddOrUpdateColumnDto | AddOrUpdateColumnDto
| AddOrUpdateInterviewDto | AddOrUpdateInterviewDto
| AddOrUpdateVideoDto
/** /**
* 添加帖子的DTO * 添加帖子的DTO
*/ */
export interface AddOrUpdatePostDto { export interface AddOrUpdatePostDto {
id?: number id?: number
title: string title?: string
content: string content?: string
releaseStatus: ReleaseStatusTypeEnum releaseStatus?: ReleaseStatusTypeEnum
sendType: SendTypeEnum sendType?: SendTypeEnum
faceUrl?: string faceUrl?: string
imgUrl?: string imgUrl?: string
sendTime?: string sendTime?: string
type: ArticleTypeEnum.POST type?: ArticleTypeEnum.POST
} }
interface AddOrUpdateColumnBase { interface AddOrUpdateColumnBase {
...@@ -90,6 +92,23 @@ export interface AddOrUpdateInterviewDto extends AddOrUpdateInterviewBase { ...@@ -90,6 +92,23 @@ export interface AddOrUpdateInterviewDto extends AddOrUpdateInterviewBase {
tagList: { tagId: number; sort: number }[] tagList: { tagId: number; sort: number }[]
} }
export interface AddOrUpdateVideoDto {
id?: number
title: string
type: ArticleTypeEnum.VIDEO
content: string
videoUrl: string
videoDuration: string
releaseStatus: ReleaseStatusTypeEnum
sendType: SendTypeEnum
faceUrl?: string
imgUrl?: string
sendTime?: string
isRecommend?: BooleanFlag
mainTagId: string | number
tagList: { tagId: number; sort: number }[] | number[]
}
/** /**
* 添加专访的DTO * 添加专访的DTO
*/ */
...@@ -123,6 +142,7 @@ export interface ArticleItemDto { ...@@ -123,6 +142,7 @@ export interface ArticleItemDto {
createUserName: string createUserName: string
showAvatar: string showAvatar: string
showName: string showName: string
videoDuration: string
} }
/** /**
......
import service from '@/utils/request/index'
import type { AddOrUpdateTagDto, BackendTagListItemDto, BackendTagSearchParams } from './types'
import type { BackendServicePageResult } from '@/utils/request/types'
// 后台管理案例库相关接口
/**
* 案例库后台列表
*/
export const getCaseList = (data: PageSearchParams) => {
return service.request<BackendServicePageResult<BackendTagListItemDto>>({
url: '/api/cultureCase/caseAuditByPage',
method: 'POST',
data,
})
}
/**
* 添加轮播图
*/
export const addCarousel = (data: AddOrUpdateCarouselDto) => {
return service.request({
url: '/api/cultureCarousel/addCarousel',
method: 'POST',
data,
})
}
/**
* 审核接口
*/
export const auditCase = (data: AddOrUpdateCarouselDto) => {
return service.request({
url: '/api/cultureCase/auditCase',
method: 'POST',
data,
})
}
/**
* 删除案例库
*/
export const deleteCase = (id: number) => {
return service.request({
url: `/api/cultureCase/deleteCase?id=${id}`,
method: 'POST',
})
}
...@@ -2,8 +2,12 @@ ...@@ -2,8 +2,12 @@
export * from './tags' export * from './tags'
export * from './carousel' export * from './carousel'
export * from './columnSettings' export * from './columnSettings'
export * from './case'
export * from './shop'
// 类型 // 类型
export * from './tags/types' export * from './tags/types'
export * from './carousel/types' export * from './carousel/types'
export * from './columnSettings/types' export * from './columnSettings/types'
export * from './case/types'
export * from './shop/types'
import service from '@/utils/request/index'
import type { AddOrUpdateTagDto, BackendTagListItemDto, BackendTagSearchParams } from './types'
import type { BackendServicePageResult } from '@/utils/request/types'
// 后台管理 积分商城相关接口
/**
* 商品领用列表
*/
export const getExchangeList = (params: BackendTagSearchParams) => {
return service.request<BackendServicePageResult<BackendTagListItemDto>>({
url: '/api/culture/shop/order/exchangeList',
method: 'POST',
data: params,
})
}
import type { PageSearchParams } from '@/utils/request/types'
export interface BackendTagSearchParams extends PageSearchParams {
title: string
type: string
}
export interface AddOrUpdateTagDto {
id?: number
color: string
description: string
title: string
type: string
}
export interface BackendTagListItemDto {
color: string
createId: number
createTime: number
description: string
id: number
imgUrl: string
style: number
title: string
type: string
}
/** /**
* 添加或更新案例库DTO * 添加或更新案例库DTO
*/ */
import { TagTypeEnum, TagLevelEnum } from '@/constants' import { TagTypeEnum, TagLevelEnum, BooleanFlag, ReleaseStatusTypeEnum } from '@/constants'
export type TagItemDto = { export type TagItemDto = {
tagId: number tagId: number
...@@ -10,8 +10,10 @@ export type TagItemDto = { ...@@ -10,8 +10,10 @@ export type TagItemDto = {
} }
export interface AddOrUpdateCaseDto { export interface AddOrUpdateCaseDto {
id?: number
content: string content: string
title: string title: string
tagRelationDtoList: TagItemDto[] tagRelationDtoList: TagItemDto[]
number: string isSync: BooleanFlag
releaseStatus: ReleaseStatusTypeEnum
} }
...@@ -33,7 +33,7 @@ export const regionListOptions = [ ...@@ -33,7 +33,7 @@ export const regionListOptions = [
] ]
// 文章类型列表 // 文章类型列表
export const articleTypeListOptions = [ export const articleTypeListOptions: { label: string; value: ArticleTypeEnum }[] = [
{ {
label: '帖子', label: '帖子',
value: ArticleTypeEnum.POST, value: ArticleTypeEnum.POST,
......
...@@ -144,6 +144,30 @@ const routes = [ ...@@ -144,6 +144,30 @@ const routes = [
component: () => import('@/views/backend/interviewSettings/index.vue'), component: () => import('@/views/backend/interviewSettings/index.vue'),
meta: { title: '专访——栏目管理' }, meta: { title: '专访——栏目管理' },
}, },
{
path: 'videoManage',
name: 'VideoManageManagement',
component: () => import('@/views/backend/videoManage/index.vue'),
meta: { title: '视频管理' },
},
{
path: 'caseManage',
name: 'CaseManageManagement',
component: () => import('@/views/backend/caseManage/index.vue'),
meta: { title: 'YAYA案例库管理' },
},
{
path: 'goodsManage',
name: 'GoodsManageManagement',
component: () => import('@/views/backend/goodsManage/index.vue'),
meta: { title: '积分商城——商品配置' },
},
{
path: 'goodsDistribution',
name: 'GoodsDistributionManagement',
component: () => import('@/views/backend/goodsDistribution/index.vue'),
meta: { title: '积分商城——商品分发' },
},
], ],
}, },
] ]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment