PromotionCode.js
2.43 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
68
69
70
71
72
73
74
/**
* Created by yoho on 2016/6/20.
*/
module.exports = function (app) {
/*************************************优惠码管理*************************************/
//列表页
app.get("/marketing/promotionCode", "marketing.PromotionCode.Index", function () {
this.$extend = {
moduleName: '营销管理',
pageName: '优惠码码列表',
filter: true,
createUrl: '/market/coupon/add',
gridurl: '/market/coupon/getPromotion'
}
});
//优惠码码列表
app.post("/marketing/getPromotionCodeList", "PromotionCode_getPromotionCodeList");
//添加页
app.get("/marketing/promotionCode/add", "marketing.PromotionCode.Edit", function () {
this.$extend = {
moduleName: '营销管理',
pageName: '添加优惠码',
action: "/marketing/addPromotionCode",
type: "add",
data: {
limitTimes: "0",
reqDepartment: "零售部/营销策划",
userSourceLimit: "1",
userTypeLimit: "1",
userUseLimit: "1",
staff: "admin",
status: "0"
}
}
});
//添加限购码
app.post("/marketing/addPromotionCode", "PromotionCode_AddPromotionCode");
//编辑限购码页面渲染
app.get("/marketing/promotionCode/update/:id", "marketing.PromotionCode.Edit", function () {
this.$extend = {
moduleName: '营销管理',
pageName: '编辑优惠码',
action: "/marketing/updateLimitCode",
type: "update"
}
});
//编辑限购码
app.post("/marketing/updatePromotionCode", "PromotionCode_updatePromotionCode");
//通过、驳回、作废限购码接口
app.post("/marketing/auditPromotion", "PromotionCode_auditPromotion");
//发放
app.post("/marketing/getPromotionCodeSendList", "PromotionCode_getPromotionCodeSendList");
//tab卡数据
app.post("/marketing/getPromotionCodeCountByStatus", "PromotionCode_getPromotionCodeCountByStatus");
//查看限购码页面渲染
app.get("/marketing/promotionCode/info/:id", "marketing.PromotionCode.Edit", function () {
this.$extend = {
moduleName: '营销管理',
pageName: '优惠码详情'
}
});
//验证优惠码
app.post("/marketing/checkPromotionCode", "PromotionCode_checkPromotionCode");
};