/*
 * @Autor: Chutingting
 * @Date: 2023-11-11 19:15:01
 * @LastEditors: Chutingting
 * @LastEditTime: 2023-11-13 10:28:20
 * @Description: 
 */
import request from "@/utils/request.js";
/**
 * @description:用户角色
 * @param 
 * @return: 
 */
export function getUser() {
  return request({
    url: `/user/getUser`,
    method: 'get',
  })
}

/**
 * @description:用户角色
 * @param 
 * @return: 
 */
export function localDeployApi() {
  return request({
    url: `/localDeploy`,
    method: 'get',
  })
}


/**
 * @description: api 剩余时长
 * @param 
 * @return: 
 */
export function current() {
  return request({
    url: `/serviceInfo/current`,
    method: 'get',
  })
}

/**
 * @description: 私有化 剩余时长
 * @param 
 * @return: 
 */
export function privateDeployAdminCurrent() {
  return request({
    url: `/serviceInfo/privateDeployAdminCurrent`,
    method: 'get',
  })
}

/**
 * @description: 视频制作统计
 * @param 
 * @return: 
 */
export function videoListApi(pageNum, pageSize) {
  let api = localStorage.getItem("isAdmin") === '0' ? '/serviceInfo/currentVideoRecords' : '/serviceInfo/privateDeployAdminCurrentVideoRecords'
  return request({
    url: `${api}?pageNum=${pageNum}&pageSize=${pageSize}`,
    method: 'get',
  })
}

/**
 * @description: 已消耗总时长
 * @param 
 * @return: 
 */
export function currentVideoToalApi(pageNum) {
  let api = localStorage.getItem("isAdmin") === '0' ? '/serviceInfo/currentVideoToal' : '/serviceInfo/privateDeployAdminCurrentVideoTotal'
  return request({
    url: `${api}`,
    method: 'get',
  })
}

