limitcode.js 3.74 KB
exports.domain = require('../config/common.js').domain;


//路由配置
exports.res = [
    {
        route: '/limit/index',
        method: 'GET',
        view: 'pages/limitcode/index',
        src: '/limitcode/index',
        noApi: true,
        data: {
            pageTitle: '限购码列表',
            createUrl: '/limit/code/add',
            gridurl:'/limit/code/ajax/index'
        }
    },
    {//查看列表【列表能够正常查看】
        route: '/limit/code/ajax/index',
        method: 'POST',
        url: '/limitCode/getLimitCodeList',
        isJsonRaw:true,
        params: [
            {name: 'page', type: 'Number'},
            {name: 'size', type: 'Number'},
            {name: 'batchNo', type: 'String'},
            {name: 'name', type: 'String'},
            {name: 'reqDepartment', type: 'String'}
        ]
    },
    {
        //添加限购码页面
        route: '/limit/code/add',
        method: 'GET',
        view: 'pages/limitcode/edit',
        data: {
            action:"/limit/code/ajax/add",
            type:"add",            
            data:{
                reqDepartment: "零售运营部/平台运营",
            }
        },
        src:'/limitcode/edit'
    },{//添加限购码【验证成功】
        route:'/limit/code/ajax/add',
        method:'POST',
        url:'/limitCode/addLimitCode',
        isJsonRaw: true,
        params:[
            {name:"name",type:"String"},
            {name:"limitTimes",type:"Number"},
            {name:"reqDepartment",type:"String"},
            {name:"limitDateFrom",type:"String"},
            {name:"limitDateTo",type:"String"},
            {name:"describe",type:"String"},
            {name:"userUseLimit",type:"Number"},
            {name:"userTypeLimit",type:"Number"},
            {name:"limitSkn",type:"String"},
            {name:"creatorName",type:"String"},
            {name:"creatorId",type:"Number"},
            {name:"status",type:"Number"}
        ]
    }
    ,{
        route: '/limit/code/info/:id',
        method: 'GET',
        view: 'pages/limitcode/info',
        url:"/limitCode/getLimitCode",
        isJsonRaw: true,
        params: [
             {name: 'id',type: 'String'}
        ]
    }
    ,{//修改优惠码页面
        route:'/limit/code/update/:id',
        method: 'GET',
        view: 'pages/limitcode/edit',
        url:"/limitCode/getLimitCode",
        src:'/limitcode/edit',
        isJsonRaw: true,
        data: {
            action:"/limit/code/ajax/update",
            type:"update",            
        },
        params: [
             {name: 'id',type: 'String'}
        ]
    }
    ,{
        //更新限购码接口
        route:'/limit/code/ajax/update',
        method:'POST',
        url:'/limitCode/updateLimitCode',
        isJsonRaw: true,
        params:[
            {name:"name",type:"String"},
            {name:"limitTimes",type:"Number"},
            {name:"reqDepartment",type:"String"},
            {name:"limitDateFrom",type:"String"},
            {name:"limitDateTo",type:"String"},
            {name:"describe",type:"String"},
            {name:"userUseLimit",type:"Number"},
            {name:"userTypeLimit",type:"Number"},
            {name:"limitSkn",type:"String"},
            {name:"creatorName",type:"String"},
            {name:"creatorId",type:"Number"},
            {name:"status",type:"Number"},
            {name:"id",type:"Number"}
        ]
    }
    ,{//修改限购码接口状态[待验证]
        route: '/limit/code/auditLimitCode',
        method: 'POST',
        view: 'pages/limitcode/info',
        url:"/limitCode/auditLimitCode",
        isJsonRaw: true,
        params: [
             {name: 'id',type: 'Number'},
             {name: 'status',type: 'Number'},
             {name: 'reason',type: 'String'}
        ]
    }
]