Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
taobao-mini-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
qinhaitao
taobao-mini-template
Commits
1f2739df
Commit
1f2739df
authored
Feb 19, 2021
by
王波
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化签到
parent
c42183c6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
5 deletions
+4
-5
sign.service.ts
v2.0/src/service/common/sign.service.ts
+1
-3
sign.d.ts
v2.0/src/typings/sign.d.ts
+1
-1
date.ts
v2.0/src/utils/common/date.ts
+2
-1
No files found.
v2.0/src/service/common/sign.service.ts
View file @
1f2739df
...
@@ -31,9 +31,7 @@ export default class SignService extends UserService {
...
@@ -31,9 +31,7 @@ export default class SignService extends UserService {
userNick
,
userNick
,
isSignLater
:
!!
subscribeSignDay
,
isSignLater
:
!!
subscribeSignDay
,
createDay
:
today
,
createDay
:
today
,
signTime
:
subscribeSignDay
signTime
:
subscribeSignDay
?
formatDate
(
subscribeSignDay
).
getDate
()
:
formatDate
().
getDate
(),
?
formatDate
(
subscribeSignDay
).
format
(
'YYYY-MM-DD'
)
:
formatDate
().
format
(
'YYYY-MM-DD'
),
signDay
:
subscribeSignDay
||
today
,
signDay
:
subscribeSignDay
||
today
,
createTime
:
Date
.
now
()
createTime
:
Date
.
now
()
})
})
...
...
v2.0/src/typings/sign.d.ts
View file @
1f2739df
...
@@ -6,7 +6,7 @@ interface IUserSign {
...
@@ -6,7 +6,7 @@ interface IUserSign {
userNick
:
string
userNick
:
string
createTime
:
number
createTime
:
number
createDay
:
string
createDay
:
string
signTime
:
string
signTime
?:
any
signDay
:
string
signDay
:
string
isSignLater
?:
boolean
// 是否补签
isSignLater
?:
boolean
// 是否补签
}
}
...
...
v2.0/src/utils/common/date.ts
View file @
1f2739df
...
@@ -42,6 +42,7 @@ export function formatDate(date: string | number = Date.now()) {
...
@@ -42,6 +42,7 @@ export function formatDate(date: string | number = Date.now()) {
getHour
:
()
=>
dayjs
(
beijingDate
).
get
(
'hour'
),
getHour
:
()
=>
dayjs
(
beijingDate
).
get
(
'hour'
),
getMinute
:
()
=>
dayjs
(
beijingDate
).
get
(
'minute'
),
getMinute
:
()
=>
dayjs
(
beijingDate
).
get
(
'minute'
),
geSecond
:
()
=>
dayjs
(
beijingDate
).
get
(
'second'
),
geSecond
:
()
=>
dayjs
(
beijingDate
).
get
(
'second'
),
getMillisecond
:
()
=>
dayjs
(
beijingDate
).
get
(
'millisecond'
)
getMillisecond
:
()
=>
dayjs
(
beijingDate
).
get
(
'millisecond'
),
getDate
:
()
=>
dayjs
(
beijingDate
).
date
()
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment