import request from '@/utils/request';

export const school_detail = (data = {}) =>
  request({
    url: '/school/main/detail',
    data: {
      id: data.id

    }
  })

export const user_info = (data = {}) =>
  request({
    url: '/user/main/user_info',
    data: {
      user_id: data.user_id

    }
  })
export const school_edit = (data = {}) =>
  request({
    url: '/school/main/edit',
    data: {
      issubmit: "1",
      id: data.id,
      school_main: {
        sm_name: data.sm_name,
        sm_period: data.sm_period,
        sm_code: data.sm_code,
        sm_type: data.sm_type,
        sm_score: data.sm_score,
        sm_logo: data.sm_logo,
        sm_brief: data.sm_brief,
        sm_lxr: data.sm_lxr,
        sm_lxr_contact: data.sm_lxr_contact,
        sm_status: data.sm_status,
        sm_address: data.sm_address,
      }

    }
  })

export const school_list = (data = {}) =>
  request({
    url: '/school/main/index',
    data: {

      page: data.page,
      limit: data.limit,
      keyword: data.keyword,
      sm_period: data.sm_period,
      sm_code: data.sm_code,
      sm_type: data.sm_type,
      sm_lxr: data.sm_lxr,
      sm_lxr_contact: data.sm_lxr_contact,
      sm_status: data.sm_status,
      sm_address: data.sm_address,
    }
  })