Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-marketing
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 c3fdb02e
authored
Sep 02, 2022
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
众筹
1 parent
6d982563
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
66 deletions
src/views/seckillActivity/crowdEditWechat.vue
src/views/seckillActivity/editCrowdFund.vue
src/views/seckillActivity/crowdEditWechat.vue
View file @
c3fdb02
...
@@ -55,83 +55,23 @@ export default {
...
@@ -55,83 +55,23 @@ export default {
name
:
'crowdEditWechat'
,
name
:
'crowdEditWechat'
,
data
()
{
data
()
{
return
{
return
{}
// 倒计时
countDownObj
:
{
typeTxt
:
'距离活动开始'
,
activityStatus
:
1
,
d
:
''
,
h
:
''
,
m
:
''
,
s
:
''
},
}
},
},
props
:
{
props
:
{
editForm
:
{
editForm
:
{
type
:
Object
,
type
:
Object
,
default
:
()
=>
{
}
default
:
()
=>
{
}
},
countDownObj
:
{
type
:
Object
,
default
:
()
=>
{
}
}
}
},
},
mounted
()
{
},
mounted
()
{
},
methods
:
{
methods
:
{}
findCountDownTime
()
{
let
startTime
=
new
Date
(
this
.
editForm
.
activityTime
[
0
])
let
endTime
=
new
Date
(
this
.
editForm
.
activityTime
[
1
])
let
currentTime
=
new
Date
()
// activityStatus 1:未开始,2进行中,3已结束
let
activityStatus
=
currentTime
<
startTime
?
1
:
endTime
<
currentTime
?
2
:
3
return
{
activityStatus
,
startTime
:
activityStatus
==
1
?
currentTime
:
activityStatus
==
2
?
currentTime
:
endTime
,
endTime
:
activityStatus
==
1
?
startTime
:
activityStatus
==
2
?
endTime
:
endTime
}
},
countDown
()
{
if
(
this
.
editForm
.
activityTime
&&
this
.
editForm
.
activityTime
.
length
)
{
let
{
activityStatus
,
startTime
,
endTime
}
=
this
.
findCountDownTime
()
let
lefttime
=
parseInt
((
endTime
.
getTime
()
-
startTime
.
getTime
())
/
1000
)
let
d
=
parseInt
(
lefttime
/
(
24
*
60
*
60
))
let
h
=
parseInt
((
lefttime
/
(
60
*
60
))
%
24
)
let
m
=
parseInt
((
lefttime
/
60
)
%
60
)
let
s
=
parseInt
(
lefttime
%
60
)
h
=
this
.
addZero
(
h
)
m
=
this
.
addZero
(
m
)
s
=
this
.
addZero
(
s
)
let
typeTxt
=
{
1
:
'距离活动开始'
,
2
:
'距离活动结束'
,
3
:
'活动倒计时'
}[
activityStatus
]
if
(
this
.
time
)
clearTimeout
(
this
.
time
)
this
.
time
=
setTimeout
(()
=>
{
if
(
d
>
0
)
d
=
this
.
addZero
(
d
)
this
.
countDownObj
=
{
typeTxt
:
typeTxt
,
d
:
d
,
h
:
h
,
m
:
m
,
s
:
s
}
this
.
countDown
()
},
1
*
1000
)
}
else
{
this
.
countDownObj
=
{
typeTxt
:
'距离活动开始'
,
d
:
''
,
h
:
''
,
m
:
''
,
s
:
''
}
}
}
}
}
}
</
script
>
</
script
>
...
...
src/views/seckillActivity/editCrowdFund.vue
View file @
c3fdb02
This diff is collapsed.
Click to expand it.
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