Authored by ccbikai(👎🏻🍜)

下载条增加描述文字

@@ -34,13 +34,30 @@ @@ -34,13 +34,30 @@
34 .top-downloadbar .download-text { 34 .top-downloadbar .download-text {
35 position: absolute; 35 position: absolute;
36 top: 50%; 36 top: 50%;
37 - -webkit-transform: translateY(-50%);  
38 - transform: translateY(-50%); 37 + -webkit-transform: translateY(-60%);
  38 + transform: translateY(-60%);
39 left: 3.5rem; 39 left: 3.5rem;
40 color: #fff; 40 color: #fff;
41 font-size: .6rem; 41 font-size: .6rem;
42 } 42 }
43 43
  44 +.top-downloadbar-wechat .download-text {
  45 + -webkit-transform: translateY(-50%);
  46 + transform: translateY(-50%);
  47 +}
  48 +
  49 +.top-downloadbar .download-text-desc {
  50 + position: absolute;
  51 + top: 50%;
  52 + -webkit-transform: translateY(10%) scale(0.4);
  53 + transform: translateY(10%) scale(0.4);
  54 + -webkit-transform-origin: left center;
  55 + transform-origin: left center;
  56 + left: 3.5rem;
  57 + color: #c7c7c7;
  58 + font-size: 1rem;
  59 +}
  60 +
