Authored by weiqingting

update

@@ -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 };
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
6 <div class="qrcode yoho-page"> 6 <div class="qrcode yoho-page">
7 7
8 <h2 class='qrcode-title'>2016 非常潮流盛世 YO'HOOD门票(限量){{ticks.length}}</h2> 8 <h2 class='qrcode-title'>2016 非常潮流盛世 YO'HOOD门票(限量){{ticks.length}}</h2>
9 - <p class='qrcode-tip'>提示:凭借二维码入场,每场二维码只可使用一次,请妥善保管。</p> 9 + <p class='qrcode-tip'>提示:凭借二维码入场,每场二维码只可使用一次,请妥善保管;</p>
10 <div class='qrcode-wrap'> 10 <div class='qrcode-wrap'>
11 11
12 <p class='qrcode-pages'><a class='pagec'>1</a>/{{ticks.length}}</p> 12 <p class='qrcode-pages'><a class='pagec'>1</a>/{{ticks.length}}</p>

47.3 KB | W: | H:

47.7 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
@@ -3,7 +3,7 @@ var Swiper = require('yoho-swiper'); @@ -3,7 +3,7 @@ var Swiper = require('yoho-swiper');
3 var mySwiper; 3 var mySwiper;
4 4
5 mySwiper = new Swiper('.swiper-container', { 5 mySwiper = new Swiper('.swiper-container', {
6 - onSlideChangeEnd: function(swiper) { 6 + onSlideChangeStart: function(swiper) {
7 $('.pagec').html(swiper.snapIndex + 1); 7 $('.pagec').html(swiper.snapIndex + 1);
8 } 8 }
9 }); 9 });
@@ -8,6 +8,9 @@ @@ -8,6 +8,9 @@
8 .qrcode-tip { 8 .qrcode-tip {
9 font-size: 20px; 9 font-size: 20px;
10 color: #c6c6c6; 10 color: #c6c6c6;
  11 + background-image: url("../img/channel/tip.png") ;
  12 + background-size: 20px 20px;
  13 + padding-left:30px;
11 } 14 }
12 15
13 .qrcode-say { 16 .qrcode-say {
@@ -43,6 +46,9 @@ @@ -43,6 +46,9 @@
43 text-align: center; 46 text-align: center;
44 padding: 30px 0; 47 padding: 30px 0;
45 letter-spacing: 4px; 48 letter-spacing: 4px;
  49 + font-size:28px;
  50 +
  51 +
46 } 52 }
47 53
48 .swiper-container { 54 .swiper-container {