import request from '@/utils/request'
// 重启设备
export function deviceInfo(query) {
	return request({
		url: '/database_op/boxInfo_post.cgi',
		method: 'post',
		data:  {
			"cmdType": "info"
		}
	})
}
// 重启设备
export function deviceRestart(query) {
	return request({
		url: '/database_op/cmd_post.cgi',
		method: 'post',
		data:  {
			"cmdType": "start"
		}
	})
}

// 关闭设备
export function deviceClose(query) {
	return request({
		url: '/database_op/cmd_post.cgi',
		method: 'post',
		data:  {
			"cmdType": "shutdown"
		}
	})
}
// 下载日志
export function deviceLog(query) {
	return request({
		url: '/database_op/cmd_post.cgi',
		method: 'post',
		data:  {
			"cmdType": "log"
		}
	})
}
// 下载历史日志
export function deviceHisLog(query) {
	return request({
		url: '/database_op/cmd_post.cgi',
		method: 'post',
		data:  {
			"cmdType": "log_all"
		}
	})
}
// 下载历史日志
export function updateBack(query) {
	return request({
		url: '/database_op/cmd_post.cgi',
		method: 'post',
		data:  {
			"cmdType": "upgrade_pack"
		}
	})
}
// 设置网络信息
export function setNetWork(query) {
	return request({
		url: '/database_op/cmd_post.cgi',
		method: 'post',
		data:  {
			"cmdType": "network_set",
			"cmdParam": query
		}
	})
}
// 获取网络信息
export function getNetWork(query) {
	return request({
		url: '/database_op/cmd_post.cgi',
		method: 'post',
		data:  {
			"cmdType": "network"
		}
	})
}
// 设置设备信息
export function setDeviceInfo(query) {
	return request({
		url: '/database_op/boxInfo_post.cgi',
		method: 'post',
		data:  {
			"cmdType": "info_set",
			"cmdParam": query
		}
	})
}
// 获取网络信息
export function getFrps(query) {
	return request({
		url: '/database_op/cmd_post.cgi',
		method: 'post',
		data:  {
			"cmdType": "frps"
		}
	})
}
// 设置设备信息
export function setFrps(query) {
	return request({
		url: '/database_op/cmd_post.cgi',
		method: 'post',
		data:  {
			"cmdType": "frps_set",
			"cmdParam": query
		}
	})
}
// 网络诊断  pingIP
export function pingNetWork(query) {
	return request({
		url: '/database_op/network_diagnostics_post.cgi',
		method: 'post',
		data:  {
			"cmdType": "check_ip",
			"cmdParam": query
		}
	})
}
// 视频流诊断  pingRTSP
export function pingRTSP(query) {
	return request({
		url: '/database_op/network_diagnostics_post.cgi',
		method: 'post',
		data:  {
			"cmdType": "check_rtsp",
			"cmdParam": query
		}
	})
}
// 获取NTP时间配置信息  
export function getNtpTime(query) {
	return request({
		url: '/database_op/cmd_post.cgi',
		method: 'post',
		data:  {
			"cmdType": "ntp"
		}
	})
}
// NTP时间配置  
export function setNtpTime(query) {
	return request({
		url: '/database_op/cmd_post.cgi',
		method: 'post',
		data:  {
			"cmdType": "ntp_set",
			"cmdParam": query
		}
	})
}
// 获取图片质量置信息  
export function getPictureConfig(query) {
	return request({
		url: '/database_op/cmd_post.cgi',
		method: 'post',
		data:  {
			"cmdType": "coding"
		}
	})
}
// 图片质量置
export function setPictureConfig(query) {
	return request({
		url: '/database_op/cmd_post.cgi',
		method: 'post',
		data:  {
			"cmdType": "coding_set",
			"cmdParam": query
		}
	})
}