limit.js 4.57 KB
exports.domain = require('../config/common.js').domain;
//exports.domain = 'http://172.16.6.240:8088/platform';
//exports.domain = 'http://172.16.6.182:8080/yohobuy-platform-web'; //曹燕

//路由配置
exports.res = [{
    //【限购商品】页面渲染
    route: '/limit/product/index',
    method: 'GET',
    view: 'pages/limit/index',
    src: '/product/limit'
}, {
    // 【限购商品】ajax分页
    route: '/limit/product/page',
    method: 'POST',
    url: '/limitProduct/getLimitProductList',
    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',
    data: {
        data: {},
        action: '/limit/product/add'
    }
}, {
    // 【限购商品】ajax添加
    route: '/limit/product/add',
    method: 'POST',
    url: '/limitProduct/addLimitProduct',
    params: [{
        name: 'productName',
        type: 'String'
    }, {
        name: 'attachmentContent',
        type: 'String'
    }, {
        name: 'batchNo',
        type: 'Number'
    }, {
        name: 'dayFlag',
        type: 'Number'
    }, {
        name: 'saleTimeStr',
        type: 'String'
    }, {
        name: 'hotFlag',
        type: 'Number'
    }, {
        name: 'orderBy',
        type: 'Number'
    }, {
        name: 'notSaleOrderBy',
        type: 'Number'
    }, {
        name: 'limitProductType',
        type: 'Number'
    }, {
        name: 'activityId',
        type: 'Number'
    }]

}, {
    route: '/limit/edit/:id',
    method: 'GET',
    view: 'pages/limit/add',
    url: '/limitProduct/getLimitProduct',
    data: {
        action: "/limit/update",
        type: "update"
    },
    src: '/product/limit-add',
    params: [{
        name: "id",
        type: "String"
    }]
}, {
    route: '/limit/update',
    method: 'POST',
    url: '/limitProduct/updateLimitProduct',
    params: [{
        name: 'id',
        type: 'Number'
    }, {
        name: 'productName',
        type: 'String'
    }, {
        name: 'attachmentContent',
        type: 'String'
    }, {
        name: 'batchNo',
        type: 'Number'
    }, {
        name: 'saleTimeStr',
        type: 'String'
    }, {
        name: 'hotFlag',
        type: 'Number'
    }, {
        name: 'orderBy',
        type: 'Number'
    }, {
        name: 'notSaleOrderBy',
        type: 'Number'
    }, {
        name: 'dayFlag',
        type: 'Number'
    }, {
        name: 'showFlag',
        type: 'Number'
    }, {
        name: 'status',
        type: 'Number'
    }]
}, {
    route: '/limit/ajax/getCodeCount',
    method: 'POST',
    url: '/limitProduct/getCountByStatus',
    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',
    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',
    params: [{
        name: 'id',
        type: 'Number'
    }]
}, {
    route: '/limit/checkBatch',
    method: 'POST',
    url: '/limitProduct/checkBatchNoExist',
    params: [{
        name: 'batchNo',
        type: 'Number'
    }, {
        name: 'id',
        type: 'Number'
    }]
}, {
    route: '/limit/batch/export',
    method: 'POST',
    url: '/batch/export',
    params: [{
        name: 'queryConf',
        type: 'String'
    }, {
        name: 'type',
        type: 'String'
    }]
}];