44 .top-downloadbar .download-go { 61 .top-downloadbar .download-go {
45 right: .375rem; 62 right: .375rem;
46 background: red; 63 background: red;
  1 +0 info it worked if it ends with ok
  2 +1 verbose cli [ '/usr/local/Cellar/node4-lts/4.6.2/bin/node',
  3 +1 verbose cli '/usr/local/bin/npm',
  4 +1 verbose cli 'install',
  5 +1 verbose cli '--register',
  6 +1 verbose cli 'http://spm.alipay.im',
  7 +1 verbose cli 'import-style' ]
  8 +2 info using npm@2.15.9
  9 +3 info using node@v4.6.2
  10 +4 verbose install initial load of /Users/ccbikai/yoho/YAS-jssdk/package.json
  11 +5 warn package.json yas-jssdk@2.2.3 Normalized value of bugs field is an empty object. Deleted.
  12 +6 warn package.json yas-jssdk@2.2.3 No license field.
  13 +7 verbose installManyTop reading scoped package data from /Users/ccbikai/yoho/YAS-jssdk/node_modules/express/package.json
  14 +8 verbose installManyTop reading scoped package data from /Users/ccbikai/yoho/YAS-jssdk/node_modules/gulp/package.json
  15 +9 verbose installManyTop reading scoped package data from /Users/ccbikai/yoho/YAS-jssdk/node_modules/gulp-ftp/package.json
  16 +10 verbose installManyTop reading scoped package data from /Users/ccbikai/yoho/YAS-jssdk/node_modules/gulp-jshint/package.json
  17 +11 verbose installManyTop reading scoped package data from /Users/ccbikai/yoho/YAS-jssdk/node_modules/gulp-util/package.json
  18 +12 verbose installManyTop reading scoped package data from /Users/ccbikai/yoho/YAS-jssdk/node_modules/jshint-stylish/package.json
  19 +13 verbose installManyTop reading scoped package data from /Users/ccbikai/yoho/YAS-jssdk/node_modules/log4js/package.json
  20 +14 verbose installManyTop reading scoped package data from /Users/ccbikai/yoho/YAS-jssdk/node_modules/spm/package.json
  21 +15 info package.json spm@3.6.12 No license field.
  22 +16 verbose readDependencies loading dependencies from /Users/ccbikai/yoho/YAS-jssdk/package.json
  23 +17 silly cache add args [ 'http://spm.alipay.im', null ]
  24 +18 verbose cache add spec http://spm.alipay.im
  25 +19 silly cache add args [ 'import-style', null ]
  26 +20 verbose cache add spec import-style
  27 +21 silly cache add parsed spec Result {
  28 +21 silly cache add raw: 'http://spm.alipay.im',
  29 +21 silly cache add scope: null,
  30 +21 silly cache add name: null,
  31 +21 silly cache add rawSpec: 'http://spm.alipay.im',
  32 +21 silly cache add spec: 'http://spm.alipay.im',
  33 +21 silly cache add type: 'remote' }
  34 +22 silly mapToRegistry name http://spm.alipay.im
  35 +23 silly mapToRegistry using default registry
  36 +24 silly mapToRegistry registry https://registry.npm.taobao.org/
  37 +25 silly mapToRegistry data Result {
  38 +25 silly mapToRegistry raw: 'http://spm.alipay.im',
  39 +25 silly mapToRegistry scope: null,
  40 +25 silly mapToRegistry name: null,
  41 +25 silly mapToRegistry rawSpec: 'http://spm.alipay.im',
  42 +25 silly mapToRegistry spec: 'http://spm.alipay.im',
  43 +25 silly mapToRegistry type: 'remote' }
  44 +26 silly mapToRegistry uri http://spm.alipay.im
  45 +27 silly scopeAuth http://spm.alipay.im doesn't share host with registry https://registry.npm.taobao.org/
  46 +28 verbose addRemoteTarball http://spm.alipay.im not in flight; adding
  47 +29 verbose addRemoteTarball [ 'http://spm.alipay.im', null ]
  48 +30 silly cache add parsed spec Result {
  49 +30 silly cache add raw: 'import-style',
  50 +30 silly cache add scope: null,
  51 +30 silly cache add name: 'import-style',
  52 +30 silly cache add rawSpec: '',
  53 +30 silly cache add spec: 'latest',
  54 +30 silly cache add type: 'tag' }
  55 +31 silly addNamed import-style@latest
  56 +32 verbose addNamed "latest" is being treated as a dist-tag for import-style
  57 +33 info addNameTag [ 'import-style', 'latest' ]
  58 +34 silly mapToRegistry name import-style
  59 +35 silly mapToRegistry using default registry
  60 +36 silly mapToRegistry registry https://registry.npm.taobao.org/
  61 +37 silly mapToRegistry data Result {
  62 +37 silly mapToRegistry raw: 'import-style',
  63 +37 silly mapToRegistry scope: null,
  64 +37 silly mapToRegistry name: 'import-style',
  65 +37 silly mapToRegistry rawSpec: '',
  66 +37 silly mapToRegistry spec: 'latest',
  67 +37 silly mapToRegistry type: 'tag' }
  68 +38 silly mapToRegistry uri https://registry.npm.taobao.org/import-style
  69 +39 verbose addNameTag registry:https://registry.npm.taobao.org/import-style not in flight; fetching
  70 +40 info retry fetch attempt 1 at 13:29:35
  71 +41 info attempt registry request try #1 at 13:29:35
  72 +42 http fetch GET http://spm.alipay.im/
  73 +43 verbose request id 6ee9f413b7ca8913
  74 +44 verbose request uri https://registry.npm.taobao.org/import-style
  75 +45 verbose request no auth needed
  76 +46 info attempt registry request try #1 at 13:29:35
  77 +47 http request GET https://registry.npm.taobao.org/import-style
  78 +48 http fetch 502 http://spm.alipay.im
  79 +49 info retry will retry, error on last attempt: Error: server error 502
  80 +50 http 200 https://registry.npm.taobao.org/import-style
  81 +51 verbose headers { date: 'Sat, 04 Feb 2017 05:29:34 GMT',
  82 +51 verbose headers 'content-type': 'application/json; charset=utf-8',
  83 +51 verbose headers 'content-length': '2279',
  84 +51 verbose headers connection: 'keep-alive',
  85 +51 verbose headers 'x-current-requests': '1',
  86 +51 verbose headers etag: '"8e7-AuzvhqvVkFysgbr4LT4MgQ"',
  87 +51 verbose headers 'x-readtime': '13' }
  88 +52 silly get cb [ 200,
  89 +52 silly get { date: 'Sat, 04 Feb 2017 05:29:34 GMT',
  90 +52 silly get 'content-type': 'application/json; charset=utf-8',
  91 +52 silly get 'content-length': '2279',
  92 +52 silly get connection: 'keep-alive',
  93 +52 silly get 'x-current-requests': '1',
  94 +52 silly get etag: '"8e7-AuzvhqvVkFysgbr4LT4MgQ"',
  95 +52 silly get 'x-readtime': '13' } ]
  96 +53 verbose get saving import-style to /Users/ccbikai/.npm/registry.npm.taobao.org/import-style/.cache.json
  97 +54 verbose correctMkdir /Users/ccbikai/.npm correctMkdir not in flight; initializing
  98 +55 silly addNameTag next cb for import-style with tag latest
  99 +56 silly addNamed import-style@1.0.0
  100 +57 verbose addNamed "1.0.0" is a plain semver version for import-style
  101 +58 silly mapToRegistry name import-style
  102 +59 silly mapToRegistry using default registry
  103 +60 silly mapToRegistry registry https://registry.npm.taobao.org/
  104 +61 silly mapToRegistry data Result {
  105 +61 silly mapToRegistry raw: 'import-style',
  106 +61 silly mapToRegistry scope: null,
  107 +61 silly mapToRegistry name: 'import-style',
  108 +61 silly mapToRegistry rawSpec: '',
  109 +61 silly mapToRegistry spec: 'latest',
  110 +61 silly mapToRegistry type: 'tag' }
  111 +62 silly mapToRegistry uri https://registry.npm.taobao.org/import-style
  112 +63 verbose addRemoteTarball https://registry.npm.taobao.org/import-style/download/import-style-1.0.0.tgz not in flight; adding
  113 +64 verbose addRemoteTarball [ 'https://registry.npm.taobao.org/import-style/download/import-style-1.0.0.tgz',
  114 +64 verbose addRemoteTarball '7bba3101d9b2bcc12cb42a57461c3f090590f36c' ]
  115 +65 info retry fetch attempt 1 at 13:29:36
  116 +66 info attempt registry request try #1 at 13:29:36
  117 +67 http fetch GET https://registry.npm.taobao.org/import-style/download/import-style-1.0.0.tgz
  118 +68 http fetch 200 https://registry.npm.taobao.org/import-style/download/import-style-1.0.0.tgz
  119 +69 silly fetchAndShaCheck shasum 7bba3101d9b2bcc12cb42a57461c3f090590f36c
  120 +70 verbose addTmpTarball /var/folders/j4/v0bqzhls057drq8fy22_vx680000gn/T/npm-50067-a99f5dd9/registry.npm.taobao.org/import-style/download/import-style-1.0.0.tgz not in flight; adding
  121 +71 verbose addTmpTarball already have metadata; skipping unpack for import-style@1.0.0
  122 +72 verbose correctMkdir /Users/ccbikai/.npm correctMkdir not in flight; initializing
  123 +73 silly cache afterAdd import-style@1.0.0
  124 +74 verbose afterAdd /Users/ccbikai/.npm/import-style/1.0.0/package/package.json not in flight; writing
  125 +75 verbose correctMkdir /Users/ccbikai/.npm correctMkdir not in flight; initializing
  126 +76 verbose afterAdd /Users/ccbikai/.npm/import-style/1.0.0/package/package.json written
  127 +77 info attempt registry request try #2 at 13:29:46
  128 +78 http fetch GET http://spm.alipay.im/
  129 +79 http fetch 502 http://spm.alipay.im
  130 +80 info retry will retry, error on last attempt: Error: server error 502
  131 +81 info attempt registry request try #3 at 13:30:46
  132 +82 http fetch GET http://spm.alipay.im/
  133 +83 http fetch 502 http://spm.alipay.im
  134 +84 error fetch failed http://spm.alipay.im
  135 +85 warn retry will retry, error on last attempt: Error: fetch failed with status code 502
  136 +86 info retry fetch attempt 2 at 13:30:56
  137 +87 info attempt registry request try #1 at 13:30:56
  138 +88 http fetch GET http://spm.alipay.im/
  139 +89 http fetch 502 http://spm.alipay.im
  140 +90 info retry will retry, error on last attempt: Error: server error 502
  141 +91 info attempt registry request try #2 at 13:31:06
  142 +92 http fetch GET http://spm.alipay.im/
  143 +93 http fetch 502 http://spm.alipay.im
  144 +94 info retry will retry, error on last attempt: Error: server error 502
  145 +95 info attempt registry request try #3 at 13:32:06
  146 +96 http fetch GET http://spm.alipay.im/
  147 +97 http fetch 502 http://spm.alipay.im
  148 +98 error fetch failed http://spm.alipay.im
  149 +99 warn retry will retry, error on last attempt: Error: fetch failed with status code 502
  150 +100 info retry fetch attempt 3 at 13:33:06
  151 +101 info attempt registry request try #1 at 13:33:06
  152 +102 http fetch GET http://spm.alipay.im/
  153 +103 http fetch 502 http://spm.alipay.im
  154 +104 info retry will retry, error on last attempt: Error: server error 502
  155 +105 info attempt registry request try #2 at 13:33:16
  156 +106 http fetch GET http://spm.alipay.im/
  157 +107 http fetch 502 http://spm.alipay.im
  158 +108 info retry will retry, error on last attempt: Error: server error 502
  159 +109 info attempt registry request try #3 at 13:34:16
  160 +110 http fetch GET http://spm.alipay.im/
  161 +111 http fetch 502 http://spm.alipay.im
  162 +112 error fetch failed http://spm.alipay.im
  163 +113 verbose stack Error: fetch failed with status code 502
  164 +113 verbose stack at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/fetch.js:51:14)
  165 +113 verbose stack at emitOne (events.js:77:13)
  166 +113 verbose stack at Request.emit (events.js:169:7)
  167 +113 verbose stack at Request.onRequestResponse (/usr/local/lib/node_modules/npm/node_modules/request/request.js:977:10)
  168 +113 verbose stack at emitOne (events.js:77:13)
  169 +113 verbose stack at ClientRequest.emit (events.js:169:7)
  170 +113 verbose stack at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:433:21)
  171 +113 verbose stack at HTTPParser.parserOnHeadersComplete (_http_common.js:103:23)
  172 +113 verbose stack at Socket.socketOnData (_http_client.js:322:20)
  173 +113 verbose stack at emitOne (events.js:77:13)
  174 +114 verbose cwd /Users/ccbikai/yoho/YAS-jssdk
  175 +115 error Darwin 16.3.0
  176 +116 error argv "/usr/local/Cellar/node4-lts/4.6.2/bin/node" "/usr/local/bin/npm" "install" "--register" "http://spm.alipay.im" "import-style"
  177 +117 error node v4.6.2
  178 +118 error npm v2.15.9
  179 +119 error fetch failed with status code 502
  180 +120 error If you need help, you may report this error at:
  181 +120 error <https://github.com/npm/npm/issues>
  182 +121 verbose exit [ 1, true ]
