55 lines
1.5 KiB
TypeScript
55 lines
1.5 KiB
TypeScript
// Author: fruit.com.cn
|
|
|
|
import request from '@/axios'
|
|
import type { PageResult } from './types'
|
|
|
|
/** 收藏与点赞只读分页筛选条件。 */
|
|
export interface EngagementPageParams {
|
|
pageIndex?: number
|
|
pageSize?: number
|
|
keyword?: string
|
|
userId?: string | number
|
|
deviceId?: string
|
|
dramaId?: string | number
|
|
dramaTitle?: string
|
|
targetType?: string
|
|
targetId?: string | number
|
|
episodeId?: string | number
|
|
startTime?: string
|
|
endTime?: string
|
|
}
|
|
|
|
/** 后台互动列表行。 */
|
|
export interface EngagementItem {
|
|
id: string
|
|
userId: string | null
|
|
uid: string | null
|
|
nickname: string | null
|
|
deviceId: string | null
|
|
/** 客户端系统,来自设备画像;老客户端未上报时为空。 */
|
|
platform: string | null
|
|
osVersion: string | null
|
|
deviceModel: string | null
|
|
anonymous: boolean
|
|
dramaId: string | null
|
|
dramaTitle: string | null
|
|
dramaCover: string | null
|
|
dramaStatus: string | null
|
|
dramaPublished: boolean | null
|
|
targetType: string
|
|
targetId: string
|
|
episodeId: string | null
|
|
episodeNo: number | null
|
|
episodeTitle: string | null
|
|
commentSummary: string | null
|
|
createdAt: string
|
|
}
|
|
|
|
/** 查询收藏分页。 */
|
|
export const pageFavoritesApi = (params: EngagementPageParams) =>
|
|
request.get<PageResult<EngagementItem>>({ url: '/admin/favorites/page', params })
|
|
|
|
/** 查询点赞分页。 */
|
|
export const pageLikesApi = (params: EngagementPageParams) =>
|
|
request.get<PageResult<EngagementItem>>({ url: '/admin/likes/page', params })
|