Merge branch 'feature/sale' into release/4.8
Showing
1 changed file
with
5 additions
and
1 deletions
@@ -8,6 +8,7 @@ const helpers = global.yoho.helpers; | @@ -8,6 +8,7 @@ const helpers = global.yoho.helpers; | ||
8 | 8 | ||
9 | const timeFormat = { | 9 | const timeFormat = { |
10 | y: '剩{y}年{M}月{d}天', | 10 | y: '剩{y}年{M}月{d}天', |
11 | + M: '剩{M}月{d}天', | ||
11 | d: '剩{d}天', | 12 | d: '剩{d}天', |
12 | h: '剩{h}小时', | 13 | h: '剩{h}小时', |
13 | m: '剩{m}分钟', | 14 | m: '剩{m}分钟', |
@@ -19,8 +20,9 @@ const timeFormat = { | @@ -19,8 +20,9 @@ const timeFormat = { | ||
19 | }; | 20 | }; |
20 | 21 | ||
21 | const anHour = 3600; | 22 | const anHour = 3600; |
22 | -const aYear = 31536000; | ||
23 | const aDay = anHour * 24; | 23 | const aDay = anHour * 24; |
24 | +const aMonth = aDay * 30; | ||
25 | +const aYear = aMonth * 12; | ||
24 | 26 | ||
25 | /** | 27 | /** |
26 | * 折扣专场专题列表过期时间处理 单位:s | 28 | * 折扣专场专题列表过期时间处理 单位:s |
@@ -37,6 +39,8 @@ const processTime = (time) => { | @@ -37,6 +39,8 @@ const processTime = (time) => { | ||
37 | } else { | 39 | } else { |
38 | if (time > aYear) { | 40 | if (time > aYear) { |
39 | type = 'y'; | 41 | type = 'y'; |
42 | + } else if (time > aMonth) { | ||
43 | + type = 'M'; | ||
40 | } else if (time > aDay) { | 44 | } else if (time > aDay) { |
41 | type = 'dh'; | 45 | type = 'dh'; |
42 | } else { | 46 | } else { |
-
Please register or login to post a comment