Authored by ccbikai

Merge branch 'feature/sale' into release/4.8

@@ -7,6 +7,7 @@ @@ -7,6 +7,7 @@
7 const helpers = global.yoho.helpers; 7 const helpers = global.yoho.helpers;
8 8
9 const timeFormat = { 9 const timeFormat = {
  10 + y: '剩{y}年{d}天',
10 d: '剩{d}天', 11 d: '剩{d}天',
11 h: '剩{h}小时', 12 h: '剩{h}小时',
12 m: '剩{m}分钟', 13 m: '剩{m}分钟',
@@ -18,6 +19,7 @@ const timeFormat = { @@ -18,6 +19,7 @@ const timeFormat = {
18 }; 19 };
19 20
20 const anHour = 3600; 21 const anHour = 3600;
  22 +const aYear = 31536000;
21 const aDay = anHour * 24; 23 const aDay = anHour * 24;
22 24
23 /** 25 /**
@@ -33,7 +35,9 @@ const processTime = (time) => { @@ -33,7 +35,9 @@ const processTime = (time) => {
33 data.warnColor = true; 35 data.warnColor = true;
34 data.time = '低于1小时'; 36 data.time = '低于1小时';
35 } else { 37 } else {
36 - if (time > aDay) { 38 + if (time > aYear) {
  39 + type = 'y';
  40 + } else if (time > aDay) {
37 type = 'dh'; 41 type = 'dh';
38 } else { 42 } else {
39 type = 'h'; 43 type = 'h';