Authored by 王水玲

单品日

/**
* 单品日
* @author: wsl<shuiling.wang@yoho.cn>
* @date: 2016/10/17
*/
'use strict';
const singleDayModel = require('../models/live');
const headerModel = require('../../../doraemon/models/header'); // 头部model
const singleDay = (req, res) => {
res.render('single-day/single-day', {
module: 'activity',
page: 'single-day',
title: '超级单品日',
pageHeader: headerModel.setNav({
navTitle: '超级单品日',
navBtn: false
}),
pageFooter: true
});
};
const getResourceData = (req, res) => {
singleDayModel.getResourceData().then((result) => {
res.json(result);
});
};
module.exports = {
singleDay,
getResourceData
};
... ...
/**
* 单品日
* @author: wsl<shuiling.wang@yoho.cn>
* @date: 2016/10/17
*/
'use strict';
const getResourceData = () => {
};
module.exports = {
getResourceData
};
... ...
... ... @@ -18,6 +18,7 @@ const couponFloor = require(`${cRoot}/coupon-floor`);
const auth = require('../../doraemon/middleware/auth');
const vipDay = require(`${cRoot}/vipDay`);
const market = require(`${cRoot}/market`);
const singleDay = require(`${cRoot}/singleDay`);
// routers
... ... @@ -82,7 +83,7 @@ router.get('/vip-day/crazy-luck', vipDay.beforeIn, vipDay.crazyLuck);
router.post('/vip-day/signin.json', vipDay.beforeIn, vipDay.signin);
router.post('/vip-day/msg/save.json', vipDay.beforeIn, vipDay.saveMsg);
router.get('/vip-day/msg/fetch.json', vipDay.fetchMsg);
router.get('/single-day', singleDay.singleDay);
module.exports = router;
... ...
<div class="single-day-page yoho-page">
<div class="banner"></div>
<div class="swiper-tab">
<ul class="swiper-wrapper">
<li class="swiper-slide active">联名限定</li>
<li class="swiper-slide">首发</li>
<li class="swiper-slide">热卖</li>
<li class="swiper-slide">明星单品</li>
</ul>
</div>
<div class="product-list">
<ul>
<li>
<img src=""/>
<div class="product-info">
<h3>AVIREX L-2 PATCH YING TIGERS男款上海别注夹克</h3>
<p class="prompt-info">下单后25个工作日发货</p>
<p class="price"><span class="sale-price">¥589</span><span class="market-price">¥1234</span></p>
<p class="info-txt">#Yoho!Buy限定联名T恤#</p>
</div>
</li>
</ul>
</div>
</div>
... ...
/**
* 单品日
* @author: wsl<shuiling.wang@yoho.cn>
* @date: 2016/10/17
*/
// var $ = require('yoho-jquery'),
var Swiper = require('yoho-swiper');
new Swiper('.swiper-tab', {
slidesPerView: 'auto'
});
... ...
... ... @@ -2,6 +2,7 @@
@import "vip_day/index";
@import "student";
@import "market/index";
@import "single-day";
.receive-coupon-page {
* {
... ... @@ -9,16 +10,19 @@
padding: 0;
font-size: 14px;
}
.bg-contain {
width: 100%;
height: 100%;
position: absolute;
background: #c4211a;
img {
width: 100%;
height: auto;
}
}
.page {
width: 100%;
height: auto;
... ... @@ -27,6 +31,7 @@
top: 0;
bottom: 0;
}
.coupon-centent,
.gain-coupon-centent {
margin-top: 428px !important;
... ... @@ -37,8 +42,10 @@
overflow: hidden;
border-radius: 0.3rem;
}
.coupon-centent {
position: relative;
.title {
position: absolute;
top: 40px;
... ... @@ -48,16 +55,19 @@
height: 57px;
background: url("../img/coupon/coupon-title.png");
}
.under-title {
position: absolute;
top: 100px;
width: 100%;
height: 463px;
}
.input-content {
height: 206px;
margin: 30px 30px 0;
position: relative;
input {
height: 88px;
width: 100%;
... ... @@ -70,6 +80,7 @@
text-align: center;
outline: none;
}
div {
height: 88px;
width: 100%;
... ... @@ -80,12 +91,14 @@
color: #e0e0e0;
line-height: 88px;
}
.verification-code,
.get {
background: #fff;
color: #444;
}
}
.clear-input {
position: absolute;
padding: 10px;
... ... @@ -95,11 +108,13 @@
color: #666;
z-index: 1;
}
.coupon-description {
width: 100%;
height: 136px;
position: relative;
background: url("../img/coupon/coupon-footer.png");
span {
position: absolute;
bottom: 0;
... ... @@ -109,6 +124,7 @@
}
}
}
.gain-coupon-centent {
p {
width: 100%;
... ... @@ -118,11 +134,13 @@
color: #fff;
font-size: 17px;
}
p.phone {
margin-top: 10px;
font-size: 30px;
font-weight: bold;
}
.coupon {
padding-top: 50px;
width: 90%;
... ... @@ -130,10 +148,12 @@
height: 220px;
background: #9d1a15;
}
.coupon img {
width: 100%;
height: auto;
}
.use-coupon-btn {
height: 88px;
line-height: 88px;
... ... @@ -143,6 +163,7 @@
text-align: center;
border-radius: 4px;
}
span {
font-weight: bold;
display: inline-block;
... ... @@ -154,11 +175,13 @@
margin: 0 40%;
background: url("../img/coupon/activity-description.png");
}
a {
color: #fff;
font-size: 28px;
}
}
.dialog {
width: 84%;
height: 410px;
... ... @@ -169,6 +192,7 @@
top: 235px;
z-index: 2;
}
.dialog .close {
width: 40px;
height: 40px;
... ... @@ -181,13 +205,16 @@
line-height: 40px;
text-align: center;
}
.hidden {
display: none;
}
.phone-error {
text-align: center;
line-height: 14rem;
}
.mask {
width: 100%;
height: 100%;
... ... @@ -199,11 +226,13 @@
left: 0;
z-index: 1;
}
.activity-message {
width: 100%;
height: 410px;
overflow: scroll;
}
.activity-message h3 {
width: 100%;
height: 40px;
... ... @@ -213,6 +242,7 @@
font-size: 32px;
text-align: center;
}
.activity-message p {
width: 85%;
height: auto;
... ... @@ -223,6 +253,7 @@
padding-left: 26px;
text-indent: -26px;
}
.messages {
width: 84%;
height: 4rem;
... ... @@ -235,10 +266,12 @@
z-index: 2;
color: #fff;
}
.messages p {
line-height: 4rem;
font-size: 24px;
}
.tip-wrap {
width: 100%;
height: 100%;
... ... @@ -248,6 +281,7 @@
left: 0;
z-index: 3;
}
.tip {
width: 100%;
height: 100%;
... ... @@ -255,6 +289,7 @@
position: absolute;
top: 0;
left: 0;
.header {
width: 170px;
height: 170px;
... ... @@ -263,6 +298,7 @@
margin-right: auto;
background: url("../img/coupon/unfortunately.png");
}
.title {
margin-top: 30px;
font-size: 28px;
... ... @@ -271,6 +307,7 @@
margin-left: auto;
margin-right: auto;
}
.logo {
width: 391px;
height: 78px;
... ... @@ -279,10 +316,12 @@
margin-right: auto;
background: url("../img/coupon/logo.png");
}
.desc {
font-size: 24px;
color: #444;
}
.button {
display: block;
margin: 30px auto;
... ...
.single-day-page {
.banner {
width: 100%;
height: 235px;
}
.swiper-tab {
height: 86px;
border-bottom: 1px solid #e0e0e0;
border-top: 1px solid #e0e0e0;
ul {
margin-top: 28px;
}
li {
float: left;
padding: 0 45px;
border-right: 1px solid #e0e0e0;
height: 30px;
line-height: 30px;
color: #b0b0b0;
width: auto;
}
li:last-child {
border-right: none;
}
.active {
color: #444;
}
}
.product-list {
ul {
width: 614px;
margin-left: 25px;
padding-top: 25px;
height: auto;
overflow: hidden;
}
li {
img {
width: 274px;
height: 368px;
float: left;
margin-right: 25px;
}
}
.product-info {
width: 314px;
height: 378px;
float: left;
position: relative;
border-bottom: 1px solid #e8e8e8;
}
h3 {
margin-top: 43px;
font-size: 24px;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
.prompt-info {
font-size: 20px;
margin-top: 28px;
color: #d11226;
}
.price {
margin-top: 50px;
}
.sale-price {
font-size: 20px;
color: #d11226;
}
.market-price {
font-size: 20px;
color: #a1a1a1;
text-decoration: line-through;
margin-left: 14px;
}
.info-txt {
position: absolute;
top: 298px;
font-size: 20px;
}
}
}
... ...