resourceManage.js 3.68 KB
/**
 * Created by ty on 2016/3/30.
 * 资源管理路由
 */

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: "/resource/index/index",
        method: "GET",
        view: "pages/sourceManage/resourceManage",
        src: "/sourceManage/resourceManage"
    },
    {
        route: "/resources/queryResource",
        method: "POST",
        url: "/resources/queryResource",
        params: [
            {name: "id", type: "number"},
            {name: "name", type: "string"},
            {name: "sortId", type: "number"},
            {name: "platformId", type: "number"},
            {name: "page", type: "number"}
        ]
    },
    {
        route: "/resources/getResSorts",
        method: "POST",
        url: "/resources/getResSorts",
        params: []
    },
    {
        route: "/resources/getResPlatforms",
        method: "POST",
        url: "/resources/getResPlatforms",
        params: []
    },
    {
        route: "/resources/saveResource",
        method: "POST",
        url: "/resources/saveResource",
        params: [
            {name: "id", type: "number"},
            {name: "name", type: "string"},
            {name: "sortId", type: "number"},
            {name: "platformId", type: "number"},
            {name: "matchCode", type: "string"}
        ]
    },
    {//根据id删除资源位
        route: "/resources/deleteResourceById",
        method: "POST",
        url: "/resources/deleteResourceById",
        params: [
            {name: "id", type: "number"}
        ]
    },
    {//删除资源位下所有tab
        route: "/resources/deleteAllResourceByCode",
        method: "POST",
        url: "/resources/deleteAllResourceByCode",
        params: [
            {name: "code", type: "string"}
        ]
    },
    {
        //资源内容页面
        route: '/resource/content/index/:param',
        method: 'GET',
        view: 'pages/sourceManage/resourceContentManage',
        src: '/sourceManage/resourceContentManage',
        url: '/resources/getUrlAction',
        params:[]
    },
    {
        route: "/resources/resContentIndex",
        method: "POST",
        url: "/resources/resContentIndex",
        params: [
            {name: "id", type: "number"}
        ]
    },
    {
        route: "/resources/addResContent",
        method: "POST",
        url: "/resources/addResContent",
        params: [
            {name: "content", type: "string"},
            {name: "data_id", type: "string"},
            {name: "rId", type: "number"}
        ]
    },
    {
        route: "/resources/delResContent",
        method: "POST",
        url: "/resources/delResContent",
        params: [
            {name: "id", type: "number"}
        ]
    },
    //验证领券码
    {
        route: "/coupon/batchCheckCoupons",
        method: "POST",
        url: "/coupon/batchCheckCoupons",
        params: [
            {name: "params", type: "string"}
        ]
    },
    {//复制资源内容
        route: "/resources/copyResContent",
        method: "POST",
        url: "/resources/copyResContent",
        params: [
            {name: "rId", type: "string"}
        ]
    },
    {//更新预发布时间
        route: "/resources/updateResPublishTime",
        method: "POST",
        url: "/resources/updateResPublishTime",
        params: [
            {name: "id", type: "number"},
            {name: "time", type: "string"}
        ]
    }
];