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
fd6b21b9
Commit
fd6b21b9
authored
Nov 20, 2019
by
xuzhenghua
Browse files
Options
Browse Files
Download
Plain Diff
pull
parents
b6c49325
b259cfee
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
65 additions
and
60 deletions
+65
-60
src/components/bargainMiddlePage/index.js
+44
-36
src/components/blessingPreheat/index.js
+4
-1
src/components/detail/group/togroup.js
+4
-7
src/components/detail/index.js
+13
-16
No files found.
src/components/bargainMiddlePage/index.js
View file @
fd6b21b9
...
...
@@ -376,6 +376,9 @@ class BargainMiddlePage extends Component {
if
(
bargain_status
===
0
)
{
bargainBtn
=
<
button
className
=
'active-btn'
onClick
=
{
this
.
shareFriendBargain
}
>
邀请好友砍价
<
/button
>
}
else
{
bargainBtn
=
<
button
className
=
{
'invalid-btn'
}
>
砍价结束
<
/button
>
}
}
else
{
if
(
assist_status
===
0
&&
bargain_status
===
0
)
{
bargainBtn
=
<
button
className
=
'active-btn'
onClick
=
{
this
.
friendBargainFirst
}
>
帮好友砍一刀
<
/button
>
...
...
@@ -422,30 +425,35 @@ class BargainMiddlePage extends Component {
/
>
<
/ul
>
<
div
className
=
"bargain-detail"
>
<
div
className
=
"top"
>
{
(
this
.
state
.
data
.
bargain_status
==
0
||
this
.
state
.
data
.
bargain_status
==
1
)
&&
<
div
>
已砍
<
span
className
=
{
'reduced-price'
}
>
{
this
.
state
.
bargainData
.
bargain_price
}
元
<
/span
>
<
/div
>
{
this
.
state
.
data
.
bargain_status
===
0
&&
<
div
>
<
div
className
=
"top"
>
<
div
>
已砍
<
span
className
=
{
'reduced-price'
}
>
{
this
.
state
.
bargainData
.
bargain_price
}
元
<
/span
>
<
/div
>
{
this
.
state
.
data
.
bargain_status
===
0
&&
<
div
>
<
span
className
=
{
'time hour'
}
>
{
String
(
this
.
state
.
hour
).
padStart
(
2
,
0
)}
<
/span> : 
;
<
span
className
=
{
'time min'
}
>
{
String
(
this
.
state
.
min
).
padStart
(
2
,
0
)}
<
/span> : 
;
<
span
className
=
{
'time sec'
}
>
{
String
(
this
.
state
.
sec
).
padStart
(
2
,
0
)}
<
/span
>
<
span
className
=
{
'inactive'
}
>
后砍价结束
<
/span
>
<
/div
>
}
{
this
.
state
.
data
.
bargain_status
===
1
&&
this
.
state
.
isOriginator
===
1
&&
<
span
className
=
{
'inactive'
}
>
砍价结束
<
/span
>
}
<
span
className
=
{
'time min'
}
>
{
String
(
this
.
state
.
min
).
padStart
(
2
,
0
)}
<
/span> : 
;
<
span
className
=
{
'time sec'
}
>
{
String
(
this
.
state
.
sec
).
padStart
(
2
,
0
)}
<
/span
>
<
span
className
=
{
'inactive'
}
>
后砍价结束
<
/span
>
<
/div
>
}
{
this
.
state
.
data
.
bargain_status
===
1
&&
this
.
state
.
isOriginator
===
1
&&
<
span
className
=
{
'inactive'
}
>
砍价结束
<
/span
>
}
<
/div
>
<
div
className
=
"middle"
>
<
span
style
=
{{
width
:
this
.
state
.
width
}}
><
/span
>
<
/div
>
<
/div
>
<
div
className
=
"middle"
>
<
span
style
=
{{
width
:
this
.
state
.
width
}}
><
/span
>
<
/div
>
<
/div
>
}
{
this
.
state
.
isOriginator
===
1
&&
this
.
state
.
data
.
bargain_status
===
0
&&
<
div
>
...
...
@@ -541,7 +549,7 @@ class BargainMiddlePage extends Component {
<
Overlay
>
<
div
className
=
"bargain-popup__content"
>
{
/*砍价成功去分享*/
}
{
...
...
@@ -561,7 +569,7 @@ class BargainMiddlePage extends Component {
} */
}
{
this
.
state
.
status
===
1
&&
<
FollowBarcode
<
FollowBarcode
userInfo
=
{
this
.
props
.
user
.
data
}
money
=
{
this
.
state
.
amount
}
firendBaigainPrice
=
{
this
.
state
.
firendBaigainPrice
}
...
...
@@ -625,13 +633,13 @@ function CourseDes(props) {
<
span
className
=
{
'discount-price'
}
>
¥
{
course
.
course_price
}
<
/span
>
{
/* is_originator 是否发起人 0-否 1-是 */
}
{
(
is_originator
==
=
1
&&
bargain_status
!==
3
)
&&
(
is_originator
==
1
&&
bargain_status
==
0
||
bargain_status
==
1
)
&&
<
button
className
=
{
'purchase-btn'
}
onClick
=
{
toCart
}
>
¥
{
course
.
pay_price
}
去支付
<
/button
>
}
{
(
is_originator
==
=
1
&&
bargain_status
=
==
3
)
&&
(
is_originator
==
1
&&
bargain_status
==
3
)
&&
<
span
className
=
"course-button__buy--done"
>
已购买
<
/span
>
}
<
/div
>
...
...
@@ -640,7 +648,7 @@ function CourseDes(props) {
}
function
CourseBottom
(
props
)
{
// bargain_status 砍价状态 0-砍价中,1砍价结束,待支付,2砍价过期(没有砍价记录没有砍价信息),3已购买
const
{
course_id
=
''
,
bargain_status
=
''
,
price1
=
''
,
pay_price
=
''
}
=
props
.
item
||
{};
const
{
user
:
{
data
=
{}
}
}
=
props
;
...
...
@@ -653,19 +661,19 @@ function CourseBottom(props) {
<
div
className
=
""
>
<
a
onClick
=
{()
=>
props
.
toDetail
(
props
.
item
.
course_id
)}
className
=
{
'bargain bargian-study'
}
>
我要砍价
<
/a
>
<
/div
>
)
}
else
if
(
bargain_status
===
3
)
{
if
(
course_id
===
139
)
{
Buttons
=
(
<
a
onClick
=
{()
=>
props
.
toDetail
(
props
.
item
.
course_id
)}
<
a
onClick
=
{()
=>
props
.
toDetail
(
props
.
item
.
course_id
)}
className
=
{
'bargain bargian-study'
}
>
我要砍价
<
/a
>
);
}
else
{
Buttons
=
(
<
Link
<
Link
to
=
{
`/play/video?id=
${
props
.
item
.
v_course_id
}
`
}
className
=
{
classnames
(
'bargain'
,
'button--study'
)}
>
去学习
<
/Link
>
...
...
@@ -685,7 +693,7 @@ function CourseBottom(props) {
bargain_status
===
0
&&
<
a
onClick
=
{()
=>
props
.
toDetail
(
props
.
item
.
course_id
)}
className
=
{
'bargain-btn'
}
>
继续砍价
<
/a
>
}
<
button
<
button
onClick
=
{()
=>
props
.
toCartBottom
(
props
.
item
.
course_id
)}
className
=
{
'purchase-btn'
}
>
...
...
@@ -694,16 +702,16 @@ function CourseBottom(props) {
<
/div
>
)
}
}
else
{
Buttons
=
(
<
a
onClick
=
{()
=>
props
.
toDetail
(
props
.
item
.
course_id
)}
<
a
onClick
=
{()
=>
props
.
toDetail
(
props
.
item
.
course_id
)}
className
=
{
'bargain bargian-study'
}
>
我要砍价
<
/a
>
);
}
return
(
<
div
className
=
"course-bottom"
>
<
div
className
=
{
'course-price'
}
>
...
...
@@ -725,9 +733,9 @@ function PublicNumber(props) {
<
p
className
=
'status-title ff4'
>
谢谢你帮我砍了
{
props
.
money
}
元!
<
/p
>
}
<
p
className
=
'status-dec'
>
关注公众号,可以再砍一刀哦
~<
/p
>
<
img
<
img
className
=
'public-number-img'
src
=
"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/tinypng-common/right_weixin.png"
src
=
"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/tinypng-common/right_weixin.png"
alt
=
""
/>
<
/div
>
...
...
src/components/blessingPreheat/index.js
View file @
fd6b21b9
...
...
@@ -182,9 +182,12 @@ class BlessingPreheat extends Component {
}
componentWillUpdate
()
{
const
{
isFormal
}
=
this
.
state
;
const
{
isFormal
,
onlyShow
}
=
this
.
state
;
if
(
isFormal
===
1
)
{
document
.
title
=
`11.11-11.13 AI充电节,为AI出击!重磅好课1折秒,海量奖品来就送-七月在线`
if
(
onlyShow
)
{
document
.
title
=
`11.14 AI充电节 返场钜惠!200本纸质书送完即止!`
}
}
else
{
document
.
title
=
`11.11-11.13 AI充电节,预热来袭!积福气享1折秒课,海量奖品来就送-七月在线`
}
...
...
src/components/detail/group/togroup.js
View file @
fd6b21b9
...
...
@@ -65,19 +65,16 @@ 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
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
);
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
);
this
.
setState
({
// countdown: `${day}:${hours}:${minutes}:${seconds}`
countdown
:
`
${
day
}
天
${
hours
}
时
${
minutes
}
分`
countdown
:
`
${
hours
}
:
${
minutes
}
:
${
seconds
}
`
});
},
1000
)
}
...
...
src/components/detail/index.js
View file @
fd6b21b9
...
...
@@ -345,19 +345,16 @@ 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
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
);
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
);
this
.
setState
({
// countdown: `${day}:${hours}:${minutes}:${seconds}`
countdown
:
`
${
day
}
天
${
hours
}
时
${
minutes
}
分`
countdown
:
`
${
hours
}
:
${
minutes
}
:
${
seconds
}
`
});
},
1000
)
}
...
...
@@ -704,15 +701,15 @@ class Detail extends Component {
*/
}
{
/*双十一期间不需要显示 不要删除*/
}
{
/*{*/
}
{
/*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