import request from '@/utils/request'
import {
    BASE
} from './apiGateway'

var onlineRegistrationApi = {
    // 获取机构详情
    getOrgInfoById(params) {
        return request({
            url: `${BASE}/patient/course/getOrgInfoById`,
            method: 'GET',
            params: params
        })
    },
    // 未登录获取机构详情
    getOrgInfoByIdNoLogin(params) {
    return request({
        url: `${BASE}/cloudCare/noLogin/patient/getOrgInfoById`,
        method: 'GET',
        params: params
    })
    },
    // 获取课程详情
    getCourseInfo(params) {
        return request({
            url: `${BASE}/patient/course/getCourseInfo`,
            method: 'GET',
            params: params
        })
    },
    // // 获取课程目录
    // getCatalogue(params) {
    //     return request({
    //         url: `${BASE}/patient/course/getCatalogue`,
    //         method: 'GET',
    //         params: params
    //     })
    // },
    // // 获取教师详情
    // getCatalogue2(params) {
    //     return request({
    //         url: `${BASE}/patient/course/getCatalogue`,
    //         method: 'GET',
    //         params: params
    //     })
    // },
    //在线报名获取教师详情    
    getTecInfoById(params) {
        return request({
            url: `${BASE}/patient/course/getTecInfoById`,
            method: 'GET',
            params: params
        })
    },
    //未登录在线报名获取教师详情    
    getTecInfoByIdNoLogin(params) {
        return request({
            url: `${BASE}/cloudCare/noLogin/patient/getTecInfoById`,
            method: 'GET',
            params: params
        })
    },
    // 获取居民订单
    getCoursrOrderStatusByPatient(params) {
        return request({
            url: `${BASE}/patient/course/getCoursrOrderStatusByPatient`,
            method: 'GET',
            params: params
        })
    },
    // 获取订单详情
    getOrderInfo(params) {
        return request({
            url: `${BASE}/patient/course/getOrderInfo`,
            method: 'GET',
            params: params
        })
    },
    // 购买课程
    buyCourseOrder(params) {
        return request({
            url: `${BASE}/patient/course/buyCourseOrder`,
            method: 'GET',
            params: params
        })
    },
    // 根据课程展示
    getCourseByCourse(params) {
        return request({
            url: `${BASE}/patient/course/getCourseByCourse`,
            method: 'GET',
            params: params
        })
    },
    // 机构展示
    getCourseByOrg(params) {
        return request({
            url: `${BASE}/patient/course/getCourseByOrg`,
            method: 'GET',
            params: params
        })
    },
    // 未登录机构展示
    getCourseByOrgNoLogin(params) {
    return request({
        url: `${BASE}/cloudCare/noLogin/patient/getCourseByOrg`,
        method: 'GET',
        params: params
    })
    },
    // 教师展示
    getTecInfoByTecInfo(params) {
        return request({
            url: `${BASE}/patient/course/getTecInfoByTecInfo`,
            method: 'GET',
            params: params
        })
    },
	
	// 招生报名
	enrollment(params) {
	    return request({
	        url: `${BASE}/patient/course/enrollment`,
	        method: 'POST',
	        params: params
	    })
	},
	// 查询居民是否已经报名
	isEnrollment(params) {
	    return request({
	        url: `${BASE}/patient/course/isEnrollment`,
	        method: 'GET',
	        params: params
	    })
	},
}

export default onlineRegistrationApi
