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
692129b4
Commit
692129b4
authored
Nov 27, 2019
by
FE
Browse files
Options
Browse Files
Download
Plain Diff
pull and solve
parents
50ea2103
cac27805
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
242 additions
and
62 deletions
+242
-62
src/components/bargainMiddlePage/index.js
+11
-2
src/components/blessingGetPrize/index.js
+3
-2
src/components/blessingGetPrize/index.scss
+21
-13
src/components/blessingPreheat/banner/index.js
+2
-2
src/components/blessingPreheat/banner/index.scss
+4
-1
src/components/blessingPreheat/formal-draw/index.js
+22
-7
src/components/blessingPreheat/index.js
+123
-10
src/components/blessingPreheat/index.scss
+11
-0
src/components/blessingPreheat/live/index.js
+1
-1
src/components/detail/group/togroup.js
+4
-7
src/components/detail/index.js
+13
-16
src/components/myOrders/index.js
+12
-1
src/components/myOrders/index.scss
+15
-0
No files found.
src/components/bargainMiddlePage/index.js
View file @
692129b4
...
...
@@ -284,6 +284,7 @@ class BargainMiddlePage extends Component {
}
this
.
getBargainInfo
()
this
.
getBargainRankList
(
getParam
(
'id'
),
1
)
}
else
if
(
res
.
data
.
code
==
4030
||
res
.
data
.
code
==
4040
)
{
...
...
@@ -376,6 +377,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,6 +426,9 @@ class BargainMiddlePage extends Component {
/
>
<
/ul
>
<
div
className
=
"bargain-detail"
>
{
(
this
.
state
.
data
.
bargain_status
==
0
||
this
.
state
.
data
.
bargain_status
==
1
)
&&
<
div
>
<
div
className
=
"top"
>
<
div
>
已砍
<
span
className
=
{
'reduced-price'
}
>
{
this
.
state
.
bargainData
.
bargain_price
}
元
<
/span
>
...
...
@@ -446,6 +453,8 @@ class BargainMiddlePage extends Component {
<
div
className
=
"middle"
>
<
span
style
=
{{
width
:
this
.
state
.
width
}}
><
/span
>
<
/div
>
<
/div
>
}
{
this
.
state
.
isOriginator
===
1
&&
this
.
state
.
data
.
bargain_status
===
0
&&
<
div
>
...
...
@@ -625,13 +634,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
>
...
...
src/components/blessingGetPrize/index.js
View file @
692129b4
...
...
@@ -135,8 +135,9 @@ class BlessingGetPrize extends Component {
{
(
!
prize_data
||
prize_data
.
length
===
0
)
&&
(
<
div
className
=
"active_over_container"
>
<
img
src
=
'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/acitve__over.png'
alt
=
''
/>
<
p
>
七月在线双十一抽奖活动已结束,
感谢你的参与!
<
/p
>
<
p
>
AI
充电节返场已开启
<
/p
>
<
p
>
狂欢不能停
~<
/p
>
<
a
href
=
'/blessingPreheat'
className
=
'to_active'
>
立即查看
<
/a
>
<
/div
>
)
}
...
...
src/components/blessingGetPrize/index.scss
View file @
692129b4
...
...
@@ -199,22 +199,30 @@
.active_over_container
{
display
:
flex
;
flex-direction
:
column
;
justify-content
:
flex-start
;
justify-content
:
center
;
align-items
:
center
;
margin-top
:
7
0px
;
img
{
width
:
170px
;
height
:
134px
;
}
width
:
34
0px
;
height
:
156px
;
margin
:
4px
auto
;
background
:
url('https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/active_over.png')
center
center
no-repeat
;
background-size
:
100%
100%
;
p
{
width
:
238px
;
height
:
39px
;
font-size
:
16px
;
font-weight
:
400
;
font-size
:
18px
;
font-weight
:
500
;
color
:rgba
(
76
,
33
,
239
,
1
)
;
line-height
:
27px
;
}
.to_active
{
width
:
298px
;
height
:
44px
;
background
:linear-gradient
(
90deg
,
rgba
(
255
,
105
,
5
,
1
)
0
%
,
rgba
(
255
,
180
,
5
,
1
)
100
%
)
;
border-radius
:
5px
;
font-size
:
18px
;
font-weight
:
500
;
color
:rgba
(
255
,
255
,
255
,
1
)
;
line-height
:
24p
x
;
text-align
:
center
;
text-align-last
:
center
;
display
:
fle
x
;
justify-content
:
center
;
align-items
:
center
;
margin-top
:
20px
;
}
}
...
...
src/components/blessingPreheat/banner/index.js
View file @
692129b4
...
...
@@ -97,10 +97,10 @@ class Banner extends Component {
render
()
{
const
{
toSection
,
navs
,
index
,
isFormal
}
=
this
.
props
;
const
{
toSection
,
navs
,
index
,
isFormal
,
onlyShow
}
=
this
.
props
;
return
(
<
div
id
=
{
'main-banner'
}
>
<
div
className
=
{
`banner
${
isFormal
?
'formal_banner'
:
''
}
`
}
><
/div
>
<
div
className
=
{
`banner
${
isFormal
?
'formal_banner'
:
''
}
${
onlyShow
?
'fc_banner'
:
''
}
`
}
><
/div
>
<
nav
id
=
{
'main-nav'
}
>
<
ul
>
{
...
...
src/components/blessingPreheat/banner/index.scss
View file @
692129b4
#main-banner
{
overflow
:
auto
;
margin-bottom
:
70px
;
.banner
{
width
:
375px
;
height
:
183px
;
...
...
@@ -11,6 +10,10 @@
background
:
url("https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/formal_banner.png")
no-repeat
;
background-size
:
contain
;
}
.fc_banner
{
background
:
url('https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/fc_banner.png')
center
center
no-repeat
;
background-size
:
100%
100%
;
}
#main-nav
{
position
:
absolute
;
top
:
183px
;
...
...
src/components/blessingPreheat/formal-draw/index.js
View file @
692129b4
...
...
@@ -34,11 +34,11 @@ class FormalDraw extends Component {
}
shouldComponentUpdate
(
nextProps
,
nextState
,
nextContext
)
{
if
(
this
.
props
.
isApp
!==
nextProps
.
isApp
)
{
if
(
this
.
props
.
isApp
!==
nextProps
.
isApp
)
{
this
.
getPrizeData
()
return
false
;
return
false
}
return
true
;
return
true
}
getPrizeData
=
()
=>
{
...
...
@@ -46,9 +46,9 @@ class FormalDraw extends Component {
.
then
(
res
=>
{
const
{
data
,
code
,
msg
}
=
res
.
data
if
(
code
==
200
)
{
const
{
today
}
=
data
.
value
const
oneDay
=
data
.
list
.
filter
(
item
=>
item
.
date
===
data
.
value
.
today
)
const
activeIndex
=
oneDay
[
0
]
[
'son'
].
findIndex
(
item
=>
item
.
status
==
3
)
let
oneDay
=
data
.
list
.
find
(
item
=>
item
.
date
===
data
.
value
.
today
)
||
data
.
list
[
0
]
const
today
=
oneDay
.
date
const
activeIndex
=
oneDay
[
'son'
].
findIndex
(
item
=>
item
.
status
==
3
)
this
.
setState
({
tabs
:
data
.
list
.
map
(
item
=>
({
title
:
item
.
date
})),
today
,
...
...
@@ -161,7 +161,8 @@ class FormalDraw extends Component {
if
(
this
.
subscribePopupInstance
)
{
return
}
http
.
get
(
`
${
API
[
"base-api"
]}
/sys/activity/create_pre_qrcode`
,{
params
:{
id
}})
if
(
!
this
.
state
.
userValue
[
'is_pre'
])
{
http
.
get
(
`
${
API
[
"base-api"
]}
/sys/activity/create_pre_qrcode`
,
{
params
:
{
id
}})
.
then
(
res
=>
{
const
{
code
,
data
,
msg
}
=
res
.
data
if
(
code
==
200
)
{
...
...
@@ -180,6 +181,20 @@ class FormalDraw extends Component {
Toast
.
info
(
msg
,
2
,
null
,
false
)
}
})
}
else
{
http
.
get
(
`
${
API
[
"base-api"
]}
/activity_pre/
${
id
}
`
)
.
then
(
res
=>
{
const
{
code
}
=
res
.
data
if
(
code
==
200
)
{
Toast
.
info
(
'预约成功'
,
2
,
null
,
false
)
}
})
.
catch
(
err
=>
{
console
.
log
(
err
)
})
}
}
render
()
{
...
...
src/components/blessingPreheat/index.js
View file @
692129b4
...
...
@@ -51,6 +51,7 @@ class BlessingPreheat extends Component {
timelineShareVisible
:
false
,
showRecordList
:
false
,
isFormal
:
false
,
// 1正式 0 预热
onlyShow
:
false
,
// 14号返场
isServer
:
false
,
serverUrl
:
''
,
shareMark
:
false
,
...
...
@@ -104,6 +105,28 @@ class BlessingPreheat extends Component {
id
:
'live'
},
],
encoreNavs
:
[
{
text
:
'精品特惠'
,
id
:
'best-courses'
},
{
text
:
'大咖直播'
,
id
:
'live'
},
{
text
:
'幸运大抽奖'
,
id
:
'lucky-draw'
},
{
text
:
'积福气'
,
id
:
'lucky-value'
},
{
text
:
'AI测试'
,
id
:
'ai-test'
},
],
index
:
0
,
userHasError
:
props
.
user
.
hasError
,
isApp
:
false
,
...
...
@@ -119,9 +142,13 @@ class BlessingPreheat extends Component {
}
componentDidMount
()
{
const
_this
=
this
;
this
.
fetchUserBlessing
()
this
.
setInitialNavActiveStatus
()
window
.
addEventListener
(
'scroll'
,
throttle
(
this
.
calcNavActive
,
100
))
// setTimeout(function(){
// // 这里有获取ID的步骤,由于运营过多的调整,导致顺序不定,所以包含ID的title必须要放到判断中(防止出现多个title),设置定时器是因为如果返回较慢 获取不到ID导致报错
// _this.setInitialNavActiveStatus()
// }, 50);
// window.addEventListener('scroll', throttle(this.calcNavActive, 100))
if
(
is_weixin
())
{
wxShare
({
title
:
'AI充电节,积福气享1折秒课,超10万元奖品来就送!!'
,
...
...
@@ -155,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折秒课,海量奖品来就送-七月在线`
}
...
...
@@ -237,6 +267,9 @@ class BlessingPreheat extends Component {
return
findIndex
(
navs
,
item
=>
item
.
id
===
str
)
}
componentWillUnmount
()
{
window
.
removeEventListener
(
'scroll'
,
this
.
calcNavActive
);
}
setInitialNavActiveStatus
=
()
=>
{
const
observer
=
new
MutationObserver
(
debounce
((
list
,
observer
)
=>
{
...
...
@@ -254,11 +287,26 @@ class BlessingPreheat extends Component {
}
initNav
=
(
isFormal
)
=>
{
const
{
formalNavs
}
=
this
.
state
const
{
formalNavs
,
onlyShow
,
encoreNavs
}
=
this
.
state
if
(
isFormal
)
{
if
(
onlyShow
)
{
this
.
setState
({
navs
:
encoreNavs
},
()
=>
{
this
.
setInitialNavActiveStatus
()
window
.
addEventListener
(
'scroll'
,
throttle
(
this
.
calcNavActive
,
100
))
})
}
else
{
this
.
setState
({
navs
:
formalNavs
},
()
=>
{
this
.
setInitialNavActiveStatus
()
window
.
addEventListener
(
'scroll'
,
throttle
(
this
.
calcNavActive
,
100
))
})
}
}
}
...
...
@@ -269,12 +317,21 @@ class BlessingPreheat extends Component {
fetchUserBlessing
=
()
=>
{
const
{
userInfo
}
=
this
.
state
const
{
history
}
=
this
.
props
;
http
.
get
(
`
${
API
.
home
}
/sys/user/blessing`
).
then
(
res
=>
{
const
{
code
,
data
}
=
res
.
data
if
(
code
===
200
)
{
this
.
setState
({
if
(
data
.
is_over
)
{
if
(
!
getParam
(
'version'
))
{
history
.
push
(
'/'
);
}
else
{
SendMessageToApp
(
"toQualityCourse"
);
}
}
this
.
setState
(()
=>
({
isSign
:
!!
data
.
today_signed
,
isFormal
:
data
.
is_activity
,
onlyShow
:
data
.
onlyShow
,
testSum
:
parseInt
(
data
.
user_test_total
,
10
)
||
0
,
userInfo
:
Object
.
assign
({},
userInfo
,
{
isFollow
:
data
.
subscribed
,
...
...
@@ -282,7 +339,7 @@ class BlessingPreheat extends Component {
buyBlessing
:
(
data
.
types_total_blessing_value
&&
data
.
types_total_blessing_value
.
buy_course
)
?
data
.
types_total_blessing_value
.
buy_course
:
0
,
inviteBlessing
:
(
data
.
types_total_blessing_value
&&
data
.
types_total_blessing_value
.
invite
)
?
data
.
types_total_blessing_value
.
invite
:
0
,
})
})
})
);
if
(
data
.
is_login
===
1
)
{
this
.
handleToSign
()
}
...
...
@@ -411,14 +468,23 @@ class BlessingPreheat extends Component {
calcNavActive
=
()
=>
{
const
{
navs
,
index
}
=
this
.
state
const
y
=
window
.
scrollY
let
swipeDirection
=
y
>
this
.
prevY
?
'up'
:
'down'
let
_index
if
(
swipeDirection
===
'up'
)
{
if
(
Number
.
isInteger
(
index
)){
_index
=
(
index
+
1
)
>=
navs
.
length
?
index
:
index
+
1
}
else
{
_index
=
0
}
}
else
{
if
(
Number
.
isInteger
(
index
)){
_index
=
(
index
-
1
)
<=
0
?
0
:
index
-
1
}
else
{
_index
=
0
}
}
let
el
=
document
.
querySelector
(
`#
${
navs
[
_index
].
id
}
`
)
let
nav
=
document
.
querySelector
(
'#main-nav'
)
...
...
@@ -565,6 +631,7 @@ class BlessingPreheat extends Component {
testSum
,
address
,
addressPopupVisible
,
onlyShow
,
}
=
this
.
state
const
{
history
}
=
this
.
props
const
isLogin
=
!
this
.
props
.
user
.
hasError
...
...
@@ -575,13 +642,40 @@ class BlessingPreheat extends Component {
navs
=
{
navs
}
toSection
=
{
this
.
toSection
}
index
=
{
index
}
onlyShow
=
{
onlyShow
}
/
>
{
/* 精品课程特惠专区--返场 */
}
{
onlyShow
&&
(
<>
<
ListHeader
id
=
{
'best-courses'
}
text
=
"精品课程特惠专区"
styles
=
{{
margin
:
'60px 0 15px'
}}
/
>
<
CourseList
isApp
=
{
isApp
}
isFormal
=
{
isFormal
}
isLogin
=
{
isLogin
}
history
=
{
this
.
props
.
history
}
toLogin
=
{
this
.
toLogin
}
/
>
<
/
>
)
}
{
/* 大咖直播--返场 */
}
{
onlyShow
&&
<
Live
isFormal
=
{
isFormal
}
isLogin
=
{
isLogin
}
/
>
}
{
/* 抽奖--正式 */
}
{
isFormal
===
1
&&
<>
<
ListHeader
id
=
{
'lucky-draw'
}
text
=
"幸运大抽奖"
styles
=
{{
margin
:
'30px 0 10px'
}}
/
>
<
ListHeader
id
=
{
'lucky-draw'
}
text
=
"幸运大抽奖"
styles
=
{{
margin
:
onlyShow
?
'30px 0 10px'
:
'60px 0 10px'
}}
/
>
{
onlyShow
?
(
<
p
className
=
'active_over'
>
活动已结束
<
/p
>
)
:
null
}
<
div
className
=
"formal-draw-btns"
>
<
button
className
=
"luck-draw__button"
onClick
=
{()
=>
this
.
handleToShow
(
'isRule'
)}
>
活动规则
><
/button
>
<
button
className
=
'prize-record'
onClick
=
{
this
.
getMyPrizeRecord
}
>
中奖记录
><
/button
>
...
...
@@ -593,6 +687,11 @@ class BlessingPreheat extends Component {
{
/* 积福气 */
}
<
ListHeader
id
=
{
'lucky-value'
}
text
=
"积福气,享受更多福利"
styles
=
{{
margin
:
'30px 0 15px'
}}
/
>
{
onlyShow
?
(
<
p
className
=
'active_over'
>
活动已结束
<
/p
>
)
:
null
}
<
Link
className
=
"blessing__sort"
to
=
"/blessingRank"
><
/Link
>
...
...
@@ -630,6 +729,9 @@ class BlessingPreheat extends Component {
}
{
/* 精品课程特惠专区 */
}
{
!
onlyShow
&&
(
<>
<
ListHeader
id
=
{
'best-courses'
}
text
=
"精品课程特惠专区"
styles
=
{{
margin
:
'30px 0 15px'
}}
/
>
<
CourseList
isApp
=
{
isApp
}
...
...
@@ -638,6 +740,9 @@ class BlessingPreheat extends Component {
history
=
{
this
.
props
.
history
}
toLogin
=
{
this
.
toLogin
}
/
>
<
/
>
)
}
{
isRule
&&
...
...
@@ -660,7 +765,11 @@ class BlessingPreheat extends Component {
<
SharePopup
isClose
=
{
isClose
}
toClose
=
{()
=>
this
.
handleToHide
(
'shareMark'
)}
/
>
}
<
ListHeader
id
=
{
'ai-test'
}
text
=
"全国AI工程师水平测试"
styles
=
{{
margin
:
'30px 0 15px'
}}
/
>
{
onlyShow
?
(
<
p
className
=
'active_over'
>
活动已结束
<
/p
>
)
:
null
}
<
div
className
=
"test__record"
onClick
=
{()
=>
this
.
handleToShow
(
'showRecordList'
,
true
)}
>
测试记录
>
<
/div
>
...
...
@@ -674,7 +783,11 @@ class BlessingPreheat extends Component {
<
RankList
><
/RankList
>
<
Live
isFormal
=
{
isFormal
}
isLogin
=
{
isLogin
}
/
>
{
/* 大咖直播 -- 正式活动 */
}
{
!
onlyShow
&&
<
Live
isFormal
=
{
isFormal
}
isLogin
=
{
isLogin
}
/
>
}
{
addressPopupVisible
&&
<
div
className
=
"address-mask"
>
...
...
@@ -692,7 +805,7 @@ class BlessingPreheat extends Component {
/
>
<
input
type
=
"tel"
placeholder
=
{
'联系方式'
}
name
=
{
'
tel
'
}
name
=
{
'
phone
'
}
onChange
=
{
e
=>
{
this
.
setAddressState
(
e
)
}}
...
...
src/components/blessingPreheat/index.scss
View file @
692129b4
#blessing-preheat
{
background
:
#5327FA
;
padding-bottom
:
30px
;
.active_over
{
font-size
:
20px
;
color
:
#fff604
;
width
:
100%
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
margin-bottom
:
10px
;
}
}
.test__record
{
...
...
src/components/blessingPreheat/live/index.js
View file @
692129b4
...
...
@@ -30,8 +30,8 @@ class Live extends Component {
const
{
data
,
code
,
msg
}
=
res
.
data
if
(
code
==
200
)
{
let
tabs
=
uniqBy
(
data
,
item
=>
item
.
date
)
let
todayIndex
=
tabs
.
findIndex
(
item
=>
item
[
'is_today'
])
tabs
=
tabs
.
map
(
item
=>
({
title
:
item
.
date
}))
let
todayIndex
=
data
.
findIndex
(
item
=>
item
[
'is_today'
])
this
.
setState
({
tabs
,
...
...
src/components/detail/group/togroup.js
View file @
692129b4
...
...
@@ -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 @
692129b4
...
...
@@ -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
}
/
>
}
{
/*
* 砍价
...
...
src/components/myOrders/index.js
View file @
692129b4
...
...
@@ -127,6 +127,11 @@ class MyOrders extends Component {
id
=
{
item
.
course_id
}
toDetail
=
{
this
.
toCourseDetail
}
/
>
{
item
.
course_expire
&&
item
.
course_expire
!=
''
&&
<
span
className
=
'course-expire'
>
{
item
.
course_expire
}
<
/span
>
}
<
/div
>
)
})
...
...
@@ -135,12 +140,18 @@ class MyOrders extends Component {
<
PayInfo
item
=
{
item
}
cancel
=
{
this
.
cancel
}
/
>
{
item
.
type
==
5
&&
item
.
is_buy
==
0
&&
item
.
type
==
5
&&
item
.
is_buy
==
0
&&
item
.
is_overdue
==
0
&&
<
div
className
=
{
'expand-pay-wk'
}
>
<
span
className
=
{
'expand-pay-time'
}
>
{
item
.
final_end_time
}
结束付尾款
<
/span
>
<
span
>
还需支付尾款
<
/span
>
<
/div
>
}
{
item
.
type
==
5
&&
item
.
is_buy
==
0
&&
item
.
is_overdue
==
1
&&
<
div
className
=
{
'expand-pay-wk'
}
>
<
span
>
支付尾款时间已过
<
/span
>
<
/div
>
}
<
/div
>
)
})
...
...
src/components/myOrders/index.scss
View file @
692129b4
...
...
@@ -37,6 +37,21 @@
padding
:
10px
12px
;
background-color
:
$bg_fff
;
border-bottom
:
1px
solid
$border_e7eaf1
;
position
:
relative
;
.course-expire
{
display
:
block
;
width
:
92px
;
height
:
20px
;
line-height
:
20px
;
background
:
#FF3A3A
;
border-radius
:
0
10px
10px
0
;
position
:
absolute
;
color
:
#FFF
;
font-size
:
12px
;
left
:
12px
;
bottom
:
20px
;
text-align
:
center
;
}
}
.order-info
{
...
...
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