Authored by 徐炜

APP下载页面

  1 +'use strict';
  2 +
  3 +module.exports = {
  4 + index: (req, res) => {
  5 + res.render('app-downloads', {
  6 + localCss: true
  7 + });
  8 + }
  9 +};
@@ -29,7 +29,7 @@ const share = require(`${cRoot}/share`); @@ -29,7 +29,7 @@ const share = require(`${cRoot}/share`);
29 const aliCloud = require(`${cRoot}/ali-cloud`); 29 const aliCloud = require(`${cRoot}/ali-cloud`);
30 const studentMarket = require(`${cRoot}/student-market`); 30 const studentMarket = require(`${cRoot}/student-market`);
31 const individuation = require(`${cRoot}/individuation`); 31 const individuation = require(`${cRoot}/individuation`);
32 - 32 +const appDownloads = require(`${cRoot}/app-downloads`);
33 const redbag = require(`${cRoot}/redbag`); 33 const redbag = require(`${cRoot}/redbag`);
34 34
35 // routers 35 // routers
@@ -136,4 +136,6 @@ router.get('/redbag/2017', redbag.index); @@ -136,4 +136,6 @@ router.get('/redbag/2017', redbag.index);
136 // 获取活动页面个性化推荐商品数据 136 // 获取活动页面个性化推荐商品数据
137 router.get('/individuation', individuation.productLst); 137 router.get('/individuation', individuation.productLst);
138 138
  139 +router.get('/app-downloads', appDownloads.index);
  140 +
