打印机部分类型

This commit is contained in:
duan
2024-10-11 18:25:37 +08:00
parent 82ad5973fb
commit b8e694abb9
4 changed files with 143 additions and 68 deletions

View File

@@ -1,19 +1,19 @@
import http from './http.js'
const request=http.request
const request = http.request
/**
* 增加打印机
* @returns
*/
export function tbPrintMachine(data, method = 'post') {
return request({
url: '/api/shop-config/printer',
method: method,
data: {
shopId: uni.getStorageSync('shopId'),
...data
}
})
return request({
url: '/api/shop-config/printer',
method: method,
data: {
shopId: uni.getStorageSync('shopId'),
...data
}
})
}
/**
@@ -21,37 +21,46 @@ export function tbPrintMachine(data, method = 'post') {
* @returns
*/
export function tbPrintMachineGet(params) {
return request({
url: '/api/shop-config/printer/list',
method: 'get',
params: {
shopId: uni.getStorageSync('shopId'),
sort: '',
...params
}
})
return request({
url: '/api/shop-config/printer/list',
method: 'get',
params: {
shopId: uni.getStorageSync('shopId'),
sort: '',
...params
}
})
}
// 打印机部分
export function tbShopCategoryget(params) {
return request({
url: '/api/tbShopCategory',
method: 'get',
params
})
}
// 修改打印机状态
export function shopConfigprinter(data) {
return request({
url: '/api/shop-config/printer/update-status',
method: 'post',
data
})
return request({
url: '/api/shop-config/printer/update-status',
method: 'post',
data
})
}
// * 打印机详情
export function printerd(id) {
return request({
url: '/api/shop-config/printer/' + id,
method: 'get',
return request({
url: '/api/shop-config/printer/' + id,
method: 'get',
})
})
}
// 删除
export function delTableHandle(id) {
return request({
url: '/api/shop-config/printer/' + id,
method: 'DELETE',
})
}
return request({
url: '/api/shop-config/printer/' + id,
method: 'DELETE',
})
}