coupon.js 6.87 KB
exports.domain = require('../config/common.js').domain;


//路由配置
exports.res = [
    {
        route: '/coupon/index',
        method: 'GET',
        view: 'pages/coupon/index',
        src: '/coupon/index',
        noApi: true,
        data: {
            bottons:'{"look":true}',
            gridurl:'/getPromotion'
        }
        
    },
    {//添加优惠卷页面
        route: '/coupon/add',
        method: 'GET',
        view: 'pages/coupon/edit',
        noApi: true,
        data: {
            limitTimes: "0",
            reqDepartment: "零售运营部/平台运营",
            userSourceLimit: "1",
            userTypeLimit: "1",
            staff: "admin",
            status: "0"
        }
    },
    {
        route: '/coupon/action/add',
        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: '/checkPromotionCode',
        method: 'POST',
        url: '/promotioncode/checkPromotionCode',
        isJsonRaw: true,
        params: [
            {
                name: 'code',
                type: 'String'
            }
        ]
    },
    {//添加优惠卷页面
        route: '/coupon/update/:id',
        method: 'GET',
        view: 'pages/coupon/edit',
        url: '/promotioncode/getPromotionCode'
    },
    {
        route: '/coupon/action/update',
        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: '/coupon/info/:id',
        method: 'GET',
        view: 'pages/coupon',
        url: '/promotioncode/getPromotionCode'

    },
    {
        route: '/getPromotionCode',
        method: 'POST',
        url: '/promotioncode/getPromotionCode',
        isJsonRaw: true,
        params: [{
            name: 'id',
            type: 'String'
        }]
    },
    {
        route: '/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: '/auditPromotion',
        method: 'POST',
        url: '/promotioncode/auditPromotionCode',
        isJsonRaw: true,
        params: [{
            name: 'id',
            type: 'Number'
        }, {
            name: 'status',
            type: 'Number'
        }, {
            name: 'reason',
            type: 'String'
        }]
    }, {
        route: '/sendPromotion',
        method: 'POST',
        url: '/promotioncode/getPromotionCodeSendList',
        isJsonRaw: true,
        params: [
            {
                name: 'auditTime',
                type: 'String'
            }
                    ]
    },
    {
         route: '/auditPromotion',
         method: 'POST',
         url: '/promotioncode/auditPromotionCode',
         isJsonRaw: true,
         params: [{
             name: 'id',
             type: 'Number'
         }, {
             name: 'status',
             type: 'Number'
         }, {
             name: 'reason',
             type: 'String'
         }]
     }, {
         route: '/sendPromotion',
         method: 'POST',
         url: '/promotioncode/getPromotionCodeSendList',
         isJsonRaw: true,
         params: [
             {
                 name: 'auditTime',
                 type: 'String'
             }
                      ]
     }, {
         route: '/getCodeCount',
         method: 'POST',
         url: '/promotioncode/getPromotionCodeCountByStatus',
         isJsonRaw: true,
         params: [
             {
                 name: 'reqDepartment',
                 type: 'String'
             },
             {
                 name: 'name',
                 type: 'String'
             },
             {
                 name: 'batchNo',
                 type: 'Number'
             }
        ]
     }
 ]