@@ -237,12 +237,17 @@ exports.setFontSize = function() { @@ -237,12 +237,17 @@ exports.setFontSize = function() {
237 } 237 }
238 238
239 exports.getDownloadStr = function(isWechat, mktc) { 239 exports.getDownloadStr = function(isWechat, mktc) {
240 - var str = '<div class="top-downloadbar" id="top-downloadbar"><a href="javascript:void(0);" class="download-close" id="download-close"></a>\ 240 + var str = '<div class="top-downloadbar';
  241 + if (isWechat) {
  242 + str += ' top-downloadbar-wechat';
  243 + }
  244 + str += '" id="top-downloadbar"><a href="javascript:void(0);" class="download-close" id="download-close"></a>\
241 <span class="download-icon"></span><span class="download-text">Yoho!Buy有货</span>'; 245 <span class="download-icon"></span><span class="download-text">Yoho!Buy有货</span>';
242 if (isWechat) { 246 if (isWechat) {
243 str += '<a class="download-go-wechat" id="download-go" href="http://union.yoho.cn/union/downapp.html' + (mktc ? '?union_type=' + mktc : '') +'">立即打开</a>'; 247 str += '<a class="download-go-wechat" id="download-go" href="http://union.yoho.cn/union/downapp.html' + (mktc ? '?union_type=' + mktc : '') +'">立即打开</a>';
244 str += '<a class="download-wechat" id="download-wechat" href="https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=MjM5MzI3MDkwNg==&scene=110#wechat_redirect">加关注</a></div>'; 248 str += '<a class="download-wechat" id="download-wechat" href="https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=MjM5MzI3MDkwNg==&scene=110#wechat_redirect">加关注</a></div>';
245 } else { 249 } else {
  250 + str += '<p class="download-text-desc">新用户送惊喜礼包</p>';
246 str += '<a class="download-go" id="download-go" href="//m.yohobuy.com/activity/app-downloads' + (mktc ? '?union_type=' + mktc : '') + '">立即打开</a></div>'; 251 str += '<a class="download-go" id="download-go" href="//m.yohobuy.com/activity/app-downloads' + (mktc ? '?union_type=' + mktc : '') + '">立即打开</a></div>';
247 } 252 }
248 return str; 253 return str;