/**
 * 内容服务系统
 * apiContent:'http://10.162.16.5:8070'  //内容服务系统
 */
 import res from '@/utils/system/request.js'

/* 获取内容列表 */
export const GetContent = (params) => res('get', 'apiContent', '/contents/{contentTypeId}/list', {...params,params})

/* 获取楼层广告数据 */
export const GetAdvertList = (params) => res('get','apiContent', '/manager/publicitys/onLineList', {params:params})

/* M003获取楼层数据 */
export const GetFloorList = (params) => res('get','apiContent', '/manager/floors/list/'+params.status, {params:params})
/* M011根据楼层获取楼层数据 */
export const GetFloorListById = (params) => res('get','apiContent', '/manager/floors/'+params.id, {params:params})

//根据ID获取广告详情
export const GetAdvertDetail = (params) => res('get', 'apiContent', '/manager/publicitys/'+params.id, {params:params});

//M002新增广告
export const AddNewAdvert = (params) => res('post', 'apiContent', '/manager/publicitys/add', params);

//M003更新广告信息
export const UpdateAdvert = (params) => res('put', 'apiContent', '/manager/publicitys/update',params);

//M001新增未上线的楼层广告
export const AddFloor = (params) => res('post', 'apiContent', '/manager/floors/add', params);

//M002删除未上线的楼层广告
export const DeleteFloor = (params) => res('delete', 'apiContent', '/manager/floors/delete/'+params.id, {params});

//M004楼层上线接口
export const OnLine = (params) => res('put', 'apiContent', '/manager/floors/onLine/'+params.id,params, {form:true});

//M005楼层下线接口
export const OffLine = (params) => res('put', 'apiContent', '/manager/floors/offLine/'+params.id,params, {form:true});

//M006更新楼层信息
export const UpdateFloor = (params) => res('put', 'apiContent', '/manager/floors/update',params);

//M008楼层下移接口
export const DownMove = (params) => res('put', 'apiContent', '/manager/floors/moveDown/'+params.id,params, {form:true});

//M009楼层上移接口
export const TopMove = (params) => res('put', 'apiContent', '/manager/floors/moveUp/'+params.id,params, {form:true});

//M005广告下移接口
export const MoveDownAdvert = (params) => res('put', 'apiContent', '/manager/publicitys/moveDown/'+params.id,params, {form:true});

//M005广告上移接口
export const MoveUpAdvert = (params) => res('put', 'apiContent', '/manager/publicitys/moveUp/'+params.id,params, {form:true});

//M007获取楼层数接口
export const GetFloorNum = (params) => res('get', 'apiContent', '/manager/floors/getOnLineCount',params);

//M010全部楼层接口
export const GetFloorAll = (params) => res('get', 'apiContent', '/manager/floors/list/all',params);

//Moo4广告库查询接口
export const AdvertsList = (params) => res('get','apiContent','/manager/publicitys/library',{params});

//Moo1删除楼层广告接口
export const DeleteAdverts= (params) => res('delete','apiContent','/manager/publicitys/delete/'+params.id,{params});

/**
  * 内容管理
  * contents : Content Controller
  */
/* 获取内容列表 */
export const GetContentList = (params) => res('get','apiContent', '/manager/contents/list', {params:params})

//根据ID获取内容详情
export const GetContentDetail = (params) => res('get', 'apiContent', '/manager/contents/list/'+params.id, {params:params});

//删除内容接口
export const DeleteContent= (params) => res('delete','apiContent','/manager/contents/delete/'+params.id,{params});

//删除内容类别接口
export const DeleteConType= (params) => res('delete','apiContent','/manager/contentTypes/delete',{params});

//审核内容接口
export const AuditContent = (params) => res('put', 'apiContent', '/manager/contents/audit/'+params.id,params, {form:true});

/* 获取内容类型列表 */
export const GetContentTypeList = (params) => res('get','apiContent', '/manager/contentTypes/list', {params:params})

//根据ID获取内容类型详情
export const GetContentTypeDetail = (params) => res('get', 'apiContent', '/manager/contentTypes/list/{id}', {params:params});

//新增内容
export const AddNewContent = (params) => res('post', 'apiContent', '/manager/contents/add', params);

//更新内容信息
export const UpdateContent = (params) => res('put', 'apiContent', '/manager/contents/update',params);

//新增内容类别
export const AddNewConType = (params) => res('post', 'apiContent', '/manager/contentTypes/add', params);

//更新内容类别信息
export const UpdateConType = (params) => res('put', 'apiContent', '/manager/contentTypes/update',params);

//获取APP启动页图片
export const getBootStartImage = (params) => res('get', 'apiContent', '/bootStart/getBootStartImage', {params:params});
//获取APP启动页图片列表
export const getBootStartImageList = (params) => res('get', 'apiContent', '/bootStart/getBootStartImageList', {params:params});

//保存APP启动页图片
export const saveBootStartImage = (params) => res('post', 'apiContent', '/bootStart/saveBootStartImage', params);

//获取文章分类列表
export const articleClassifyList = (params) => res('get', 'apiContent', '/article/classify/list', {params:params});
//新增文章分类
export const addArticleClassify = (params) => res('post', 'apiContent', '/article/classify/add',params);
//修改文章分类
export const updateArticleClassify = (params) => res('post', 'apiContent', '/article/classify/update',params);
//删除文章分类
export const deleteArticleClassify = (params) => res('post', 'apiContent', '/article/classify/delete',params, {form:true});
//获取一级文章分类
export const getClassifyoneList = (params) => res('get', 'apiContent', '/article/classify/getClassifyoneList', {params:params});
//获取三级文章分类
export const getClassifyList = (params) => res('get', 'apiContent', '/article/classify/getClassifyList', {params:params});
//文章信息列表
export const articleList = (params) => res('get', 'apiContent', '/article/list', {params:params});
//新增文章内容
export const addArticle = (params) => res('post', 'apiContent', '/article/add',params);
//更新文章信息
export const updateArticle = (params) => res('post', 'apiContent', '/article/update',params);
//删除文章信息
export const deleteArticle = (params) => res('post', 'apiContent', '/article/delete',params, {form:true});
//获取文章详情
export const getArticleDetail = (params) => res('get', 'apiContent', '/article/list/'+params.id,{params:params});