import efunRequest from '../util/efunRequest';
import APIConfig from '../res/values/api.json';

function genLessonAPIUrl(path) {
    return APIConfig.course_api_url + path;
}
export default class courseApi {
    // 手机号注册
    static mobileLogin(data) {
        return efunRequest.getHttpRequest().url(genLessonAPIUrl('member/mobileAuth')).data(data).post();
    }
    // 第三方登录
    static partnerLogin(data) {
        return efunRequest.getHttpRequest().url(genLessonAPIUrl(`member/partnerLogin`)).data(data).post();
    }
    // 广告页图片
    static getAdImg(code) {
        return efunRequest.getHttpRequest().url(genLessonAPIUrl(`/channel/${code}`)).get();
    }
}
