// 引入 request 文件
import request from '@/common/api/request.js'
const urlAccount = '/account'
const urlProduct = '/product'
const urlOrder = '/order'

// 获取叫号号码
export const APIcallTabletakeNumber = (data) => {
	return request({
		url: urlAccount + '/user/callTable/takeNumber',
		method: 'post',
		data: data
	})
}

// 叫号桌型获取
export const APIusercallTable = (data) => {
	return request({
		url: urlAccount + '/user/callTable',
		method: 'get',
		data: data
	})
}

// 获取叫号队列
export const APIqueuecallTable = (data) => {
	return request({
		url: urlAccount + '/user/callTable/queue',
		method: 'get',
		data: data
	})
}

// 叫号队列详情
export const APIqueuedetail = (data) => {
	return request({
		url: urlAccount + '/user/callTable/queue/detail',
		method: 'get',
		data: data
	})
}

// 消息订阅
export const APIcallTablesubMsg = (data) => {
	return request({
		url: urlAccount + '/user/callTable/subMsg',
		method: 'post',
		data: data
	})
}

// 取消排队
export const APIqueuecancel = (data) => {
	return request({
		url: urlAccount + '/user/callTable/cancel?queueId=' + data.queueId + '&shopId=' + data.shopId,
		method: 'DELETE'
	})
}