...
|
...
|
@@ -28,10 +28,10 @@ const getTime = (time, a)=> { |
|
|
* @returns {number}
|
|
|
*/
|
|
|
const getDate = (time)=> {
|
|
|
if (typeof (time) === "string") {
|
|
|
if (typeof (time) === 'string') {
|
|
|
return new Date(time).getTime() / 1000;
|
|
|
} else {
|
|
|
return new Date(time.getFullYear() + "-" + time.getMonth() + "-" + time.getDate()).getTime() / 1000;
|
|
|
return new Date(time.getFullYear() + '-' + time.getMonth() + '-' + time.getDate()).getTime() / 1000;
|
|
|
}
|
|
|
};
|
|
|
|
...
|
...
|
@@ -49,7 +49,7 @@ const index = (req, res, next) => { |
|
|
|
|
|
currencyModel.getIndexData(uid, page, queryType, beginTime).then(result=> {
|
|
|
result.list.tabs[queryType].isActive = true;
|
|
|
result.list.coinList.forEach(function (x) {
|
|
|
result.list.coinList.forEach(function(x) {
|
|
|
x.date = x.date.replace(/\-/g, '.');
|
|
|
});
|
|
|
result.list.selects[selectIndex > 2 ? 2 : selectIndex].isSelected = 'selected';
|
...
|
...
|
|