Commit 22e04fa1 authored by wzy's avatar wzy

fix: 处理时间戳长度问题

parent 01d79fb9
......@@ -103,7 +103,10 @@ const DetailLibrary: React.FC<{}> = () => {
dataIndex: 'effectiveStartTime',
key: 'effectiveStartTime',
render: text => {
return text ? moment(text).format('YYYY-MM-DD') : undefined;
if (text) {
const t = text * Math.pow(10, 13 - text.toString().length);
return moment(t).format('YYYY-MM-DD');
}
},
},
{
......@@ -113,7 +116,10 @@ const DetailLibrary: React.FC<{}> = () => {
dataIndex: 'effectiveEndTime',
key: 'effectiveEndTime',
render: text => {
return text ? moment(text).format('YYYY-MM-DD') : undefined;
if (text) {
const t = text * Math.pow(10, 13 - text.toString().length);
return moment(t).format('YYYY-MM-DD');
}
},
},
];
......
......@@ -128,7 +128,10 @@ const PriceLibrary: React.FC<{}> = () => {
dataIndex: 'effectiveStartTime',
key: 'effectiveStartTime',
render: text => {
return text ? moment(text).format('YYYY-MM-DD') : undefined;
if (text) {
const t = text * Math.pow(10, 13 - text.toString().length);
return moment(t).format('YYYY-MM-DD');
}
},
},
{
......@@ -138,7 +141,10 @@ const PriceLibrary: React.FC<{}> = () => {
dataIndex: 'effectiveEndTime',
key: 'effectiveEndTime',
render: text => {
return text ? moment(text).format('YYYY-MM-DD') : undefined;
if (text) {
const t = text * Math.pow(10, 13 - text.toString().length);
return moment(t).format('YYYY-MM-DD');
}
},
},
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment