import {http} from "@/utils/request.js"
export default {
	getUserInfo: () => http('/system/user/info/', 'GET'),
	getCode:(data) => http('/auth/sms_code/', 'POST', data),
	login:(data) => http('/auth/token/', 'POST', data),
	loginSecret:(data) => http('/auth/login_secret/', 'POST', data), //App密钥登录
	bindSecret:(data) => http('/system/user/bind_secret/', 'POST', data), //App密钥绑定
	bindWxmp:(data)=>http('/system/user/bind_wxmp/', 'POST', data), //微信小程序绑定
	unbindWxmp:(data)=>http('/system/user/unbind_wxmp/', 'POST', data), //微信小程序绑定
	changePw:(data) => http("/system/user/password/", 'PUT', data),
	codeLogin:(data) => http('/auth/login_sms_code/', 'POST', data),
	wxmpLogin: (data) => http('/auth/login_wxmp/', 'POST', data, true, false), //微信小程序登录
	wxmpClogin: (data) => http('/auth/login_wxmp/', 'POST', data, true, false), //微信小程序登录(自动创建账号)
	apkCheck: ()=>http('/system/apk/'), //apk检查
	
	getTicket:(data) => http('/wf/ticket/', 'GET', data),
	ticketCreate:(data)=>http('/wf/ticket/', 'POST', data),
	ticketHandle:(id,data)=>http(`/wf/ticket/${id}/handle/`, 'POST', data),
	getMroom:(data) => http('/ofm/mroom/', 'GET', data),
	getTransition:(id) => http(`/wf/ticket/${id}/transitions/`, 'GET'),
	workflowInitkey:(key) => http(`/wf/workflow/${key}/init_key/`, 'GET'),
	bookingList:(data) => http('/ofm/mroombooking/', 'GET', data),
	bookingItem:(id,data) => http(`/ofm/mroombooking/${id}/`, 'GET', data),
	bookingCreate:(data) => http(`/ofm/mroombooking/`, 'POST', data),
	bookingUpdate:(id,data) => http(`/ofm/mroombooking/${id}/`, 'PUT', data),
	bookingDelete:(id) => http(`/ofm/mroombooking/${id}/`, 'DELETE'),
	bookingSlot:(data) => http(`/ofm/mroomslot/`, 'GET' , data),
}