Authored by 李靖

优惠券

'use strict';
const headerModel = require('../../../doraemon/models/header'); // 头部model
exports.index = (req, res) => {
let responseData = {
module: 'activity',
page: 'coupon-list',
pageHeader: headerModel.setNav({
navTitle: '领券中心'
}),
title: '领券中心 | Yoho!Buy有货 | 潮流购物逛不停',
width750: true,
localCss: true
};
res.render('coupon-list', Object.assign(responseData, ''));
};
... ...
... ... @@ -57,6 +57,8 @@ const freeMail = require(`${cRoot}/free-mail`);
const storeHome = require(`${cRoot}/store-home`);
const couponList = require(`${cRoot}/coupon-list`);
// routers
router.get('/demo', demo.index);
... ... @@ -292,4 +294,6 @@ router.get('/store-home/coupon', auth, storeHome.coupon); // 线下店个人中
router.get('/store-home/moreHistory', auth, storeHome.moreHistory); // 线下店个人中心-更多记录
router.get('/store-home/modify', auth, storeHome.modify); // 线下店个人中心-修改宝宝信息
router.get('/coupon-list', auth, couponList.index); // 优惠券领取页
module.exports = router;
... ...
<div class="coupon-list-page mobile-wrap yoho-page">
<div class="big-pic"></div>
<p class="big-title">全场券</p>
<div class="list-2">
<div class="list-item"></div>
<div class="list-item"></div>
<div class="list-item"></div>
<div class="list-item"></div>
<div class="list-item"></div>
</div>
<a class="get-all">点击一键领取全场券</a>
<p class="big-title">超值品牌券</p>
<div class="list-3">
<div class="list-item"></div>
<div class="list-item"></div>
<div class="list-item"></div>
<div class="list-item"></div>
<div class="list-item"></div>
</div>
<div class="list-3">
<div class="list-item"></div>
<div class="list-item"></div>
<div class="list-item"></div>
<div class="list-item"></div>
<div class="list-item"></div>
</div>
<div class="list-3">
<div class="list-item"></div>
<div class="list-item"></div>
<div class="list-item"></div>
<div class="list-item"></div>
<div class="list-item"></div>
</div>
</div>
\ No newline at end of file
... ...
import 'activity/coupon-list.page.css';
import $ from 'yoho-jquery';
import Page from 'yoho-page';
class CouponList extends Page {
constructor() {
super();
this.selector = {};
this.init();
}
init() {
this.bindEvents();
}
bindEvents() {}
}
$(() => {
new CouponList();
});
... ...
.coupon-list-page {
.big-pic {
width: 750px;
height: 363px;
background-color: #f00;
}
.big-title {
font-size: 46px;
color: #f00;
text-align: center;
line-height: 105px;
margin-top: 40px;
}
.list-2 {
font-size: 0;
line-height: 0;
padding: 0 21px;
.list-item {
width: 338px;
height: 136px;
background-color: #f00;
display: inline-block;
margin-bottom: 22px;
&:nth-child(odd) {
margin-right: 32px;
}
}
}
.get-all {
width: 290px;
height: 58px;
line-height: 58px;
color: #fff;
background-color: #000;
display: block;
margin: 0 auto;
text-align: center;
margin-top: 4px;
}
.list-3 {
font-size: 0;
line-height: 0;
padding: 0 14px;
margin-bottom: 47px;
.list-item {
width: 228px;
height: 187px;
background-color: #f00;
display: inline-block;
margin-bottom: 22px;
margin-right: 19px;
&:nth-child(3n) {
margin-right: 0;
}
}
}
}
... ...