Blame view

server/controllers/operations.activitytemplate.js 2.72 KB
weiqingting authored
1 2 3 4 5 6 7
/**
 * Created by ty on 2016/7/4.
 * 活动模板管理
 */

module.exports=function(app) {
dongjunjie authored
8 9 10 11 12 13 14
    /*活动模板首页*/
    app.get("/operations/activitytemplate/index","operations.activitytemplate.Index", function () {
        this.$extend = {
            moduleName: "活动模板管理",
            pageName: "活动模板管理"
        }
    });
weiqingting authored
15
    
dongjunjie authored
16 17 18 19 20 21 22 23 24 25
    /*活动模板添加页*/
    app.get("/operations/activitytemplate/add","operations.activitytemplate.Edit", "resourceManage_getUrlAction", function (response) {
        this.$extend = {
            moduleName: "活动模板管理",
            pageName: "添加活动模板",
            type: "add",
            url: "/activityTemplate/addTemplate",
            data: response.data
        }
    });
weiqingting authored
26
    
dongjunjie authored
27 28 29 30 31 32 33 34 35 36 37
    /*活动模板编辑*/
    app.get("/operations/activitytemplate/edit/:id","operations.activitytemplate.Edit","resourceManage_getUrlAction", function (response,req) {
        this.$extend = {
            moduleName: "活动模板管理",
            pageName: "编辑活动模板",
            type: "edit",
            id: req.params.id,
            url: "/activityTemplate/updateTemplate",
            data: response.data
        }
    });
weiqingting authored
38
    
dongjunjie authored
39 40 41 42 43 44 45 46 47
    /*活动模板编辑*/
    app.get("/operations/activitytemplate/product/:id","operations.activitytemplate.Product", function (req) {
        this.$extend = {
            moduleName: "模板商品管理",
            pageName: "模板商品管理",
            id: req.params.id,
            url: req.originalUrl
        }
    });
weiqingting authored
48
    
dongjunjie authored
49 50
    /*查询模板列表接口*/
    app.post("/activityTemplate/selectTemplateList","activitytemplate_selectTemplateList");
weiqingting authored
51
    
dongjunjie authored
52 53
    /*添加模板接口*/
    app.post("/activityTemplate/addTemplate","activitytemplate_addTemplate");
weiqingting authored
54
    
dongjunjie authored
55 56
    /*获取单个模板接口*/
    app.post("/activityTemplate/getTemplate","activitytemplate_getTemplate");
weiqingting authored
57
    
dongjunjie authored
58 59
    /*更新模板接口*/
    app.post("/activityTemplate/updateTemplate","activitytemplate_updateTemplate");
weiqingting authored
60
    
dongjunjie authored
61 62
    /*开启模板接口*/
    app.post("/activityTemplate/publishTemplate","activitytemplate_publishTemplate");
weiqingting authored
63
    
dongjunjie authored
64 65
    /*关闭模板接口*/
    app.post("/activityTemplate/closeTemplate","activitytemplate_closeTemplate");
weiqingting authored
66
    
dongjunjie authored
67 68
    /*根据条件查询活动商品列表接口*/
    app.post("/activityTemplate/getProductListByCondition","activitytemplate_getProductListByCondition");
weiqingting authored
69
    
dongjunjie authored
70 71
    /*插入活动商品信息接口*/
    app.post("/activityTemplate/insertProduct","activitytemplate_insertProduct");
weiqingting authored
72
    
dongjunjie authored
73 74
    /*更新商品信息接口*/
    app.post("/activityTemplate/updateProduct","activitytemplate_updateProduct");
weiqingting authored
75
    
dongjunjie authored
76 77
    /*删除商品信息接口*/
    app.post("/activityTemplate/delOneProduct","activitytemplate_delOneProduct");
weiqingting authored
78
}