category.js 1.63 KB
/**
 * Created by ty on 2016/6/21.
 * 分类管理
 */

module.exports=function(app) {

    /*分类管理首页*/
    app.get("/operations/category/index","operations.category.Index", function () {
        this.$extend = {
            moduleName: "分类管理",
            pageName: "分类列表管理"
        }
    });

    /*分类管理添加页面*/
    app.get("/operations/category/add","operations.category.Edit", "resourceManage_getUrlAction", function (response) {
        this.$extend = {
            data:response.data,
            action:"/category/addCategory",
            type:"add",
            moduleName: "分类管理",
            pageName: "添加分类"
        };
    });

    /*分类管理编辑页面*/
    app.get("/operations/category/edit/:param","operations.category.Edit", "resourceManage_getUrlAction", function (response) {
        this.$extend = {
            data:response.data,
            action:"/category/updateCategory",
            type:"edit",
            moduleName: "分类管理",
            pageName: "编辑分类"
        };
    });
    
    /*分类列表*/
    app.post("/category/getCategoryList","category_getCategoryList");

    /*更新分类状态*/
    app.post("/category/updateCategoryStatus","category_updateCategoryStatus");

    /*根据id获取分类对象*/
    app.post("/category/getOneCategory","category_getOneCategory");

    /*添加分类*/
    app.post("/category/addCategory","category_addCategory");

    /*修改分类*/
    app.post("/category/updateCategory","category_updateCategory");

    /*获取分类列表*/
    app.post("/category/getCategories","category_getCategories");
}