Files
management/src/api/devices.js
2024-10-11 14:51:27 +08:00

72 lines
1.4 KiB
JavaScript

import request from '@/utils/request'
/**
* @returns
*/
export function tbPrintMachine(data, method = 'post') {
return request({
url: '/api/tbPrintMachine',
method: method,
data: {
shopId: localStorage.getItem('shopId'),
...data
}
})
}
// 打印机切换
export function switchtbPrintMachine(data, method = 'post') {
return request({
url: '/api/shop-config/printer/update-status',
method: method,
data: {
shopId: localStorage.getItem('shopId'),
...data
}
})
}
// 打印机部分
export function tbShopCategory(params) {
return request({
url: '/api/tbShopCategory',
method: 'get',
params
})
}
/**
* 打印机列表
* @returns
*/
export function tbPrintMachineGet(params) {
return request({
url: '/api/shop-config/printer/list',
method: 'get',
params: {
...params
}
})
}
// 删除
export function delTableHandle(id) {
return request({
url: '/api/shop-config/printer/' + id,
method: 'DELETE',
})
}
// * 打印机详情
export function printerd(id) {
return request({
url: '/api/shop-config/printer/' + id,
method: 'get',
})
}
// 编辑 新增打印机
export function configprinter(data, method = "post") {
return request({
url: `/api/shop-config/printer`,
method: method,
data
});
}