/*
 * @Author: zc
 * @Description: 时限管理
 * @version:
 * @Date: 2022-08-09 16:19:55
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2022-11-15 10:21:44
 */
import request from '/@/utils/request';
/**
 * @description: 时限管理列表
 * @param {object} params
 * @return {*}
 */
export const timelimitPaged = (params: object) => {
	return request({
		url: '/api/v1/Hotspot/paged-timelimit',
		method: 'get',
		params: params,
	});
};
/**
 * @description: 获取时限配置页面基础数据
 * @param {object} params
 * @return {*}
 */
export const baseData = (params?: object) => {
	return request({
		url: '/api/v1/Hotspot/timelimit-basedata',
		method: 'get',
		params: params,
	});
};
/**
 * @description: 新增时限管理
 * @param {object} data
 * @return {*}
 */
export const timelimitAdd = (data: object) => {
	return request({
		url: '/api/v1/Hotspot/add-timelimit',
		method: 'post',
        data
	});
};
/**
 * @description: 修改时限管理
 * @param {object} data
 * @return {*}
 */
export const timelimitUpdate = (data: object) => {
	return request({
		url: '/api/v1/Hotspot/update-timelimit',
		method: 'post',
        data
	});
};
/**
 * @description: 获取时限对象
 * @param {string} id
 * @return {*}
 */
export const timelimitDetail = (id: string) => {
	return request({
		url: `/api/v1/Hotspot/timelimit/${id}`,
		method: 'get'
	});
};
/**
 * @description: 删除时限（草稿）
 * @param {string} id
 * @return {*}
 */
export const timelimitDelete = (id: string) => {
	return request({
		url: `/api/v1/Hotspot/deltimelimit?id=${id}`,
		method: 'delete'
	});
};
/**
 * @description: 
 * @param {string} id 启用时限
 * @return {*}
 */
export const timelimitEnable = (id: string) => {
	return request({
		url: `/api/v1/Hotspot/enable-timelimit/${id}`,
		method: 'get'
	});
};
/**
 * @description: 
 * @param {string} id 禁用时限
 * @return {*}
 */
export const timelimitDisable = (id: string) => {
	return request({
		url: `/api/v1/Hotspot/disable-timelimit/${id}`,
		method: 'get'
	});
};