Authored by 周少峰

Merge branch 'release/5.4.1' into gray

@@ -17,8 +17,11 @@ @@ -17,8 +17,11 @@
17 17
18 {{#if devEnv}} 18 {{#if devEnv}}
19 <link rel="stylesheet" href="//{{devHost}}:5002/css/index.css"> 19 <link rel="stylesheet" href="//{{devHost}}:5002/css/index.css">
  20 + <link rel="stylesheet" href="//{{devHost}}:5002/css/cart.index.css">
  21 +
20 {{^}} 22 {{^}}
21 <link rel="stylesheet" href="//{{#isEqual cdn 'qcloud'}}qcdn.yoho.cn{{^}}cdn.yoho.cn{{/isEqual}}/yohobuy-node/{{version}}/index.css"> 23 <link rel="stylesheet" href="//{{#isEqual cdn 'qcloud'}}qcdn.yoho.cn{{^}}cdn.yoho.cn{{/isEqual}}/yohobuy-node/{{version}}/index.css">
  24 + <link rel="stylesheet" href="//{{#isEqual cdn 'qcloud'}}qcdn.yoho.cn{{^}}cdn.yoho.cn{{/isEqual}}/yohobuy-node/{{version}}/cart.index.css">
22 {{/if}} 25 {{/if}}
23 </head> 26 </head>
24 <body> 27 <body>
@@ -125,7 +125,7 @@ gulp.task('dist', ['ge'], () => { @@ -125,7 +125,7 @@ gulp.task('dist', ['ge'], () => {
125 125
126 // postcss compile in dev 126 // postcss compile in dev
127 gulp.task('postcss-dev', () => { 127 gulp.task('postcss-dev', () => {
128 - return gulp.src('scss/index.css') 128 + return gulp.src(['scss/index.css', 'scss/cart.index.css'])
129 .pipe(sourcemaps.init()) 129 .pipe(sourcemaps.init())
130 .pipe(postcss(postcssPlugin(env.dev))) 130 .pipe(postcss(postcssPlugin(env.dev)))
131 .pipe(sourcemaps.write('.')) 131 .pipe(sourcemaps.write('.'))
@@ -154,7 +154,7 @@ gulp.task('font', () => { @@ -154,7 +154,7 @@ gulp.task('font', () => {
154 154
155 // postcss compile in pro 155 // postcss compile in pro
156 gulp.task('postcss', ['assets'], () => { 156 gulp.task('postcss', ['assets'], () => {
157 - return gulp.src('scss/index.css') 157 + return gulp.src(['scss/index.css', 'scss/cart.index.css'])
158 .pipe(postcss(postcssPlugin(env.pro))) 158 .pipe(postcss(postcssPlugin(env.pro)))
159 .pipe(cssnano()) 159 .pipe(cssnano())
160 .pipe(gulp.dest(dist.css)); 160 .pipe(gulp.dest(dist.css));

42.5 KB | W: | H:

608 Bytes | W: | H:

  • 2-up
  • Swipe
  • Onion skin
@@ -5,8 +5,10 @@ @@ -5,8 +5,10 @@
5 */ 5 */
6 var $ = require('yoho-jquery'); 6 var $ = require('yoho-jquery');
7 7
8 -var areaSelect = {  
9 - isIE8: window.navigator.appName === 'Microsoft Internet Explorer' && window.navigator.appVersion.match(/8./i) === '8.', // eslint-disable-line 8 +require('../../common'); // eslint-disable-line
  9 +
  10 +var areaSelect = { // eslint-disable-line
  11 + isIE8: window.isIE8,
10 init: function($el, areaCode) { 12 init: function($el, areaCode) {
11 var city, province, area; 13 var city, province, area;
12 14
@@ -215,6 +215,28 @@ function isLogin() { @@ -215,6 +215,28 @@ function isLogin() {
215 } 215 }
216 } 216 }
217 217
  218 +function isIE() {
  219 + return /msie|trident/i.test(navigator.userAgent);
  220 +}
  221 +
  222 +function isIEVer(version) {
  223 + var ver = '';
  224 +
  225 + var getVersion = function(regex) {
  226 + var ua = navigator.userAgent;
  227 + var match = ua && ua.match(regex);
  228 +
  229 + return (match && match.length > 1 && match[1]) || '';
  230 + };
  231 +
  232 + if (isIE()) {
  233 + ver = getVersion(/(?:msie |rv:)(\d+(\.\d+)?)/i);
  234 + return ver === version;
  235 + }
  236 +
  237 + return false;
  238 +}
  239 +
218 // 品友 240 // 品友
219 function addPyEvent(eventName, val) { 241 function addPyEvent(eventName, val) {
220 if (typeof window.py === 'function') { 242 if (typeof window.py === 'function') {
@@ -247,6 +269,10 @@ window.registerUrl = registerUrl; @@ -247,6 +269,10 @@ window.registerUrl = registerUrl;
247 269
248 window.jumpUrl = jumpUrl; 270 window.jumpUrl = jumpUrl;
249 271
  272 +window.isIE = isIE;
  273 +
  274 +window.isIE8 = isIEVer('8.0');
  275 +
250 window.once = once; 276 window.once = once;
251 window.addPyEvent = addPyEvent; 277 window.addPyEvent = addPyEvent;
252 278
  1 +@charset "utf-8";
  2 +
  3 +/* 模块 */
  4 +@import 'cart/index';
@@ -15,6 +15,6 @@ @@ -15,6 +15,6 @@
15 @import "share"; 15 @import "share";
16 @import 'home/index'; 16 @import 'home/index';
17 @import 'guang/index'; 17 @import 'guang/index';
18 -@import 'cart/index'; 18 +/*@import 'cart/index';*/
19 @import 'service/index'; 19 @import 'service/index';
20 @import '3party/index'; 20 @import '3party/index';