marketing.PromotionCode.js
2.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/**
* 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");
};