marketing.PromotionCode.js 2.2 KB
/**
 * Created by yoho on 2016/6/20.
 */
module.exports = function (app) {

    /*************************************优惠码管理*************************************/
    //列表页
    app.get("/market/coupon/index", "marketing.PromotionCode.Index", function () {
        this.$extend = {
            moduleName: '营销管理',
            pageName: '优惠码列表',
            createUrl: '/market/coupon/add'
        }
    });

    //优惠码码列表
    app.post("/market/coupon/getPromotion", "PromotionCode_getPromotionCodeList");
    //单个优惠码
    app.post("/market/coupon/getPromotionCode", "PromotionCode_getPromotionCode");

    //添加页
    app.get("/market/coupon/add", "marketing.PromotionCode.Edit", function () {
        this.$extend = {
            moduleName: '营销管理',
            pageName: '添加优惠码',
            action: "/market/coupon/addCode",
            type: "add"
        }
    });
    //添加限购码
    app.post("/market/coupon/addCode", "PromotionCode_addPromotionCode");

    //编辑限购码页面渲染
    app.get("/market/coupon/update/:id", "marketing.PromotionCode.Edit","PromotionCode_getPromotionCode", function (data) {
        this.$extend = {
            moduleName: '营销管理',
            pageName: '编辑优惠码',
            action: "/market/coupon/updateCode",
            type: "update",
            data:data.data
        }
    });
    //编辑限购码
    app.post("/market/coupon/updateCode", "PromotionCode_updatePromotionCode");

    //通过、驳回、作废限购码接口
    app.post("/market/coupon/auditPromotion", "PromotionCode_auditPromotionCode");

    //发放
    app.post("/market/coupon/sendPromotion", "PromotionCode_getPromotionCodeSendList");

    //tab卡数据
    app.post("/market/coupon/getCodeCount", "PromotionCode_getPromotionCodeCountByStatus");

    //查看限购码页面渲染
    app.get("/market/coupon/info/:id", "marketing.PromotionCode.Edit", function () {
        this.$extend = {
            moduleName: '营销管理',
            pageName: '优惠码详情',
            type: "info"
        }
    });
    //验证优惠码
    app.post("/market/coupon/checkPromotionCode", "PromotionCode_checkPromotionCode");


};