market.js 9.93 KB
exports.domain = require('../config/common.js').domain;


//营销管理路由配置
exports.res = [
    {
        //营销码管理 -> 页面渲染
        route: '/market/coupon/index',
        method: 'GET',
        view: 'pages/market/index',
        src: '/market/coupon',
        noApi: true,
        data: {
            pageTitle: '优惠码列表',
            createUrl: '/market/coupon/add',
            gridurl:'/market/coupon/getPromotion'
            // tabUrl: '/getCodeCount',
            // sendUrl: '/sendPromotion',
            // auditUrl: '/auditPromotion'
        }
        
    },
    {
        //营销码管理 -> 列表数据
        route: '/market/coupon/getPromotion',
        method: 'POST',
        url: '/promotioncode/getPromotionCodeList',
        isJsonRaw: true,
        params: [{
             name: 'status',
             type: 'Number'
         }, {
             name: 'page',
             type: 'Number'
         }, {
             name: 'size',
             type: 'Number'
         }, {
             name: 'batchNo',
             type: 'Number'
         }, {
             name: 'name',
             type: 'String'
         }, {
             name: 'reqDepartment',
             type: 'String'
         }]
    },{
        //营销码管理 -> 列表操作
        route: '/market/coupon/auditPromotion',
        method: 'POST',
        url: '/promotioncode/auditPromotionCode',
        isJsonRaw: true,
        params: [{
            name: 'id',
            type: 'Number'
        }, {
            name: 'status',
            type: 'Number'
        }, {
            name: 'reason',
            type: 'String'
        }]
    }, {
        //营销码管理 -> 发放列表
        route: '/market/coupon/sendPromotion',
        method: 'POST',
        url: '/promotioncode/getPromotionCodeSendList',
        isJsonRaw: true,
        params: [
            {
                name: 'auditTime',
                type: 'String'
            }
        ]
    },
    {
        //营销码管理 -> tab卡数据
        route: '/market/coupon/getCodeCount',
        method: 'POST',
        url: '/promotioncode/getPromotionCodeCountByStatus',
        isJsonRaw: true,
        params: [
            {
                name: 'reqDepartment',
                type: 'String'
            },
            {
                name: 'name',
                type: 'String'
            },
            {
                name: 'batchNo',
                type: 'Number'
            }
        ]
    },
    {
        //营销码管理 -> 添加优惠码页面渲染
        route: '/market/coupon/add',
        method: 'GET',
        view: 'pages/market/coupon-edit',
        src:'/market/coupon-edit',
        data: {
            action:"/market/coupon/addCode",
            type:"add",            
            data:{
                limitTimes: "0",
                reqDepartment: "零售运营部/平台运营",
                userSourceLimit: "1",
                userTypeLimit: "1",
                userUseLimit:"1",
                staff: "admin",
                status: "0"
            }
        }
    },
    {
        //营销码管理 -> 添加优惠码
        route: '/market/coupon/addCode',
        method: 'POST',
        url: '/promotioncode/addPromotionCode',
        isJsonRaw: true,
        params: [
            {name: 'name',type: 'String'},
            {name: 'limitTimes',type: 'String'},
            {name: 'code',type: 'String'},
            {name: 'describe',type: 'String'},
            {name: 'promotionInfo',type: 'String'},
            {name: 'userSourceLimit',type: 'String'},
            {name: 'userTypeLimit',type: 'String'},
            {name: 'creatorId',type: 'String'},
            {name: 'limitDateFrom',type: 'String'},
            {name: 'limitDateTo',type: 'String'},
            {name: 'createTime',type: 'String'},
            {name: 'reqDepartment',type: 'String'},
            {name: 'status',type: 'String'},
            {name: 'staff',type: 'String'}
        ]
    },
    {
        //营销码管理 -> 编辑优惠码页面渲染
        route: '/market/coupon/update/:id',
        method: 'GET',
        view: 'pages/market/coupon-edit',
        url: '/promotioncode/getPromotionCode',
        isJsonRaw:true,
        data:{
            action:"/market/coupon/updateCode",
            type:"update"
        },
        src:'/market/coupon-edit',
        params:[
            {name:"id",type:"String"}
        ]
    },
    {
        //营销码管理 -> 优惠码详情
        route: '/market/coupon/info/:id',
        method: 'GET',
        view: 'pages/market/coupon-edit',
        url: '/promotioncode/getPromotionCode',
        isJsonRaw:true,
        src:'/market/coupon-edit',
        data:{
            type:"info"
        },
        params: [
            {name:"id",type:"String"}
        ]
    },
    {
        //营销码管理 -> 验证优惠码
        route: '/market/coupon/checkPromotionCode',
        method: 'POST',
        url: '/promotioncode/checkPromotionCode',
        isJsonRaw: true,
        params: [
            {
                name: 'code',
                type: 'String'
            }
        ]
    },
    {
        //营销码管理 -> 编辑优惠码
        route: '/market/coupon/updateCode',
        method: 'POST',
        url: '/promotioncode/updatePromotionCode',
        isJsonRaw: true,
        params: [
             {name: 'id',type: 'String'},
             {name: 'name',type: 'String'},
             {name: 'limitTimes',type: 'String'},
             {name: 'code',type: 'String'},
             {name: 'describe',type: 'String'},
             {name: 'promotionInfo',type: 'String'},
             {name: 'userSourceLimit',type: 'String'},
             {name: 'userTypeLimit',type: 'String'},
             {name: 'creatorId',type: 'String'},
             {name: 'limitDateFrom',type: 'String'},
             {name: 'limitDateTo',type: 'String'},
             {name: 'createTime',type: 'String'},
             {name: 'reqDepartment',type: 'String'},
             {name: 'status',type: 'String'}
         ]
    },
    {
        //限购码管理 -> 页面渲染
        route: '/market/limitcode/index',
        method: 'GET',
        view: 'pages/market/index',
        src: '/market/limitcode',
        noApi: true,
        data: {
            pageTitle: '限购码列表',
            createUrl: '/market/limitcode/add',
            gridurl:'/market/limitcode/getLimitCode'
        }
    },
    {   
        //限购码管理 -> 限购码列表
        route: '/market/limitcode/getLimitCode',
        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: '/market/limitcode/add',
        method: 'GET',
        view: 'pages/market/limitcode-edit',
        data: {
            action:"/market/limitCode/addLimitCode",
            type:"add",            
            data:{
                reqDepartment: "零售运营部/平台运营",
            }
        },
        src:'/limitcode/edit'
    },
    {
        //限购码管理 -> 添加限购码
        route:'/market/limitCode/addLimitCode',
        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: '/market/limitcode/info/:id',
        method: 'GET',
        view: 'pages/market/limitcode-info',
        url:"/limitCode/getLimitCode",
        isJsonRaw: true,
        params: [
             {name: 'id',type: 'String'}
        ]
    }
    ,{
        //限购码管理 -> 编辑限购码页面渲染
        route:'/market/limitcode/update/:id',
        method: 'GET',
        view: 'pages/market/limitcode-edit',
        url:"/limitCode/getLimitCode",
        src:'/market/limitcode-edit',
        isJsonRaw: true,
        data: {
            action:"/market/limitcode/updateLimitCode",
            type:"update",            
        },
        params: [
             {name: 'id',type: 'String'}
        ]
    }
    ,{
        //限购码管理 -> 编辑限购码接口
        route:'/market/limitcode/updateLimitCode',
        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: '/market/limitcode/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'}
        ]
    }
]