import http from '@/http/yskApi/http.js'
const request = http.request

/**
 * 员工列表
 * @returns
 */
export function shopStaffList(data, urlType = 'account') {
	return request({
		url: `/${urlType}/admin/shopStaff`,
		method: "GET",
		data: {
			...data
		}
	})
}

/**
 * 获取员工对应的权限idid
 * @returns
 */
export function getShopStaffPermission(data, urlType = 'account') {
	return request({
		url: `/${urlType}/admin/shopStaff/permission`,
		method: "GET",
		data: {
			...data
		}
	})
}

/**
 * 员工详情
 * @returns
 */
export function shopStaffDetail(data, urlType = 'account') {
	return request({
		url: `/${urlType}/admin/shopStaff/detail`,
		method: "GET",
		data: {
			...data
		}
	})
}

/**
 * 员工添加
 * @returns
 */
export function shopStaffAdd(data, urlType = 'account') {
	return request({
		url: `/${urlType}/admin/shopStaff`,
		method: "POST",
		data: {
			...data
		}
	})
}

/**
 * 员工修改
 * @returns
 */
export function shopStaffPut(data, urlType = 'account') {
	return request({
		url: `/${urlType}/admin/shopStaff`,
		method: "PUT",
		data: {
			...data
		}
	})
}

/**
 * 员工删除
 * @returns
 */
export function shopStaffDel(data, urlType = 'account') {
	return request({
		url: `/${urlType}/admin/shopStaff`,
		method: "DELETE",
		data: {
			...data
		}
	})
}
