coupon.js
3.76 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
/**
* 桩数据
* @author h1bomb
*/
module.exports = {
'/promotioncode/getPromotionCodeList': function(req, res) {
res.json({
code: 200,
data: [{
batchNo: 'DFX100332SXX',
code: 'DFX100332SXX',
id: 1,
name: '50元优惠券',
limitTimes: 10,
reqDepartment: '零售部/运营部',
limitDateFrom: '2016-01-16 00:00:00',
limitDateTo: '2016-01-20 00:00:00',
describe: '新注册用户全场满200减50',
staff: '李四',
status: 0
}, {
batchNo: 'DFX100332SXX',
code: 'DFX100333SXX',
id: 2,
name: '50元优惠券',
limitTimes: 10,
reqDepartment: '零售部/运营部',
limitDateFrom: '2016-01-16 00:00:00',
limitDateTo: '2016-01-20 00:00:00',
describe: '新注册用户全场满200减50',
staff: '李四',
status: 1
}, {
batchNo: 'DFX100332SXX',
code: 'DFX100334SXX',
id: 3,
name: '50元优惠券',
limitTimes: 10,
reqDepartment: '零售部/运营部',
limitDateFrom: '2016-01-16 00:00:00',
limitDateTo: '2016-01-20 00:00:00',
describe: '新注册用户全场满200减50',
staff: '李四',
status: 2
}, {
batchNo: 'DFX100332SXX',
code: 'DFX100335SXX',
id: 4,
name: '50元优惠券',
limitTimes: 10,
reqDepartment: '零售部/运营部',
limitDateFrom: '2016-01-16 00:00:00',
limitDateTo: '2016-01-20 00:00:00',
describe: '新注册用户全场满200减50',
staff: '李四',
status: 3
}, {
batchNo: 'DFX100332SXX',
code: 'DFX100332SXX',
id: 5,
name: '50元优惠券',
limitTimes: 10,
reqDepartment: '零售部/运营部',
limitDateFrom: '2016-01-16 00:00:00',
limitDateTo: '2016-01-20 00:00:00',
describe: '新注册用户全场满200减50',
staff: '李四',
status: 4
}]
});
return;
},
'/promotioncode/getPromotionCode':function(req,res){
var result={
"id": 1,
"name": "全场8折",
"limitTimes": 1000,
"code": "DFX100332SXX",
"reqDepartment": "零售运营部/类目运营",
"describe": "全场8折",
"promotionInfo":'{"type": "2", "condition": {"amount_at_least": "100", "count_at_least": "1"}, "action": {"discount": "0.88","discount_at_most": "100"}}',
"userUseLimit": 2,
"userSourceLimit": "2",
"userTypeLimit": "2",
"creatorId": 123456,
"limitDateFrom": "2015-12-23 12:20:00",
"limitDateTo": "2015-16-23 12:20:00",
"createTime": "2016-01-09 12:20:00",
"staff":"李四",
"state":0
}
res.json({code:"200",data:result,message:"操作成功"});
},
'/cmd':function(req,res){
res.json({
"code": 200,
"message": "修改成功!"
});
},
'/promotioncode/checkPromotionCode':function(req,res){
res.json({
"code": 200,
"data":[{code:"xxxxx",flag:"1"}],
"message": "修改成功!"
});
}
}