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

/**
 * 团队认证-列表
 */

export const B2_APIgetList = (data: any): any => {
  return async (dispatch: AppDispatch) => {
    const res = await http.post('cms/applyExhibition/pageList', data)
    if (res.code === 0) {
      const obj = {
        list: res.data.records,
        total: res.data.total
      }
      dispatch({ type: 'B2/getList', payload: obj })
    }
  }
}

/**
 * 团队认证-删除
 */
export const B2_APIdel = (id: number) => {
  return http.get(`cms/applyExhibition/removes/${id}`)
}

/**
 * 团队认证-详情
 */
export const B2_APIgetInfo = (id: number) => {
  return http.get(`cms/applyExhibition/detail/${id}`)
}
