Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
business-assistant
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 7a9eea6b
authored
Mar 30, 2023
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
众筹-时间计算
1 parent
564e0daa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
2 deletions
pages/tab/output/components/client/client.js
pages/tab/output/components/client/client.js
View file @
7a9eea6
...
@@ -113,8 +113,31 @@ Component({
...
@@ -113,8 +113,31 @@ Component({
console
.
log
(
data
,
'data----'
)
console
.
log
(
data
,
'data----'
)
data
?.
merchantList
.
forEach
(
item
=>
{
data
?.
merchantList
.
forEach
(
item
=>
{
let
_list
=
item
?.
merchantActivityRevenueDTO
?.
statistics
||
[]
let
_list
=
item
?.
merchantActivityRevenueDTO
?.
statistics
||
[]
_list
.
forEach
(
k
=>
{
_list
.
forEach
(
n
=>
{
let
_activityList
=
k
?.
activityList
||
[]
let
_activityList
=
n
?.
activityList
||
[]
_activityList
.
forEach
(
k
=>
{
// 时间
k
.
time
=
k
.
startTime
.
slice
(
0
,
16
).
replace
(
/-/g
,
'.'
)
+
' - '
+
k
.
endTime
.
slice
(
0
,
16
).
replace
(
/-/g
,
'.'
)
let
startTimeFormat
=
k
.
startTime
.
slice
(
0
,
10
).
replace
(
/-/g
,
'/'
)
+
' 00:00:00'
let
nowDateFormat
=
new
Date
().
toLocaleDateString
().
replace
(
/-/g
,
'/'
)
+
' 23:59:59'
// activityStatus 1:未开始 2:进行中 3:已结束
switch
(
k
.
activityStatus
)
{
case
1
:
k
.
interDays
=
parseInt
((
new
Date
(
startTimeFormat
).
getTime
()
-
new
Date
().
getTime
())
/
(
1000
*
60
*
60
*
24
))
+
1
k
.
realTime
=
'-'
break
case
2
:
let
endTimeFormat
=
k
.
endTime
.
slice
(
0
,
10
).
replace
(
/-/g
,
'/'
)
+
' 23:59:59'
k
.
interDays
=
parseInt
((
new
Date
().
getTime
()
-
new
Date
(
startTimeFormat
).
getTime
())
/
(
1000
*
60
*
60
*
24
))
+
1
k
.
toEndDays
=
parseInt
((
new
Date
(
endTimeFormat
).
getTime
()
-
new
Date
(
nowDateFormat
).
getTime
())
/
(
1000
*
60
*
60
*
24
))
+
1
k
.
realTime
=
k
.
realStartTime
?.
slice
(
0
,
16
).
replace
(
/-/g
,
'.'
)
+
' - '
+
'已开始'
+
k
.
interDays
+
'天'
break
case
3
:
k
.
interDays
=
parseInt
((
new
Date
(
nowDateFormat
).
getTime
()
-
new
Date
(
k
.
endTime
.
replace
(
/-/g
,
'/'
)).
getTime
())
/
(
1000
*
60
*
60
*
24
))
+
1
k
.
realTime
=
(
k
.
realStartTime
?.
slice
(
0
,
16
).
replace
(
/-/g
,
'.'
)
||
''
)
+
' - '
+
(
k
.
realEndTime
?.
slice
(
0
,
16
).
replace
(
/-/g
,
'.'
)
||
''
)
break
}
})
_obj
.
activityList
=
_obj
.
activityList
.
concat
(
_activityList
)
_obj
.
activityList
=
_obj
.
activityList
.
concat
(
_activityList
)
})
})
})
})
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment