Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mr-julyedu
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
baiguangyao
mr-julyedu
Commits
3ac26ffd
Commit
3ac26ffd
authored
Nov 01, 2019
by
xuzhenghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
拼团
parent
015bdece
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
39 deletions
+46
-39
src/components/blessingPreheat/collectBlessing/index.js
+21
-21
src/components/detail/group/togroup.js
+7
-4
src/components/detail/index.js
+18
-14
No files found.
src/components/blessingPreheat/collectBlessing/index.js
View file @
3ac26ffd
...
...
@@ -51,7 +51,7 @@ class CollectBlessing extends Component {
]
}
],
seconds
:
10
,
seconds
:
5
,
};
}
...
...
@@ -118,7 +118,7 @@ class CollectBlessing extends Component {
});
}
}
fetchUserBlessing
(
key
,
cb
)
{
const
{
handleToShowShare
,
handleToHideShare
}
=
this
.
props
;
let
{
seconds
}
=
this
.
state
;
...
...
@@ -131,9 +131,9 @@ class CollectBlessing extends Component {
handleToShowShare
();
this
.
shareTimer
=
setInterval
(()
=>
{
this
.
setState
(
{
{
seconds
:
(
--
seconds
)
},
},
()
=>
{
if
(
seconds
===
0
)
{
typeof
cb
===
'function'
&&
cb
();
...
...
@@ -159,13 +159,13 @@ class CollectBlessing extends Component {
}
});
}
render
()
{
const
{
const
{
isSign
,
userInfo
:
{
isLogin
=
false
,
blessingVal
=
0
,
buyBlessing
=
0
,
inviteBlessing
=
0
},
handleToShowNotice
,
handleToShowList
,
userInfo
:
{
isLogin
=
false
,
blessingVal
=
0
,
buyBlessing
=
0
,
inviteBlessing
=
0
},
handleToShowNotice
,
handleToShowList
,
handleToShowInvite
,
handleToShow
,
toLogin
,
...
...
@@ -175,13 +175,13 @@ class CollectBlessing extends Component {
return
(
<
div
className
=
"collect-blessing"
>
{
isLogin
isLogin
?
(
<
ListHeader
text
=
{
`我的福气值:
${
blessingVal
}
分`
}
size
=
"middle"
styles
=
{{
margin
:
'20px 0 0 0'
}}
/
>
)
)
:
(
<
ListHeader
size
=
"middle"
styles
=
{{
margin
:
'20px 0 0 0'
}}
>
<
span
className
=
"text_nologin"
>
我的福气值:
<
/span>
<
span
className
=
"text_nologin"
>
我的福气值:
<
/span
>
<
span
onClick
=
{
toLogin
}
className
=
"login__btn"
>
登录
<
/span
>
<
/ListHeader
>
)
...
...
@@ -202,7 +202,7 @@ class CollectBlessing extends Component {
item
.
rules
.
map
(
item
=>
{
return
(
<
p
key
=
{
item
.
id
}
>
{
item
.
text
}
{
item
.
text
}
<
span
>
{
item
.
des
}
<
/span
>
<
/p
>
)
...
...
@@ -241,18 +241,18 @@ class CollectBlessing extends Component {
<
div
className
=
"collect-blessing__content"
data
-
layout
=
"column"
>
<
p
className
=
"collect-blessing__label"
>
去分享
<
/p
>
<
div
className
=
"collect-blessing__share"
>
<
a
className
=
"collect-blessing__share-button"
<
a
className
=
"collect-blessing__share-button"
data
-
type
=
"qq"
onClick
=
{
this
.
qqToShare
}
><
/a
>
<
a
className
=
"collect-blessing__share-button"
<
a
className
=
"collect-blessing__share-button"
data
-
type
=
"wechat"
onClick
=
{
this
.
wechatToShare
}
><
/a
>
<
a
className
=
"collect-blessing__share-button"
<
a
className
=
"collect-blessing__share-button"
data
-
type
=
"weibo"
onClick
=
{
this
.
weiboToShare
}
><
/a
>
...
...
@@ -274,8 +274,8 @@ class CollectBlessing extends Component {
}
{
index
===
5
&&
<
a
className
=
"collect-blessing__content"
<
a
className
=
"collect-blessing__content"
onClick
=
{
toSection
}
>
<
span
>
去选课
<
/span
>
<
i
>
已加
{
buyBlessing
}
点
<
/i
>
...
...
src/components/detail/group/togroup.js
View file @
3ac26ffd
...
...
@@ -63,16 +63,19 @@ class ToGroup extends Component {
if
(
res
.
data
.
data
.
is_success
===
0
)
{
let
date
=
res
.
data
.
data
.
end_time
*
1000
,
day
=
0
,
hours
=
0
,
minutes
=
0
,
seconds
=
0
;
setInterval
(()
=>
{
date
-=
1000
hours
=
`
${
parseInt
(
date
/
(
60
*
60
*
1000
))}
`
.
padStart
(
2
,
0
);
minutes
=
`
${
parseInt
((
date
-
hours
*
3600000
)
/
60000
)}
`
.
padStart
(
2
,
0
);
seconds
=
`
${
parseInt
((
date
-
hours
*
3600000
-
minutes
*
60000
)
/
1000
)}
`
.
padStart
(
2
,
0
);
day
=
`
${
parseInt
(
date
/
(
3600000
*
24
))}
`
.
padStart
(
2
,
0
);
hours
=
`
${
parseInt
((
date
-
day
*
3600000
*
24
)
/
3600000
)}
`
.
padStart
(
2
,
0
);
minutes
=
`
${
parseInt
((
date
-
day
*
3600000
*
24
-
hours
*
3600000
)
/
60000
)}
`
.
padStart
(
2
,
0
);
seconds
=
`
${
parseInt
((
date
-
day
*
3600000
*
24
-
hours
*
3600000
-
minutes
*
60000
)
/
1000
)}
`
.
padStart
(
2
,
0
);
this
.
setState
({
countdown
:
`
${
hours
}
:
${
minutes
}
:
${
seconds
}
`
// countdown: `${day}:${hours}:${minutes}:${seconds}`
countdown
:
`
${
day
}
:
${
hours
}
:
${
minutes
}
`
});
},
1000
)
}
...
...
src/components/detail/index.js
View file @
3ac26ffd
...
...
@@ -79,7 +79,7 @@ class Detail extends Component {
if
(
getParam
(
'ac'
)
&&
Number
(
getParam
(
'ac'
))
===
11
)
{
this
.
getBorwerCourse
();
}
}
getBorwerCourse
=
()
=>
{
...
...
@@ -345,16 +345,19 @@ class Detail extends Component {
if
(
course_info
.
group_status
===
3
||
course_info
.
group_status
===
4
)
{
let
endTime
=
course_info
.
pdd_group_info
.
groupon_member
.
end_time
;
let
date
=
endTime
*
1000
,
day
=
0
,
hours
=
0
,
minutes
=
0
,
seconds
=
0
;
setInterval
(()
=>
{
date
-=
1000
hours
=
`
${
parseInt
(
date
/
(
60
*
60
*
1000
))}
`
.
padStart
(
2
,
0
);
minutes
=
`
${
parseInt
((
date
-
hours
*
3600000
)
/
60000
)}
`
.
padStart
(
2
,
0
);
seconds
=
`
${
parseInt
((
date
-
hours
*
3600000
-
minutes
*
60000
)
/
1000
)}
`
.
padStart
(
2
,
0
);
day
=
`
${
parseInt
(
date
/
(
3600000
*
24
))}
`
.
padStart
(
2
,
0
);
hours
=
`
${
parseInt
((
date
-
day
*
3600000
*
24
)
/
3600000
)}
`
.
padStart
(
2
,
0
);
minutes
=
`
${
parseInt
((
date
-
day
*
3600000
*
24
-
hours
*
3600000
)
/
60000
)}
`
.
padStart
(
2
,
0
);
seconds
=
`
${
parseInt
((
date
-
day
*
3600000
*
24
-
hours
*
3600000
-
minutes
*
60000
)
/
1000
)}
`
.
padStart
(
2
,
0
);
this
.
setState
({
countdown
:
`
${
hours
}
:
${
minutes
}
:
${
seconds
}
`
// countdown: `${day}:${hours}:${minutes}:${seconds}`
countdown
:
`
${
day
}
:
${
hours
}
:
${
minutes
}
`
});
},
1000
)
}
...
...
@@ -700,15 +703,16 @@ class Detail extends Component {
* 拼团价格为1分钱时,不允许参团
*/
}
{
isCent
&&
!
course_info
.
is_aist
&&
(
course_info
.
group_status
===
3
||
course_info
.
group_status
===
4
)
&&
<
Group
courseInfo
=
{
course_info
}
history
=
{
this
.
props
.
history
}
countdown
=
{
countdown
}
invitedFriends
=
{
this
.
invitedFriends
}
/
>
}
{
/*双十一期间不需要显示*/
}
{
/*{*/
}
{
/*isCent && !course_info.is_aist && (course_info.group_status === 3 || course_info.group_status === 4) &&*/
}
{
/*<Group*/
}
{
/*courseInfo={course_info}*/
}
{
/*history={this.props.history}*/
}
{
/*countdown={countdown}*/
}
{
/*invitedFriends={this.invitedFriends}*/
}
{
/*/>*/
}
{
/*}*/
}
{
/*
* 砍价
...
...
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