import request from '@/plugins/request/system';


/**
 * 获取广告分类
 * @param data
 * @constructor
 */
export function  SystemAdverPage(data = {}) {
  return request({
    url: '/systemv1/adver/page',
    method: 'post',
    data : data
  });
}

/**
 * 获取广告分类tree
 * @param data
 * @constructor
 */
export function  SystemAdverPageTree(data = {}) {
  return request({
    url: '/systemv1/adver/page_tree',
    method: 'post',
    data : data
  });
}
/**
 * 删除广告分类
 * @param data
 * @constructor
 */
export function  SystemAdverPageDel(data = {}) {
  return request({
    url: '/systemv1/adver/page_del',
    method: 'post',
    data : data
  });
}
/**
 * 广告分类详情
 * @param data
 * @constructor
 */
export function  SystemAdverPageInfo(data = {}) {
  return request({
    url: '/systemv1/adver/page_info',
    method: 'post',
    data : data
  });
}

/**
 * 修改广告分类
 * @param data
 * @constructor
 */
export function SystemAdverPageUpdate(data = {}) {
  return request({
    url: '/systemv1/adver/page_save',
    method: 'post',
    data : data
  });
}




/**
 *广告列表
 * @param data
 * @constructor
 */
export function  SystemAdver(data = {}) {
  return request({
    url: '/systemv1/adver/list',
    method: 'post',
    data : data
  });
}

/**
 * 删除广告
 * @param data
 * @constructor
 */
export function  SystemAdverDel(data = {}) {
  return request({
    url: '/systemv1/adver/del',
    method: 'post',
    data : data
  });
}
/**
 * 广告详情
 * @param data
 * @constructor
 */
export function  SystemAdverInfo(data = {}) {
  return request({
    url: '/systemv1/adver/info',
    method: 'post',
    data : data
  });
}

/**
 * 修改广告
 * @param data
 * @constructor
 */
export function  SystemAdverUpdate(data = {}) {
  return request({
    url: '/systemv1/adver/save',
    method: 'post',
    data : data
  });
}

/**
 * 资源图片列表
 * @param data
 * @constructor
 */
export function  SystemUpsourceList(data = {}) {
  return request({
    url: '/systemv1/adver/upsourceList',
    method: 'post',
    data : data
  });
}
/**
 * 编辑添加资源图片
 * @param data
 * @constructor
 */
export function  SystemUpsourceDel(data = {}) {
  return request({
    url: '/systemv1/adver/upsourceDel',
    method: 'post',
    data : data
  });
}
/**
 * 删除资源图片
 * @param data
 * @constructor
 */
export function  SystemUpsourceSave(data = {}) {
  return request({
    url: '/systemv1/adver/upsourceSave',
    method: 'post',
    data : data
  });
}
/**
 * 上传文章
 * @param data
 * @constructor
 */
export function  SystemAddArt(data = {}) {
  return request({
    url: '/systemv1/member/addArticle',
    method: 'post',
    data : data
  });
}

/**
 * 获取文章列表
 * @param data
 * @constructor
 */
export function  SystemGetArtList(data = {}) {
  return request({
    url: '/systemv1/member/getArticleList',
    method: 'get',
    params: data
  });
}

/**
 * 获取文章列表
 * @param data
 * @constructor
 */
export function  getArtDetail(data) {
  return request({
    url: '/systemv1/member/getArticleDetail',
    method: 'get',
    params: data
  });
}

/**
 * 修改文章
 * @param data
 * @constructor
 */
export function  updateArticle(data = {}){
  return request({
    url: '/systemv1/member/updateArticle',
    method: 'post',
    data: data
  });
}

/**
 * 删除文章
 * @param data
 * @constructor
 */
export function  SystemDelArt(data = {}) {
  return request({
    url: '/systemv1/member/deleteArticle',
    method: 'post',
    data : data
  });
}

/**
 * 文章详情
 * @param data
 * @constructor
 */
// export function  SystemArtDetail(data = {},id) {
//   return request({
//     url: '/systemv1/member/getArticleDetail/' + id,
//     method: 'get',
// 	params: data
//   });
// }

/**
 * 课程分类列表
 * @param data
 * @constructor
 */
export function getCate(data = {}) {
	return request({
	  url: '/systemv1/EducationController/getCateList',
	  method: 'post',
	  data : data
	});
}

/**
 * 修改课程分类
 * @param data
 * @constructor
 */
export function editCate(data = {}) {
	return request({
	 url: '/systemv1/EducationController/editCate',
	 method: 'post',
	 data : data
	});
}

/**
 * 添加课程子分类
 * @param data
 * @constructor
 */
export function subcateadd(data = {}){
	return request({
	 url: '/systemv1/EducationController/subcateadd',
	 method: 'post',
	 data : data
	});
}

/**
 * 删除课程分类
 * @param data
 * @constructor
 */
export function delCate(data= {}) {
	return request({
	 url: '/systemv1/EducationController/delCate',
	 method: 'post',
	 data : data
	});
}

/**
 * 分组列表
 * @param data
 * @constructor
 */
export function getGrlist(data = {}) {
	return request({
	 url: '/systemv1/GroupController/index',
	 method: 'post',
	 data : data
	});
}

/**
 * 切换是否过审
 * @param data
 * @constructor
 */
export function changeAudit(data = {}) {
	return request({
	 url: '/systemv1/GroupController/changeStatus',
	 method: 'post',
	 data : data
	});
}

/**
 * 切换是否轮播
 * @param data
 * @constructor
 */
export function changeRecommend(data = {}) {
	return request({
	 url: '/systemv1/GroupController/changeRecommend',
	 method: 'post',
	 data : data
	});
}

/**
 * 添加课程
 * @param data
 * @constructor
 */
export function addCourse(data={}) {
	return request({
	 url: '/systemv1/CourseController/addCourse',
	 method: 'post',
	 data : data
	});
}

/**
 * 课程详情
 * @param data
 * @constructor
 */
export function searchCourse(data={}) {
	return request({
	 url: '/systemv1/CourseController/searchCourse',
	 method: 'post',
	 data : data
	});
}

export function getCourseList(data= {}) {
	return request({
	 url: '/systemv1/CourseController/getCourseList',
	 method: 'post',
	 data : data
	});
}

export function editGr(data = {}) {
	return request({
	 url: '/systemv1/GroupController/edit',
	 method: 'post',
	 data : data
	});
}

export function addGr(data = {}) {
	return request({
	 url: '/systemv1/GroupController/add',
	 method: 'post',
	 data : data
	});
}

export function delGr(data = {}) {
	return request({
	 url: '/systemv1/GroupController/delete',
	 method: 'post',
	 data : data
	});
}

export function updateCourseAudit(data = {}) {
	return request({
	 url: '/systemv1/courseController/updateCourseAudit',
	 method: 'post',
	 data : data
	});
}

export function editCourse(data={}) {
	return request({
	 url: '/systemv1/CourseController/editCourse',
	 method: 'post',
	 data : data
	});
}

//systemv1/CourseController/deleteCourse
export function deleteCourse(data = {}) {
	return request({
	 url: '/systemv1/CourseController/deleteCourse',
	 method: 'post',
	 data : data
	});
}