139 module.exports = router; 141 module.exports = router;
  1 +<div class="container">
  2 + <div class="banner"></div>
  3 + <div class="main">
  4 + <div class="slide-box">
  5 + <div class="swiper-wrapper clearfix">
  6 + <div class="yohobuy" tag="0">
  7 + <div class="swiper-yohobuy bg"></div>
  8 + <div class="ewm-area">
  9 + <img src="http://cdn.yoho.cn/yohocn/160315/images/ewm-yohobuy.png" />
  10 + <div class="ewm-info"></div>
  11 + </div>
  12 + <span id="download" class="download-btn">点击下载 · Yoho!Buy有货</span>
  13 + </div>
  14 + </div>
  15 + </div>
  16 + <div class="slide-pagination clearfix">
  17 + </div>
  18 + </div>
  19 + <div class="footer">
  20 + CopyRight © 2007-2017 YOHO!新力传媒
  21 + </div>
  22 + <div class="mask">
  23 + <div class="wx-img1"></div>
  24 + <div class="wx-img2"></div>
  25 + <div class="wx-img3"></div>
  26 + </div>
  27 +</div>
  28 +
  29 +{{#if devEnv}}
  30 + {{#if localCss}}
  31 + <link rel="stylesheet" media="all" href="//{{devHost}}:5001/bundle/common.css">
  32 + {{/if}}
  33 + {{#ifor localCss vue}}
  34 + <link rel="stylesheet" media="all" href="//{{devHost}}:5001/bundle/{{module}}.{{page}}.css">
  35 + {{^}}
  36 +
  37 + <link rel="stylesheet" media="all" href="//{{devHost}}:5001/bundle/index.css">
  38 + {{/ifor}}
  39 +{{^}}
  40 +
  41 + {{#if localCss }}
  42 + <link rel="stylesheet" media="all" href="//cdn.yoho.cn/m-yohobuy-node/{{version}}/common.css">
  43 + {{/if}}
  44 + {{#ifor localCss vue}}
  45 + <link rel="stylesheet" media="all" href="//cdn.yoho.cn/m-yohobuy-node/{{version}}/{{module}}.{{page}}.css">
  46 + {{^}}
  47 + <link rel="stylesheet" media="all" href="//cdn.yoho.cn/m-yohobuy-node/{{version}}/index.css">
  48 + {{/ifor}}
  49 +{{/if}}
  1 +require('../../scss/activity/_app-downloads.css');
  2 +
  3 +const url = 'yohobuy://yohobuy.com/goapp?openby:yohobuy={"action":"go.home","params":{"gender":"1","channel":"2"}}';
  4 +const u = navigator.userAgent.toLowerCase();
  5 +const isiOS = u.indexOf('os') > -1 || u.indexOf('iphone') > -1 || u.indexOf('mac') > -1 || u.indexOf('ipad') > -1;
  6 +
  7 +let appPath = url;
  8 +let ifr;
  9 +
  10 +if (isiOS) {
  11 + window.location.href = appPath;
  12 +} else {
  13 + ifr = document.createElement('iframe');
  14 + ifr.src = appPath;
  15 + ifr.style.display = 'none';
  16 + document.body.appendChild(ifr);
  17 +}
  18 +
  19 +$('#download').click(function() {
  20 + var mktc = '';
  21 +
  22 + location.href = `http://union.yoho.cn/union/downapp.html${(mktc ? '?union_type=' + mktc : '')}`;
  23 +});
  1 +body {
  2 + line-height: 1.5;
  3 + -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  4 +}
  5 +
  6 +table {
  7 + border-collapse: collapse;
  8 + border-spacing: 0
  9 +}
  10 +
  11 +caption, th, td, b, strong {
  12 + text-align: left;
  13 + font-weight: normal
  14 +}
  15 +
  16 +table, td, th {
  17 + vertical-align: middle
  18 +}
  19 +
  20 +blockquote:before, blockquote:after, q:before, q:after {
  21 + content: ""
  22 +}
  23 +
  24 +blockquote, q {
  25 + quotes: "" ""
  26 +}
  27 +
  28 +a img {
  29 + border: none
  30 +}
  31 +
  32 +em, cite {
  33 + font-style: normal
  34 +}
  35 +
  36 +body {
  37 + background: #fff;
  38 + font: 12px/1.5 Tahoma, '宋体';
  39 + color: #000
  40 +}
  41 +
  42 +h1, h2, h3, h4, h5, h6 {
  43 + font-weight: normal;
  44 + color: #111
  45 +}
  46 +
  47 +a {
  48 + text-decoration: none;
  49 + cursor: pointer
  50 +}
  51 +
  52 +dl, dt, dd, ol, ul, li {
  53 + list-style: none
  54 +}
  55 +
  56 +.left {
  57 + float: left
  58 +}
  59 +
  60 +.right {
  61 + float: right
  62 +}
  63 +
  64 +.clearfix:before, .clearfix:after {
  65 + content: "";
  66 + display: table
  67 +}
  68 +
  69 +.clearfix:after {
  70 + clear: both
  71 +}
  72 +
  73 +.clearfix {
  74 + *zoom: 1
  75 +}
  76 +
  77 +body.disable-default-action {
  78 + -webkit-touch-callout: none;
  79 + -webkit-user-select: none;
  80 +}
  81 +
  82 +.loadding-area {
  83 + position: fixed;
  84 + top: 50%;
  85 + left: 50%;
  86 + width: 4rem;
  87 + height: 4rem;
  88 + margin-top: -2rem;
  89 + margin-left: -2rem;
  90 + border-radius: 10%;
  91 + background-color: rgba(0, 0, 0, 0.3);
  92 + z-index: 9999;
  93 +}
  94 +
  95 +.loadding {
  96 + z-index: 999;
  97 + width: 1.1rem;
  98 + position: absolute;
  99 + top: 50%;
  100 + left: 50%;
  101 + margin: -0.55rem 0 0 -0.55rem;
  102 +}
  103 +
  104 +.container {
  105 + max-width: 790px;
  106 + height: auto;
  107 + margin: 0 auto;
  108 + /*overflow: hidden;*/
  109 +}
  110 +
  111 +.banner {
  112 + height: 6rem;
  113 + background: url(http://cdn.yoho.cn/yohocn/160315/images/banner.png) no-repeat right;
  114 + background-size: contain;
  115 + position: fixed;
  116 + top: 0;
  117 + left: 0;
  118 + right: 0;
  119 + z-index: 99;
  120 +}
  121 +
  122 +.main {
  123 + position: relative;
  124 + top: 3.5rem;
  125 + height: 20rem;
  126 +}
  127 +
  128 +.slide-box {
  129 + overflow: hidden;
  130 + position: relative;
  131 + height: 20.78rem;
  132 + width: 100%;
  133 +}
  134 +
  135 +.slide-box .swipe-wrap {
  136 + overflow: hidden;
  137 + position: relative;
  138 + height: 19.775rem;
  139 +}
  140 +
  141 +/*.slide-box .swiper-wrapper {
  142 + padding: 0px 4.578rem;
  143 +}*/
  144 +
  145 +.slide-box .swiper-slide {
  146 + float: left;
  147 + width: 16rem;
  148 + position: relative;
  149 + height: 20.78rem;
  150 + margin: 0;
  151 + padding: 0;
  152 +}
  153 +
  154 +.slide-box .download-btn {
  155 + background-color: #d0021b;
  156 + color: #fff;
  157 + border-radius: 0.2rem;
  158 + width: 12.8rem;
  159 + height: 2rem;
  160 + line-height: 2rem;
  161 + font-family: arial, helvetica, '黑体';
  162 + font-size: 0.8rem;
  163 + text-align: center;
  164 + position: absolute;
  165 + bottom: 0px;
  166 + left: 50%;
  167 + margin-left: -6.4rem;
  168 +}
  169 +
  170 +.slide-box .ewm-area {
  171 + width: 12.8rem;
  172 + height: 5.7rem;
  173 + position: absolute;
  174 + bottom: 2.45rem;
  175 + left: 50%;
  176 + margin-left: -6.4rem;
  177 +}
  178 +
  179 +.slide-box .ewm-area img {
  180 + width: 4.6rem;
  181 + margin: 0 auto;
  182 + display: block;
  183 +}
  184 +
  185 +.slide-box .ewm-area .yoho-txt01 {
  186 + background: url(http://cdn.yoho.cn/yohocn/160315/images/txt01.png) no-repeat;
  187 +}
  188 +
  189 +.slide-box .ewm-area .yoho-txt02 {
  190 + background: url(http://cdn.yoho.cn/yohocn/160315/images/txt02.png) no-repeat;
  191 +}
  192 +
  193 +.slide-box .ewm-area .yoho-txt01,
  194 +.slide-box .ewm-area .yoho-txt02 {
  195 + width: 3.3rem;
  196 + height: 0.7rem;
  197 + display: block;
  198 + margin: 0 auto;
  199 + background-size: contain;
  200 +}
  201 +
  202 +.slide-box .ewm-area .ewm-info {
  203 + background: url(http://cdn.yoho.cn/yohocn/160315/images/ewm-info.png) no-repeat;
  204 + width: 7rem;
  205 + height: 0.7rem;
  206 + margin: 0.4rem auto 0 auto;
  207 + background-size: contain;
  208 + clear: both;
  209 +}
  210 +
  211 +.slide-box .ewm-area .ewm-yoho {
  212 + height: 5.4rem;
  213 + width: 4.6rem;
  214 +}
  215 +
  216 +.swiper-yohobuy {
  217 + background: url(http://cdn.yoho.cn/yohocn/160315/images/yohobuy.png) no-repeat;
  218 +}
  219 +
  220 +.swiper-yoho {
  221 + background: url(http://cdn.yoho.cn/yohocn/160315/images/yoho.png) no-repeat;
  222 +}
  223 +
  224 +.swiper-show {
  225 + background: url(http://cdn.yoho.cn/yohocn/160315/images/show.png) no-repeat;
  226 +}
  227 +
  228 +.swiper-mars {
  229 + background: url(http://cdn.yoho.cn/yohocn/160315/images/mars.png) no-repeat;
  230 +}
  231 +
  232 +.slide-box .bg {
  233 + display: block;
  234 + margin: 0 auto;
  235 + width: 12.5rem;
  236 + height: 19.2rem;
  237 + background-size: contain;
  238 +}
  239 +
  240 +.slide-pagination {
  241 + margin: 0.125rem 0 0 0;
  242 + text-align: center;
  243 +}
  244 +
  245 +.slide-pagination .swiper-pagination-bullet {
  246 + margin: 0 0.1rem;
  247 +}
  248 +
  249 +.swiper-pagination-bullet-active {
  250 + background: #696969;
  251 +}
  252 +
  253 +.footer {
  254 + text-align: center;
  255 + color: #555;
  256 + line-height: 16px;
  257 + font-size: 0.35rem;
  258 + box-shadow: none;
  259 + position: relative;
  260 + top: 5.3rem;
  261 +}
  262 +
  263 +.mask {
  264 + background: rgba(0, 0, 0, 0.8);
  265 + position: absolute;
  266 + left: 0;
  267 + right: 0;
  268 + top: 0;
  269 + bottom: 0;
  270 + height: 41rem;
  271 + z-index: 999;
  272 + display: none;
  273 +}
  274 +
  275 +.mask .wx-img1 {
  276 + width: 7rem;
  277 + height: 2rem;
  278 + background: url(http://cdn.yoho.cn/yohocn/160315/images/wx-img1.png) no-repeat;
  279 + background-size: contain;
  280 + position: fixed;
  281 + top: 0.4rem;
  282 + right: 1rem;
  283 +}
  284 +
  285 +.mask .wx-img2 {
  286 + width: 16rem;
  287 + height: 9rem;
  288 + background: url(http://cdn.yoho.cn/yohocn/160315/images/wx-img2.png) no-repeat;
  289 + background-size: cover;
  290 + position: absolute;
  291 + bottom: 4rem;
  292 + right: 50%;
  293 + margin-right: -8rem;
  294 +}
  295 +
  296 +.mask .wx-img3 {
  297 + width: 16rem;
  298 + height: 16rem;
  299 + background: url(http://cdn.yoho.cn/yohocn/160315/images/wx-img3.png) no-repeat;
  300 + background-size: cover;
  301 + position: absolute;
  302 + top: 2rem;
  303 + right: 50%;
  304 + margin-right: -7.7rem;
  305 + display: none;
  306 +}