Skip to content

Commit 8a9dfcb

Browse files
author
pedro
authored
Merge pull request #10 from TaleLin/docs
fix:修复时间戳的位数
2 parents 05bb84f + bfea1e3 commit 8a9dfcb

3 files changed

Lines changed: 3 additions & 4 deletions

File tree

lib/core.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import { set, get, has, merge } from "lodash";
1717
import { Loader } from "./loader";
1818
import { LinRouter } from "./lin-router";
1919
import { verify } from "./password-hash";
20-
import dayjs from "dayjs";
2120
import { config } from "./config";
2221

2322
// tslint:disable-next-line:variable-name

lib/interface.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export const InfoCrudMixin = {
1717
getterMethods: {
1818
createTime() {
1919
// @ts-ignore
20-
return dayjs(this.getDataValue("create_time")).unix();
20+
return dayjs(this.getDataValue("create_time")).unix() * 1000;
2121
}
2222
}
2323
}
@@ -180,7 +180,7 @@ export const LogInterface = {
180180
getterMethods: {
181181
time() {
182182
// @ts-ignore
183-
return dayjs(this.getDataValue("time")).unix();
183+
return dayjs(this.getDataValue("time")).unix() * 1000;
184184
}
185185
}
186186
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lin-mizar",
3-
"version": "0.0.1-alpha.25",
3+
"version": "0.0.1-alpha.26",
44
"description": "The core library of Lin CMS",
55
"main": "lin/index.js",
66
"scripts": {

0 commit comments

Comments
 (0)