guang.info.js 2.59 KB
/**
 * Created by ty on 2016/6/20.
 * 资讯管理
 */

module.exports=function(app) {

    /*首页*/
    app.get("/guang/article/index","guang.info.Index", function () {
        this.$extend = {
            iscreate: true,
            moduleName: "资讯管理",
            pageName: "资讯列表管理"
        };
    });

    /*添加*/
    app.get("/guang/article/contentAdd","guang.info.Edit", ["common_aggStyle"],function (style,req,res) {
        this.$extend = {
            action:"/guang/article/addArticle",
            moduleName: "文章管理",
            pageName: "添加文章"
        };
        var style=(JSON.parse(style)).data;
        style=style.map(function(item){
            return {stylename:item.style_name};
        });
        return {style:style};
    });

    /*编辑*/
    app.get("/guang/article/contentEdit/:id","guang.info.Edit","common_aggStyle", function (style) {
        this.$extend = {
            action:"/guang/article/updateArticle",
            moduleName: "文章管理",
            pageName: "修改文章"
        };
        var style=(JSON.parse(style)).data;
        style=style.map(function(item){
            return {stylename:item.style_name};
        });
        return {style:style};
    });

    /*资讯管理列表数据*/
    app.post("/guang/article/list","infoManager_getList");

    /*资讯管理-列表操作(修改、发布、关闭、推荐、取消推荐)*/
    app.post("/guang/article/operation","infoManager_operation");

    /*资讯管理-定时*/
    app.post("/guang/article/timmer","infoManager_timePublish");

    /*资讯管理-删除*/
    app.post("/guang/article/del","infoManager_delArticle");

    //================================= [下拉框调用的接口]
    /*作者列表*/
    app.post("/guang/article/getAuthorList","infoManager_getAuthorList");

    /*所有分类*/
    // app.post("/guang/article/getSortList","infoManager_getSortList");

    /*根据是否启用获取标签分类列表*/
    app.post("/guang/tagSort/getTagItems","infoManager_getTagItems");

    /*plus star 频道*/
    app.post("/guang/plustarcategory/getCategoryNames","infoManager_getCategoryNames");

    /*添加文章*/
    app.post("/guang/article/addArticle","infoManager_addArticle");

    /*更新文章*/
    app.post("/guang/article/updateArticle","infoManager_updateArticle");

    /*获取文章详情*/
    app.post("/guang/article/getDetail","infoManager_getDetail");

    /*获取标签列表*/
    app.post("/guang/tags/getTags","infoManager_getTags");

    /*获取文章详情*/
    app.post("/guang/queryAllGoodsSort","infoManager_queryAllGoodsSort");
}