marketing.LimitCode.js 2.31 KB
/**
 * Created by yoho on 2016/6/20.
 */
module.exports = function (app) {
    /*************************************限购码管理*************************************/
    //列表页
    app.get("/market/limitcode/index", "marketing.LimitCode.Index",function(){
        this.$extend={
            moduleName:'营销管理',
            pageName:'限购码列表'
        }
    });

    //限购码列表
    app.post("/limitCode/getLimitCodeList", "LimitCode_getLimitCodeList");

    //添加页
    app.get("/market/limitcode/add", "marketing.LimitCode.Edit",function(){
        this.$extend={
            moduleName:'营销管理',
            pageName:'添加限购码',
            action: "/limitCode/addLimitCode",
            type: "add"
        }
    });
    //添加限购码
    app.post("/limitCode/addLimitCode", "LimitCode_addLimitCode");

    //检查SKN的合法性并且获得其下的所有SKU
    app.post("/limitCode/checkSknValidity", "LimitCode_checkSknValidity");

    //查看限购码页面渲染
    app.get("/market/limitcode/info/:id", "marketing.LimitCode.Info","LimitCode_getLimitCode",function (data) {
        this.$extend={
            moduleName:'营销管理',
            pageName:'查看限购码',
            data:data.data
        }
    });
   
    //查看限购码
    app.post("/limitCode/getLimitCode", "LimitCode_getLimitCode");

    //修改限购码页面渲染
    app.get("/market/limitcode/update/:id", "marketing.LimitCode.Edit",function () {
        this.$extend={
            moduleName:'营销管理',
            pageName:'修改限购码',
            action: "/limitCode/updateLimitCode",
            type: "update"
        }
    });
    
    //编辑限购码页面渲染
    app.get("/market/limitcode/edit/:id", "marketing.LimitCode.Edit",function () {
        this.$extend={
            moduleName:'营销管理',
            pageName:'编辑限购码',
            action: "/limitCode/updateLimitCode",
            type: "edit"
        }
    });
   
    //编辑限购码
    app.post("/limitCode/updateLimitCode", "LimitCode_updateLimitCode");

    //通过、驳回、作废限购码接口
    app.post("/limitCode/auditLimitCode", "LimitCode_auditLimitCode");

    //限购码管理 -> tab卡数据
    app.post("/limitCode/getLimitCodeCountByStatus", "LimitCode_getLimitCodeCountByStatus");
    
};