import http from '@/http/yskApi/http.js'
const request = http.request

/**
 * 获取打印机列表
 * @returns
 */
export function getPrinter(data, urlType = 'account') {
	return request({
		url: `/${urlType}/admin/printer`,
		method: "GET",
		data: {
			...data
		}
	})
}

/**
 * 获取打印机详情
 * @returns
 */
export function getPrinterDetail(data, urlType = 'account') {
	return request({
		url: `/${urlType}/admin/printer/detail`,
		method: "GET",
		data: {
			...data
		}
	})
}

/**
 * 添加打印机
 * @returns
 */
export function addPrinter(data, urlType = 'account') {
	return request({
		url: `/${urlType}/admin/printer`,
		method: "POST",
		data: {
			...data
		}
	})
}

/**
 * 修改打印机
 * @returns
 */
export function updatePrinter(data, urlType = 'account') {
	return request({
		url: `/${urlType}/admin/printer`,
		method: "PUT",
		data: {
			...data
		}
	})
}

/**
 * 删除打印机
 * @returns
 */
export function delPrinter(data, urlType = 'account') {
	return request({
		url: `/${urlType}/admin/printer`,
		method: "DELETE",
		data: {
			...data
		}
	})
}
