2025-04-03 09:03:47 +08:00
|
|
|
import { request } from '@/http/axios'
|
|
|
|
import type { CabinetDetailResponse } from './type'
|
2025-04-22 17:47:25 +08:00
|
|
|
import { OpenCabinetApiData } from '../shop/type'
|
2025-04-03 09:03:47 +08:00
|
|
|
|
|
|
|
/** 获取智能柜详情接口 */
|
2025-06-13 15:40:18 +08:00
|
|
|
export function getCabinetDetailApi(shopId: number) {
|
2025-04-03 09:03:47 +08:00
|
|
|
return request<CabinetDetailResponse>({
|
|
|
|
url: 'cabinet/detail',
|
2025-06-13 15:40:18 +08:00
|
|
|
method: 'get',
|
|
|
|
params: {
|
|
|
|
shopId
|
|
|
|
}
|
2025-04-03 09:03:47 +08:00
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2025-05-09 08:23:28 +08:00
|
|
|
export function openCabinet(cabinetId: number, pinNo: number, data: OpenCabinetApiData) {
|
2025-04-03 09:03:47 +08:00
|
|
|
return request<ApiResponseData<void>>({
|
2025-05-09 08:23:28 +08:00
|
|
|
url: `cabinet/openCabinet/${cabinetId}/${pinNo}`,
|
2025-04-22 17:47:25 +08:00
|
|
|
method: 'post',
|
|
|
|
data
|
2025-04-03 09:03:47 +08:00
|
|
|
})
|
|
|
|
}
|