...
|
...
|
@@ -5,7 +5,8 @@ const serviceAPI = global.yoho.ServiceAPI; |
|
|
const camelCase = global.yoho.camelCase;
|
|
|
const _ = require('lodash');
|
|
|
const logger = global.yoho.logger;
|
|
|
const helpers = global.yoho.helpers;
|
|
|
|
|
|
// const helpers = global.yoho.helpers;
|
|
|
|
|
|
const _processNavData = (list, type) => {
|
|
|
let formatData = [];
|
...
|
...
|
@@ -31,22 +32,23 @@ const _processNavData = (list, type) => { |
|
|
};
|
|
|
|
|
|
const _processListData = (list) => {
|
|
|
let formatData = [];
|
|
|
// let formatData = [];
|
|
|
|
|
|
list = list || [];
|
|
|
//list = camelCase(list);
|
|
|
|
|
|
"2016年06月02日 15:56".match(/^(\d+)年(\d+)月(\d+)日 (\d+):(\d+)$/,function(data){
|
|
|
console.log(data)
|
|
|
// list = camelCase(list);
|
|
|
|
|
|
'2016年06月02日 15:56'.match(/^(\d+)年(\d+)月(\d+)日 (\d+):(\d+)$/, function(data) {
|
|
|
console.log(data);
|
|
|
});
|
|
|
|
|
|
let artList = list.list.artList.map(data =>{
|
|
|
|
|
|
// let time = data.publish_time.match(/^(\d+)年(\d+)月(\d+)日 (\d+):(\d+)$/);
|
|
|
// data.publishTime = `${time[1]}/${time[2]}/${time[3]} ${time[4]}:${time[5]}`
|
|
|
|
|
|
data.publishTime = data.publish_time.replace(/年|月/g,"/");
|
|
|
data.publishTime = data.publishTime.replace(/日/g,"");
|
|
|
|
|
|
data.publishTime = data.publish_time.replace(/年|月/g, '/');
|
|
|
data.publishTime = data.publishTime.replace(/日/g, '');
|
|
|
|
|
|
return data;
|
|
|
});
|
...
|
...
|
|