Authored by 郭成尧

'左侧分类选中处理'

@@ -10,7 +10,7 @@ const library = '../../../library'; @@ -10,7 +10,7 @@ const library = '../../../library';
10 const helpers = require(`${library}/helpers`); 10 const helpers = require(`${library}/helpers`);
11 const _ = require('lodash'); 11 const _ = require('lodash');
12 12
13 -const aMinute = 60000; 13 +// const aMinute = 60000;
14 const anHour = 3600000; 14 const anHour = 3600000;
15 const aDay = anHour * 24; 15 const aDay = anHour * 24;
16 const timeFormat = { 16 const timeFormat = {
@@ -52,28 +52,28 @@ const processTime = (time) => { @@ -52,28 +52,28 @@ const processTime = (time) => {
52 * @param {[string]} time 52 * @param {[string]} time
53 * @return {[boject]} 53 * @return {[boject]}
54 */ 54 */
55 -const processTimes = (time) => {  
56 - let data = {};  
57 - let type = '';  
58 -  
59 - if (time > aDay) {  
60 - type = 'dhms';  
61 - } else {  
62 - if (time > anHour) {  
63 - type = 'hms';  
64 - } else {  
65 - if (time > aMinute) {  
66 - type = 'ms';  
67 - } else {  
68 - type = 's';  
69 - }  
70 - }  
71 - }  
72 -  
73 - data.time = helpers.dateDiffFormat(timeFormat[type], time, 'ms');  
74 -  
75 - return data.time;  
76 -}; 55 +// const processTimes = (time) => {
  56 +// let data = {};
  57 +// let type = '';
  58 +//
  59 +// if (time > aDay) {
  60 +// type = 'dhms';
  61 +// } else {
  62 +// if (time > anHour) {
  63 +// type = 'hms';
  64 +// } else {
  65 +// if (time > aMinute) {
  66 +// type = 'ms';
  67 +// } else {
  68 +// type = 's';
  69 +// }
  70 +// }
  71 +// }
  72 +//
  73 +// data.time = helpers.dateDiffFormat(timeFormat[type], time, 'ms');
  74 +//
  75 +// return data.time;
  76 +// };
77 77
78 /** 78 /**
79 * 折扣文本切割 79 * 折扣文本切割
@@ -589,8 +589,10 @@ exports.handleDiscountTitleData = (origin) => { @@ -589,8 +589,10 @@ exports.handleDiscountTitleData = (origin) => {
589 589
590 dest.title = origin.title; 590 dest.title = origin.title;
591 dest.up = true; 591 dest.up = true;
592 - dest.discount = origin.promotion_name;  
593 - dest.time = processTimes(origin.left_time); 592 +
  593 + // dest.time = processTimes(origin.left_time);
  594 + dest.time = origin.left_time;
  595 + Object.assign(dest, discountSplit(origin.promotion_name));
594 596
595 return dest; 597 return dest;
596 }; 598 };