|
@@ -11,7 +11,51 @@ const QRcodeModel = require('../models/qrcode'); |
|
@@ -11,7 +11,51 @@ const QRcodeModel = require('../models/qrcode'); |
11
|
exports.QRcode = (req, res, next) => {
|
11
|
exports.QRcode = (req, res, next) => {
|
12
|
let id = req.params.id || 0;
|
12
|
let id = req.params.id || 0;
|
13
|
|
13
|
|
14
|
- QRcodeModel.getQRcodeData(id, req.user.uid).then((result)=>{
|
14
|
+ // QRcodeModel.getQRcodeData(id, req.user.uid).then((result)=>{
|
|
|
15
|
+ let result={
|
|
|
16
|
+ "ticks": [{
|
|
|
17
|
+ "ticket_code":"8611779901",
|
|
|
18
|
+ "qr_image":"http://img11.static.yhbimg.com/yhb-img01/2016/07/28/08/017bd1eb95613aef7424c0998ee9bc88c9.jpg?imageView2/2/w/185/h/248/q/70",
|
|
|
19
|
+ "passkit":"Y",
|
|
|
20
|
+ //门票类型,1展览票 2套票
|
|
|
21
|
+ "ticket_type":"2",
|
|
|
22
|
+ //座位号
|
|
|
23
|
+ "seat_no":"A区1排座",
|
|
|
24
|
+ //入场时间
|
|
|
25
|
+ "entrance_time":"9月16 10:00"
|
|
|
26
|
+ },{
|
|
|
27
|
+ "ticket_code":"8611779901",
|
|
|
28
|
+ "qr_image":"http://img11.static.yhbimg.com/yhb-img01/2016/07/28/08/017bd1eb95613aef7424c0998ee9bc88c9.jpg?imageView2/2/w/185/h/248/q/70",
|
|
|
29
|
+ "passkit":"Y",
|
|
|
30
|
+ //门票类型,1展览票 2套票
|
|
|
31
|
+ "ticket_type":"2",
|
|
|
32
|
+ //座位号
|
|
|
33
|
+ "seat_no":"A区1排座",
|
|
|
34
|
+ //入场时间
|
|
|
35
|
+ "entrance_time":"9月16 10:00"
|
|
|
36
|
+ },{
|
|
|
37
|
+ "ticket_code":"8611779901",
|
|
|
38
|
+ "qr_image":"http://img11.static.yhbimg.com/yhb-img01/2016/07/28/08/017bd1eb95613aef7424c0998ee9bc88c9.jpg?imageView2/2/w/185/h/248/q/70",
|
|
|
39
|
+ "passkit":"Y",
|
|
|
40
|
+ //门票类型,1展览票 2套票
|
|
|
41
|
+ "ticket_type":"2",
|
|
|
42
|
+ //座位号
|
|
|
43
|
+ "seat_no":"A区1排座",
|
|
|
44
|
+ //入场时间
|
|
|
45
|
+ "entrance_time":"9月16 10:00"
|
|
|
46
|
+ },{
|
|
|
47
|
+ "ticket_code":"8611779901",
|
|
|
48
|
+ "qr_image":"http://img11.static.yhbimg.com/yhb-img01/2016/07/28/08/017bd1eb95613aef7424c0998ee9bc88c9.jpg?imageView2/2/w/185/h/248/q/70",
|
|
|
49
|
+ "passkit":"Y",
|
|
|
50
|
+ //门票类型,1展览票 2套票
|
|
|
51
|
+ "ticket_type":"2",
|
|
|
52
|
+ //座位号
|
|
|
53
|
+ "seat_no":"A区1排座",
|
|
|
54
|
+ //入场时间
|
|
|
55
|
+ "entrance_time":"9月16 10:00"
|
|
|
56
|
+ }],
|
|
|
57
|
+ "title": "FURY ANIMALS Normal迷彩系列BUNNY短袖TEE"
|
|
|
58
|
+ };
|
15
|
if (result) {
|
59
|
if (result) {
|
16
|
result.ticks = result.ticks.map(item=>{
|
60
|
result.ticks = result.ticks.map(item=>{
|
17
|
if (+item.ticket_type === 2) {
|
61
|
if (+item.ticket_type === 2) {
|
|
@@ -26,5 +70,5 @@ exports.QRcode = (req, res, next) => { |
|
@@ -26,5 +70,5 @@ exports.QRcode = (req, res, next) => { |
26
|
};
|
70
|
};
|
27
|
|
71
|
|
28
|
res.render('QRcode', vm);
|
72
|
res.render('QRcode', vm);
|
29
|
- }).catch(next);
|
73
|
+ // }).catch(next);
|
30
|
}; |
74
|
}; |