import api from './index'
import { axios } from '@/utils/request'


/**
 * 获取全部房型
 * @returns 
 */
export function  getAllLayouts() { 
    return axios({
        url: '/rooms/cesRoomLayout/list',
        method: 'get',
        params: {
            pageSize: 99999,
            pageNo: 1
        }
    })
 }

/**
 * 启用状态（App）
 * @param {String||Number} parameter layoutId
 * @returns Axios Promise
 */
export function modifyAppState(parameter) {
    return axios({
        url: '/rooms/cesRoomLayout/modifyAppState/'+parameter.id+"?hotelId="+parameter.hotelId+"&state="+(parameter.appState?0:1),
        method: 'put',
        data: parameter
    })
}

/**
 * 修改
 * @param {Object} parameter layoutId
 * @returns Axios Promise
 */
 export function modify(parameter) {
    return axios({
        url: '/rooms/cesRoomLayout/modify/',
        method: 'put',
        data: parameter
    })
}



