limit.js 5.51 KB
//exports.domain = require('../config/common.js').domain;
exports.domain = 'http://172.16.6.240:8088/platform';

//路由配置
exports.res = [
    {
        //【限购商品】页面渲染
        route: '/limit/product/index',
        method: 'GET',
        view: 'pages/limit/index',
        isJsonRaw:true,
        src: '/product/limit'
    }, {
        // 【限购商品】ajax分页
        route: '/limit/product/page',
        method: 'POST',
        url: '/limitProduct/getLimitProductList',
        isJsonRaw:true,
        params: [
            {
                name: 'hotFlag',
                type: 'Number'
            },{
                name: 'saleFlag',
                type: 'Number'
            },{
                name: 'showFlag',
                type: 'Number'
            },{
                name: 'productName',
                type: 'String'
            },{
                name: 'productSkn',
                type: 'String'
            },{
                name: 'page',
                type: 'Number'
            },{
                name: 'size',
                type: 'Number'
            }

        ]
    },{
        // 【限购商品】添加页面渲染
        route: '/limit/product/add',
        method: 'GET',
        view: 'pages/limit/add',
        src: '/product/limit-add',
        isJsonRaw:true,
        data: {
            data: {},
            action: '/limit/product/add'
        }
    },{
        // 【限购商品】ajax添加
        route: '/limit/product/add',
        method: 'POST',
        url: '/limitProduct/addLimitProduct',
        isJsonRaw:true,
        params: [
            {
                name: 'productName',
                type: 'String'
            },
            {
                name: 'attachmentContent',
                type: 'String'
            },
            {
                name: 'batchNo',
                type: 'Number'
            },{
                name: 'saleTime',
                type: 'String'
            },{
                name: 'hotFlag',
                type: 'Number'
            },{
                name:'orderBy',
                type: 'Number'
            },{
                name: 'notSaleOrderBy',
                type: 'Number'
            }
        ]
        
    }, {
        route: '/limit/edit/:id',
        method: 'GET',
        view: 'pages/limit/add',
        url: '/limitProduct/getLimitProduct',
        isJsonRaw:true,
        data:{
            action:"/limit/update",
            type:"update"
        },
        src:'/product/limit-add',
        params:[
            {name:"id",type:"String"}
        ]
    }, {
        route: '/limit/update',
        method: 'POST',
        url: '/limitProduct/updateLimitProduct',
        isJsonRaw: true,
        params: [
            {
                name: 'id',
                type: 'Number'
            },
            {
                name: 'productName',
                type: 'String'
            },
            {
                name: 'attachmentContent',
                type: 'String'
            },
            {
                name: 'batchNo',
                type: 'Number'
            },{
                name: 'saleTime',
                type: 'String'
            },{
                name: 'hotFlag',
                type: 'Number'
            },{
                name:'orderBy',
                type: 'Number'
            },{
                name: 'notSaleOrderBy',
                type: 'Number'
            }, {
                name: 'dayFlag',
                type: 'Number'
            }
         ]
    }, {
         route: '/limit/ajax/getCodeCount',
         method: 'POST',
         url: '/limitProduct/getCountByStatus',
         isJsonRaw: true,
         params: [
            {
                name: 'hotFlag',
                type: 'Number'
            },{
                name: 'saleFlag',
                type: 'Number'
            },{
                name: 'showFlag',
                type: 'Number'
            },{
                name: 'productName',
                type: 'String'
            },{
                name: 'productSkn',
                type: 'String'
            }
        ]
     }, {
        route: '/limit/audit',
        method: 'POST',
        url: '/limitProduct/auditLimitProduct',
        isJsonRaw: true,
        params: [
            {
                name: 'id',
                type: 'Number'
            },
            {
                name: 'showFlag',
                type: 'Number'
            },
            {
                name: 'hotFlag',
                type: 'Number'
            },
            {
                name: 'orderBy',
                type: 'Number'
            },
            {
                name: 'notSaleOrderBy',
                type: 'Number'
            }
        ]
     }, {
        route: '/limit/delete',
        method: 'POST',
        url: '/limitProduct/deleteLimitProduct',
        isJsonRaw: true,
        params: [
            {
                name: 'id',
                type: 'Number'
            }
        ]
    }, {
        route: '/limit/checkBatch',
        method: 'POST',
        url: '/limitProduct/checkBatchNoExist',
        isJsonRaw: true,
        params: [
            {
                name: 'batchNo',
                type: 'Number'
            },
            {
                name: 'id',
                type: 'Number'
            }
        ]
    }
];