categoryManage.js 4.02 KB
/**
 * Created by ty on 2016/5/26.
 * 分类管理路由
 */
exports.domain = require('../config/common.js').domain;
//exports.domain = 'http://172.16.6.115:8080/platform';//王伟
//exports.domain = 'http://192.168.102.216:8180/platform'; //测试环境
//exports.domain = 'http://172.16.6.231:8080/platform';
//exports.domain = 'http://172.16.6.225:8080/platform';
//exports.domain = 'http://192.168.102.216:8086/platform';

exports.res = [
    {
        route: "/operations/category/index",
        method: "GET",
        view: "pages/operations/categoryManage",
        src: "/operations/categoryManage"
    },
    {
        route: "/category/getCategoryList",
        method: "POST",
        url: "/category/getCategoryList",
        params: [
            {name: "platform", type: "string"},
            {name: "status", type: "string"}
        ]
    },
    {
        route: "/category/updateCategoryStatus",
        method: "POST",
        url: "/category/updateCategoryStatus",
        params: [
            {name: "id", type: "number"},
            {name: "status", type: "number"}
        ]
    },
    {
        route: "/operations/category/add",
        method: "GET",
        view: "pages/operations/categoryManageAdd",
        src: "/operations/categoryManageAdd",
        url: '/resources/getUrlAction',
        params:[],
        data:{
            action:"/category/addCategory",
            type:"add"
        }
    },
    {
        route: "/operations/category/edit/:param",
        method: "GET",
        view: "pages/operations/categoryManageAdd",
        src: "/operations/categoryManageAdd",
        url: '/resources/getUrlAction',
        params:[],
        data:{
            action:"/category/updateCategory",
            type:"edit"
        }
    },
    {
        //根据id获取分类对象
        route:"/category/getOneCategory",
        method: "POST",
        url: "/category/getOneCategory",
        params:[
            {name:'id', type:'number'}
        ]
    },
    {
        //添加分类
        route: "/category/addCategory",
        method: "POST",
        url: "/category/addCategory",
        params:[
            {name: "sortName", type: "string"},
            {name: "sortNameEn", type: "string"},
            {name: "sortIco", type: "string"},
            {name: "sortIcoBig", type: "string"},
            {name: "sortUrl", type: "string"},
            {name: "firstSortId", type: "string"},
            {name: "secondSortId", type: "string"},
            {name: "threadSortId", type: "string"},
            {name: "platform", type: "string"},
            {name: "orderBy", type: "string"},
            {name: "isNew", type: "string"},
            {name: "isHot", type: "string"},
            {name: "contentCode", type: "string"},
            {name: "separativeSign", type: "string"},
            {name: "sortNameColor", type: "string"},
            {name: "isNewPage", type: "string"}
        ]
    },
    {
        //修改分类
        route: "/category/updateCategory",
        method: "POST",
        url: "/category/updateCategory",
        params:[
            {name: "id", type: "number"},
            {name: "sortName", type: "string"},
            {name: "sortNameEn", type: "string"},
            {name: "sortIco", type: "string"},
            {name: "sortIcoBig", type: "string"},
            {name: "sortUrl", type: "string"},
            {name: "firstSortId", type: "string"},
            {name: "secondSortId", type: "string"},
            {name: "threadSortId", type: "string"},
            {name: "platform", type: "string"},
            {name: "orderBy", type: "string"},
            {name: "isNew", type: "string"},
            {name: "isHot", type: "string"},
            {name: "contentCode", type: "string"},
            {name: "separativeSign", type: "string"},
            {name: "sortNameColor", type: "string"},
            {name: "isNewPage", type: "string"}
        ]
    },
    {
        //获取分类列表
        route: "/category/getCategories",
        method: "POST",
        url: "/category/getCategories",
        params: []
    }
];