// 上传请求
import { otherHttp } from '/@/utils/http/axios'

enum Api {
    list = '/video/list',
    detail = '/video/detail',
    viewCount = '/video/viewCount',
}

/**
 * @description: 获取列表
 */
export function getList(params) {
    return otherHttp.get({ url: Api.list, params })
}

/**
 * @description: 获取详情
 */
export function getDetail(params) {
    return otherHttp.get({ url: Api.detail, params })
}

/**
 * @description: 记录浏览次数
 */
export function addViewCount(params) {
    return otherHttp.post({
        url: Api.viewCount,
        params,
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded',
        },
    })
}
