import http from '@/utils/http'
import { AppDispatch } from '..'

/**
 *展馆预约设置-列表
 */

export const B1_APIgetList = (): any => {
  return async (dispatch: AppDispatch) => {
    const res = await http.get('cms/configExhibition/getList')
    if (res.code === 0) {
      dispatch({ type: 'B1/getList', payload: res.data || [] })
    }
  }
}

/**
 * 展馆预约设置-删除
 */
export const B1_APIdel = (ids: string) => {
  return http.get(`cms/configExhibition/removes/${ids}`)
}

/**
 * 展馆预约设置-新增、修改
 */
export const B1_APIsave = (data: any) => {
  return http.post('cms/configExhibition/save', data)
}
