Authored by 陈轩

红人馆 优惠券

@@ -299,6 +299,19 @@ const shop = { @@ -299,6 +299,19 @@ const shop = {
299 _noLazy: true 299 _noLazy: true
300 }); 300 });
301 }).catch(next); 301 }).catch(next);
  302 + },
  303 +
  304 + /**
  305 + * 红人店铺
  306 + */
  307 + redShop(req, res, next) {
  308 + res.render('newshop/shop-reds', {
  309 + width750: true,
  310 + localCss: true,
  311 + module: 'product',
  312 + page: 'reds-shop',
  313 + time3: [0, 1, 2]
  314 + });
302 } 315 }
303 }; 316 };
304 317
@@ -142,6 +142,8 @@ router.get('/index/baseShopFav', newShop.baseShopFav); @@ -142,6 +142,8 @@ router.get('/index/baseShopFav', newShop.baseShopFav);
142 router.get('/index/brandFav', newShop.brandFav); 142 router.get('/index/brandFav', newShop.brandFav);
143 router.get('/new/shop/hotlist', newShop.shopHotList); 143 router.get('/new/shop/hotlist', newShop.shopHotList);
144 144
  145 +router.get('/red_shop', newShop.redShop);
  146 +
145 // end- 店铺重构 147 // end- 店铺重构
146 148
147 // 店铺介绍 149 // 店铺介绍
  1 +{{!--
  2 + desc: 红人店铺
  3 +--}}
  4 +<div class="reds-shop">
  5 + {{!--shop-header--}}
  6 + <div class="shop-header">
  7 + <img class="banner" src="//img13.static.yhbimg.com/yhb-img02/2016/10/17/13/0293f85c7e6ddeab19791d44765f240b34.jpg?imageView2/2/interlace/1/q/60" alt="banner">
  8 + <div class="shop-info">
  9 + <img class="logo" src="//img10.static.yhbimg.com/yhb-img01/2016/03/24/15/01ef24d3ec4caabd8c416901cdf4739917.jpg?imageMogr2/thumbnail/500x500/extent/500x500/background/d2hpdGU=/position/center/quality/60" alt="logo">
  10 + <div class="shop-info-base">
  11 + <h1 class="shopname">vans</h1>
  12 + <div class="favs">粉丝数: 534 <i class="iconfont favs-btn like">&#xe605;</i></div>
  13 + </div>
  14 + <div class="shop-intro">
  15 + <div class="line-clamp-2">这里是介绍这里是介绍这里是介绍这里是介绍这里是介绍这里是介绍这里是介绍这里是介绍这里是介绍这里是介绍这里是介绍</div>
  16 + <div class="shop-intro-folder">
  17 + <i class="iconfont">&#xe616;</i>
  18 + </div>
  19 + </div>
  20 + </div>
  21 + </div>
  22 + {{!--shop-tab-nav: 红人首页 | 全部商品--}}
  23 + <div>
  24 +
  25 + </div>
  26 +
  27 + {{!--shop-tab: 红人首页--}}
  28 + <div class="">
  29 + <div class="shop-coupon coupon-content">
  30 + {{#each time3}}
  31 + <div class="coupon-small">
  32 + <div class="coupon-left">
  33 + <span class="coupon-left-price">
  34 + <span class="coupon-sign">¥</span>
  35 + <span class="coupon-price">88</span>
  36 + </span>
  37 + <span class="coupon-left-name">
  38 + VANS圣诞礼券:满588减88
  39 + </span>
  40 + </div>
  41 + <div class="coupon-right receive-btn">
  42 + 立即领取
  43 + </div>
  44 + </div>
  45 + {{/each}}
  46 + </div>
  47 + <div class="shop-swiper">
  48 +
  49 + </div>
  50 +
  51 + {{!--视屏--}}
  52 + <div class="shop-video shop-section">
  53 + <header>
  54 + <i class="section-more iconfont">&#xe606;</i>
  55 + <h4 class="section-title">视屏直播</h4>
  56 + </header>
  57 + <div class="video-player">
  58 + <div class="video-poster"></div>
  59 + </div>
  60 + <div class="video-intro">
  61 + <h6 class="video-title">这是视屏标题</h6>
  62 + <p class="text-line-2">这是视屏内容这是视屏内容这是视屏内容这是视屏内容这是视屏内容这是视屏内容这是视屏内容这是视屏内容</p>
  63 + </div>
  64 + </div>
  65 +
  66 + {{!--人气单品--}}
  67 + <div class="shop-hot shop-section">
  68 + <header>
  69 + {{!--<i class="section-more iconfont">&#xe606;</i>--}}
  70 + <h4 class="section-title">人气单品</h4>
  71 + </header>
  72 + <div class="section-content">
  73 + <div class="items-s1">
  74 + {{> item}}
  75 + </div>
  76 + <div class="items-s2">
  77 + {{> item}}
  78 + </div>
  79 + {{!--风格: 3图2列, 大图 在左--}}
  80 + <div class="items-3-2 items-3-2-left">
  81 + {{#each time3}}
  82 + {{> item}}
  83 + {{/each}}
  84 + </div>
  85 + </div>
  86 + {{!--风格: 3图2列, 大图 在右--}}
  87 + <div class="items-3-2 items-3-2-right">
  88 + {{#each time3}}
  89 + {{> item}}
  90 + {{/each}}
  91 + </div>
  92 +
  93 + <div class="shop-item-div"></div>
  94 + <div class="items-s1">
  95 + {{> item}}
  96 + </div>
  97 +
  98 + {{!--风格: 3图 3列--}}
  99 + <div class="items-3-3">
  100 + {{#each time3}}
  101 + {{> item}}
  102 + {{/each}}
  103 + </div>
  104 +
  105 +
  106 + <div class="items-c2">
  107 + {{#each time3}}
  108 + {{> item}}
  109 + {{/each}}
  110 + </div>
  111 +
  112 + {{!--风格: 3图 3列--}}
  113 + <div class="items-3-3 items-small">
  114 + {{#each time3}}
  115 + {{> item}}
  116 + {{/each}}
  117 + {{#each time3}}
  118 + {{> item}}
  119 + {{/each}}
  120 + </div>
  121 + </div>
  122 + </div>
  123 + {{!--shop-tab: 全部商品--}}
  124 + <div></div>
  125 +</div>
  126 +
  127 +
  128 +
  129 +{{#*inline 'item'}}
  130 +<div class="item">
  131 + <img class="item-pic" src="http://img1.gamersky.com/image2016/12/20161224_zl_91_3/gamersky_02origin_03_201612241718D33.jpg" alt="">
  132 + <div class="item-info">
  133 + <div class="">
  134 + ABCDEFG ABCDEFG
  135 + </div>
  136 + <div>
  137 + <span class="new-price">¥ 199.00</span>
  138 + <span class="price">¥ 299.00</span>
  139 + </div>
  140 + </div>
  141 +</div>
  142 +{{/inline}}
  1 +<div class="item">
  2 + <img class="item-pic" src="http://img1.gamersky.com/image2016/12/20161224_zl_91_3/gamersky_02origin_03_201612241718D33.jpg" alt="">
  3 + <div class="item-info">
  4 + <div class="">
  5 + ABCDEFG ABCDEFG
  6 + </div>
  7 + <div>
  8 + <span class="new-price">¥ 199.00</span>
  9 + <span class="price">¥ 299.00</span>
  10 + </div>
  11 + </div>
  12 +</div>
  1 +require('product/shop/redshop.page.css');
  1 +.relative {
  2 + position: relative;
  3 +}
  4 +
1 .text-left { 5 .text-left {
2 text-align: left; 6 text-align: left;
3 } 7 }
@@ -41,20 +45,20 @@ @@ -41,20 +45,20 @@
41 -webkit-line-clamp: 2; 45 -webkit-line-clamp: 2;
42 overflow: hidden; 46 overflow: hidden;
43 text-overflow: ellipsis; 47 text-overflow: ellipsis;
44 - -webkit-box-orient: vertical 48 + -webkit-box-orient: vertical;
45 } 49 }
46 50
47 .vh-center { 51 .vh-center {
48 text-align: center; 52 text-align: center;
49 53
50 - > *, 54 + > *,
51 &:before { 55 &:before {
52 display: inline-block; 56 display: inline-block;
53 vertical-align: middle; 57 vertical-align: middle;
54 } 58 }
55 59
56 &:before { 60 &:before {
57 - content: ''; 61 + content: "";
58 width: 0; 62 width: 0;
59 height: 100%; 63 height: 100%;
60 line-height: 100%; 64 line-height: 100%;
  1 +.shop-header {
  2 + .banner {
  3 + height: 234px;
  4 + }
  5 +}
  6 +
  7 +.shop-info {
  8 + position: relative;
  9 + padding-right: 30px;
  10 + padding-left: 30px;
  11 +
  12 + .logo {
  13 + position: absolute;
  14 + top: -40px;
  15 + width: 120px;
  16 + height: 120px;
  17 + box-shadow: 0 0 2px 1px #dedede;
  18 + }
  19 +
  20 + .shopname {
  21 + font-size: 32px;
  22 + color: #444;
  23 + margin-left: 180px;
  24 + }
  25 +
  26 + .favs-btn {
  27 + margin-left: 30px;
  28 +
  29 + &.like {
  30 + color: #e33333;
  31 + }
  32 + }
  33 +}
  34 +
  35 +.shop-info-base {
  36 + display: flex;
  37 + justify-content: space-between;
  38 + line-height: 1;
  39 + padding-top: 38px;
  40 + padding-bottom: 35px;
  41 +}
  42 +
  43 +.shop-intro {
  44 + font-size: 28px;
  45 + color: #444;
  46 +}
  47 +
  48 +.shop-intro-folder {
  49 + margin-top: 26px;
  50 + margin-bottom: 24px;
  51 + text-align: center;
  52 + font-size: 18px;
  53 + line-height: 1;
  54 +}
  1 +/*
  2 + 红人首页
  3 +*/
  4 +.shop-section {
  5 + header {
  6 + font-size: 32px;
  7 + font-weight: bold;
  8 + color: #444;
  9 + line-height: 80px;
  10 + padding-right: 30px;
  11 + padding-left: 30px;
  12 + background-color: #f0f0f0;
  13 + }
  14 +
  15 + .section-title {
  16 + text-align: center;
  17 + }
  18 +
  19 + .section-more {
  20 + font-size: 40px;
  21 + color: #a9a9a9;
  22 + float: right;
  23 + }
  24 +}
  25 +
  26 +.shop-coupon {
  27 + padding-right: 30px;
  28 + background-color: #f0f0f0;
  29 + white-space: nowrap;
  30 + overflow-x: auto;
  31 +
  32 + .coupon-small {
  33 + float: none;
  34 + display: inline-block !important;
  35 + white-space: normal;
  36 + }
  37 +}
  38 +
  39 +.shop-swiper {
  40 + height: 234px;
  41 +}
  42 +
  43 +.shop-video {
  44 + .video-player {
  45 + height: 363px;
  46 + }
  47 +
  48 + .video-intro {
  49 + padding: 30px;
  50 + }
  51 +
  52 + .video-title {
  53 + font-size: 36px;
  54 + color: #444;
  55 + margin-bottom: 30px;
  56 + }
  57 +
  58 + .video-desc {
  59 + font-size: 28px;
  60 + color: #444;
  61 + }
  62 +}
  63 +
  64 +.shop-hot {
  65 + .item {
  66 + position: relative;
  67 + }
  68 +
  69 + .item-pic {
  70 + width: 100%;
  71 + height: 100%;
  72 + }
  73 +
  74 + .item-info {
  75 + position: absolute;
  76 + bottom: 0;
  77 + width: 100%;
  78 + padding-left: 20px;
  79 + padding-right: 20px;
  80 + color: #fff;
  81 + }
  82 +
  83 + .items-s1 {
  84 + position: relative;
  85 + background-color: #fff;
  86 + margin: 30px;
  87 +
  88 + .item-info {
  89 + font-size: 28px;
  90 + overflow: hidden;
  91 + text-overflow: ellipsis;
  92 + white-space: nowrap;
  93 + }
  94 + }
  95 +
  96 + .items-s2 {
  97 + font-size: 24px;
  98 + position: relative;
  99 +
  100 + .item {
  101 + height: 234px;
  102 + }
  103 +
  104 + .item-info {
  105 + height: 70px;
  106 + display: flex;
  107 + justify-content: space-between;
  108 + align-items: center;
  109 + background-color: rgba(0, 0, 0, 0.5);
  110 + }
  111 + }
  112 +
  113 + .items-3-2 {
  114 + font-size: 18px;
  115 + overflow: hidden;
  116 +
  117 + .item {
  118 + width: 50%;
  119 + height: 234px;
  120 + }
  121 +
  122 + .item:first-child {
  123 + height: 468px;
  124 + }
  125 +
  126 + .item-info {
  127 + display: flex;
  128 + justify-content: space-between;
  129 + align-items: center;
  130 + }
  131 + }
  132 +
  133 + .items-3-2-left .item { float: left; }
  134 +
  135 + .items-3-2-right .item { float: right; }
  136 +
  137 + /* 风格: 3图 3列 */
  138 + .items-3-3 {
  139 + overflow: hidden;
  140 + font-size: 18px;
  141 +
  142 + .item {
  143 + float: left;
  144 + width: 33.3333333333%;
  145 + height: 333px;
  146 + }
  147 +
  148 + .item-info {
  149 + height: 80px;
  150 + display: flex;
  151 + flex-direction: column;
  152 + justify-content: center;
  153 + background-color: rgba(0, 0, 0, 0.5);
  154 + }
  155 + }
  156 +
  157 + .items-small {
  158 + .item {
  159 + height: 250px;
  160 + }
  161 +
  162 + .item-info {
  163 + height: 48px;
  164 + }
  165 + }
  166 +
  167 + .items-c2 {
  168 + overflow: hidden;
  169 + font-size: 20px;
  170 +
  171 + .item {
  172 + float: left;
  173 + width: 50%;
  174 + height: 375px;
  175 + }
  176 +
  177 + .item-info {
  178 + height: 90px;
  179 + display: flex;
  180 + flex-direction: column;
  181 + justify-content: center;
  182 + background-color: rgba(0, 0, 0, 0.5);
  183 + }
  184 + }
  185 +}
  186 +
  187 +.shop-item-div {
  188 + height: 30px;
  189 + background-color: #f0f0f0;
  190 +}
  1 +@charset "utf-8";
  2 +
  3 +@import "shop-index-coupon";
  4 +@import "reds-shop/header";
  5 +@import "reds-shop/section";