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
7b8ee3af
Commit
7b8ee3af
authored
Jan 03, 2020
by
xuzhenghua
Browse files
Options
Browse Files
Download
Plain Diff
PULL
parents
7354fb6f
e29a45cd
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
363 additions
and
384 deletions
+363
-384
src/App.js
+37
-6
src/assets/css/index.scss
+0
-16
src/components/Index/index.scss
+3
-1
src/components/activity/newyear-2019/landing/index.js
+303
-344
src/components/detail/btnstatus/index.js
+20
-17
No files found.
src/App.js
View file @
7b8ee3af
...
...
@@ -37,6 +37,7 @@ class App extends Component {
componentDidMount
()
{
this
.
umengStatistic
()
this
.
QimoClient
()
//平台信息
...
...
@@ -276,13 +277,43 @@ class App extends Component {
}
}
// 七陌客服代码 start
QimoClient
=
()
=>
{
let
utm_source
=
getParam
(
'utm_source'
)
let
utm_medium
=
getParam
(
'utm_medium'
)
let
utm_campaign
=
getParam
(
'utm_campaign'
)
let
utm_content
=
getParam
(
'utm_content'
)
let
utm_term
=
getParam
(
'utm_term'
)
var
src
=
''
// 知乎投放
if
(
utm_term
&&
utm_source
&&
utm_medium
&&
utm_campaign
&&
utm_content
)
{
src
=
'https://webchat.7moor.com/javascripts/7moorInit.js?accessId=e2ca4f90-2d04-11ea-84c3-43908ae47640&autoShow=true&language=ZHCN'
}
else
{
// m端
src
=
'https://webchat.7moor.com/javascripts/7moorInit.js?accessId=fbcf9aa0-2d03-11ea-84c3-43908ae47640&autoShow=true&language=ZHCN'
}
var
script
=
document
.
createElement
(
'script'
)
script
.
type
=
'text/javascript'
script
.
src
=
src
script
.
async
=
'async'
var
qimoClientId
=
''
// 自定义用户的唯一id,由英文字母,数字,下划线组成
http
.
get
(
`
${
API
[
'home'
]}
/qiMoUserId`
)
.
then
(
res
=>
{
qimoClientId
=
res
.
data
.
userId
document
.
body
.
appendChild
(
script
)
})
}
// 七陌客服代码 end
render
()
{
return
<>
<
Routes
/>
<
Link
className
=
{
'year19-index'
}
to
=
"/year/yearindex"
>
<
img
src
=
"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/gift-package.png"
alt
=
""
/>
<
/Link
>
<
/
>
return
<
Routes
/>
}
}
...
...
src/assets/css/index.scss
View file @
7b8ee3af
...
...
@@ -512,18 +512,3 @@ input[type="radio"]:checked:before {
color
:
#333
;
font-size
:
15px
;
}
.year19-index
{
display
:
block
;
width
:
58px
;
height
:
70px
;
position
:
fixed
;
top
:
50%
;
right
:
0
;
margin-top
:
-35px
;
z-index
:
9
;
img
{
width
:
100%
;
height
:
100%
;
}
}
\ No newline at end of file
src/components/Index/index.scss
View file @
7b8ee3af
#chatBtn
{
bottom
:
60px
!
important
;
}
.index-box
{
overflow
:
hidden
;
background-color
:
$bg_fff
;
...
...
src/components/activity/newyear-2019/landing/index.js
View file @
7b8ee3af
...
...
@@ -38,7 +38,6 @@ class Landing extends Component {
}
componentDidMount
()
{
this
.
getStage
();
this
.
fetchPageData
()
window
.
showFollowAlert
=
this
.
remind
.
bind
(
this
,
'create'
)
document
.
title
=
'七月在线年终大回馈,幸运宝箱随你开,100%有奖!'
...
...
@@ -48,7 +47,6 @@ class Landing extends Component {
landing
.
style
.
minHeight
=
`
${
window
.
innerHeight
}
px`
boxContainer
.
style
.
minHeight
=
`
${
window
.
innerHeight
}
px`
}
this
.
createMeta
();
}
componentDidUpdate
(
prevProps
)
{
...
...
@@ -66,45 +64,6 @@ class Landing extends Component {
this
.
shareTipPopup
&&
this
.
shareTipPopup
.
remove
()
}
// 获取活动以及宝箱的阶段
getStage
=
()
=>
{
http
.
get
(
`
${
API
.
home
}
/activity/stage`
).
then
(
res
=>
{
const
{
code
,
data
,
msg
}
=
res
.
data
if
(
code
===
200
)
{
if
(
Number
(
data
.
activity_stage
)
===
0
)
{
this
.
props
.
history
.
push
(
'/'
);
return
;
}
}
else
{
Toast
.
info
(
msg
,
2
)
}
})
}
createMeta
=
(
title
,
dec
,
imgname
)
=>
{
let
meta
=
document
.
createElement
(
'meta'
);
meta
.
setAttribute
(
'name'
,
'description'
)
meta
.
setAttribute
(
'itemprop'
,
'description'
)
meta
.
setAttribute
(
'content'
,
'这里是自定义分享的描述'
)
let
meta2
=
document
.
createElement
(
'meta'
);
meta2
.
setAttribute
(
'itemprop'
,
'name'
)
meta2
.
setAttribute
(
'content'
,
'这里是标题'
)
let
meta3
=
document
.
createElement
(
'meta'
);
meta3
.
setAttribute
(
'itemprop'
,
'image'
)
meta3
.
setAttribute
(
'content'
,
'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/wx-share-icon.png'
)
let
head
=
document
.
getElementsByTagName
(
'head'
)[
0
];
head
.
appendChild
(
meta
);
head
.
appendChild
(
meta2
);
head
.
appendChild
(
meta3
);
}
componentWillUnmount
()
{
this
.
shareTipPopup
&&
this
.
shareTipPopup
.
remove
()
}
createMeta
=
(
title
,
dec
,
imgname
)
=>
{
let
meta
=
document
.
createElement
(
'meta'
)
meta
.
setAttribute
(
'name'
,
'description'
)
...
...
@@ -131,44 +90,44 @@ class Landing extends Component {
treasure_code
,
origin
})
.
then
(
res
=>
{
const
{
data
,
code
,
msg
}
=
res
.
data
if
(
code
==
200
)
{
this
.
setState
({
teamData
:
data
,
isCaptain
:
sessionStorage
.
getItem
(
'isCaptain'
)
?
sessionStorage
.
getItem
(
'isCaptain'
)
:
getParam
(
'origin'
)
==
1
,
activityEnd
:
data
.
status
==
5
})
.
then
(
res
=>
{
const
{
data
,
code
,
msg
}
=
res
.
data
if
(
code
==
200
)
{
this
.
setState
({
teamData
:
data
,
isCaptain
:
sessionStorage
.
getItem
(
'isCaptain'
)
?
sessionStorage
.
getItem
(
'isCaptain'
)
:
getParam
(
'origin'
)
==
1
,
activityEnd
:
data
.
status
==
5
})
this
.
setupWxShareConfig
(
data
.
member
)
this
.
setupWxShareConfig
(
data
.
member
)
if
(
browser
.
isWeixin
)
{
wxShare
({
title
:
this
.
shareTitle
,
desc
:
this
.
shareDesc
,
link
:
`
${
window
.
location
.
origin
}${
location
.
pathname
}
?treasure_code=
${
getParam
(
'treasure_code'
)}
&origin=2`
,
imgUrl
:
'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/wx-share-icon.png'
})
// history.replace(`${match.url}?treasure_code=${getParam('treasure_code')}&origin=2`)
}
else
{
this
.
createMeta
(
this
.
shareTitle
,
this
.
shareDesc
,
'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/wx-share-icon.png'
)
}
if
(
browser
.
isWeixin
)
{
wxShare
({
title
:
this
.
shareTitle
,
desc
:
this
.
shareDesc
,
link
:
`
${
window
.
location
.
origin
}${
location
.
pathname
}
?treasure_code=
${
getParam
(
'treasure_code'
)}
&origin=2`
,
imgUrl
:
'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/wx-share-icon.png'
})
// history.replace(`${match.url}?treasure_code=${getParam('treasure_code')}&origin=2`)
}
else
{
this
.
createMeta
(
this
.
shareTitle
,
this
.
shareDesc
,
'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/wx-share-icon.png'
)
}
let
searchParams
=
new
URLSearchParams
(
window
.
location
.
search
)
if
(
searchParams
.
get
(
'origin'
)
===
'1'
&&
!
browser
.
isWeixin
)
{
searchParams
.
set
(
'origin'
,
'2'
)
sessionStorage
.
setItem
(
'isCaptain'
,
'1'
)
window
.
history
.
replaceState
(
null
,
''
,
`landing?
${
searchParams
.
toString
()}
`
)
}
let
searchParams
=
new
URLSearchParams
(
window
.
location
.
search
)
if
(
searchParams
.
get
(
'origin'
)
===
'1'
&&
!
browser
.
isWeixin
)
{
searchParams
.
set
(
'origin'
,
'2'
)
sessionStorage
.
setItem
(
'isCaptain'
,
'1'
)
window
.
history
.
replaceState
(
null
,
''
,
`landing?
${
searchParams
.
toString
()}
`
)
}
this
.
showSharePromptWithParam
()
this
.
showSharePromptWithParam
()
}
else
{
Toast
.
info
(
msg
,
2
,
null
,
false
)
}
})
}
else
{
Toast
.
info
(
msg
,
2
,
null
,
false
)
}
})
}
setupWxShareConfig
=
member
=>
{
...
...
@@ -192,31 +151,31 @@ class Landing extends Component {
http
.
post
(
`
${
API
.
home
}
/sys/treasure/joinTeam`
,
{
treasure_code
})
.
then
(
res
=>
{
const
{
data
,
code
,
msg
}
=
res
.
data
if
(
code
===
200
)
{
/*
* status
* 1-成功加入
* 2-成功加入组队成功
* 3-已加入当前队伍
* 4-已加入其他队伍
* */
switch
(
data
.
status
)
{
case
1
:
case
2
:
this
.
joinSuccess
(
data
)
break
default
:
Toast
.
info
(
msg
,
2
,
null
,
false
)
}
.
then
(
res
=>
{
const
{
data
,
code
,
msg
}
=
res
.
data
if
(
code
===
200
)
{
}
else
{
Toast
.
info
(
msg
,
2
,
null
,
false
)
}
})
/*
* status
* 1-成功加入
* 2-成功加入组队成功
* 3-已加入当前队伍
* 4-已加入其他队伍
* */
switch
(
data
.
status
)
{
case
1
:
case
2
:
this
.
joinSuccess
(
data
)
break
default
:
Toast
.
info
(
msg
,
2
,
null
,
false
)
}
}
else
{
Toast
.
info
(
msg
,
2
,
null
,
false
)
}
})
}
handleToMyTreasure
=
id
=>
{
...
...
@@ -240,32 +199,32 @@ class Landing extends Component {
<
div
className
=
{
'tip'
}
>
{
status
===
2
?
'组队成功,恭喜你获得一个宝箱!'
:
is_team
?
<>
您的
{
<
span
>
{
team_num
}
<
/span>}号队伍还差{<span>{lack_member}</
span
>
}
人即可获得宝箱
<
/
>
:
'自己当队长,宝箱内有专属奖品哦~'
?
'组队成功,恭喜你获得一个宝箱!'
:
is_team
?
<>
您的
{
<
span
>
{
team_num
}
<
/span>}号队伍还差{<span>{lack_member}</
span
>
}
人即可获得宝箱
<
/
>
:
'自己当队长,宝箱内有专属奖品哦~'
}
<
/div
>
{
status
===
2
?
<
img
style
=
{{
width
:
'150px'
,
marginTop
:
'23px'
}}
src
=
"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/treasure-split.gif"
alt
=
""
onClick
=
{
this
.
handleToMyTreasure
.
bind
(
this
,
id
)}
/
>
:
is_team
?
<
button
type
=
'button'
onClick
=
{
this
.
inviteMembers
.
bind
(
this
,
treasure_code
)}
>
继续组队
<
/button
>
:
<
button
type
=
"button"
onClick
=
{
this
.
createMyTeam
}
>
创建我的队伍
<
/button
>
?
<
img
style
=
{{
width
:
'150px'
,
marginTop
:
'23px'
}}
src
=
"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/treasure-split.gif"
alt
=
""
onClick
=
{
this
.
handleToMyTreasure
.
bind
(
this
,
id
)}
/
>
:
is_team
?
<
button
type
=
'button'
onClick
=
{
this
.
inviteMembers
.
bind
(
this
,
treasure_code
)}
>
继续组队
<
/button
>
:
<
button
type
=
"button"
onClick
=
{
this
.
createMyTeam
}
>
创建我的队伍
<
/button
>
}
<
/div>
,
closeIcon
:
this
.
closeIcon
,
close
:
()
=>
{
this
.
fetchPageData
()
this
.
getFollowStatus
()
.
then
(
isFollow
=>
{
!
isFollow
&&
this
.
remind
(
'join'
,
this
.
state
.
treasure_code
,
2
)
})
.
then
(
isFollow
=>
{
!
isFollow
&&
this
.
remind
(
'join'
,
this
.
state
.
treasure_code
,
2
)
})
}
})
}
...
...
@@ -292,51 +251,51 @@ class Landing extends Component {
}
getFollowStatus
=
()
=>
http
.
get
(
`
${
API
.
home
}
/sys/user/isFollowWeChat`
)
.
then
(
res
=>
{
const
{
code
,
data
}
=
res
.
data
return
code
===
200
&&
data
[
'is_follow'
]
})
.
then
(
res
=>
{
const
{
code
,
data
}
=
res
.
data
return
code
===
200
&&
data
[
'is_follow'
]
})
createTeamSuccess
=
({
member
,
team_num
,
lack_member
,
treasure_code
})
=>
{
this
.
joinSuccessPopup
&&
this
.
joinSuccessPopup
.
remove
()
&&
(
this
.
joinSuccessPopup
=
null
)
this
.
getFollowStatus
()
.
then
(
isFollow
=>
{
this
.
createTeamSuccessPopup
=
Popup
({
title
:
'创建成功'
,
className
:
'landing-create-success'
,
content
:
<
div
>
<
div
className
=
"tip"
>
{
<
span
>
{
team_num
}
<
/span>}号队伍 还差{<span>{lack_member}</
span
>
}
名队员即可获得宝箱哦
~<
/div
>
<
img
className
=
{
'treasure-box'
}
src
=
"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/treasure-box-icon.png"
alt
=
""
/>
<
ul
className
=
'members'
>
{
new
Array
(
5
).
fill
(
'a'
).
map
((
item
,
index
)
=>
{
const
_member
=
member
[
index
]
return
<
li
key
=
{
index
}
>
{
_member
&&
_member
[
'is_captain'
]
&&
<
sup
>
队长
<
/sup>
}
<
img
className
=
{
'avatar'
}
src
=
{
_member
?
_member
[
'head_img'
]
:
"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/not-joined-placeholder.png"
}
alt
=
""
/>
<
/li
>
})
.
then
(
isFollow
=>
{
this
.
createTeamSuccessPopup
=
Popup
({
title
:
'创建成功'
,
className
:
'landing-create-success'
,
content
:
<
div
>
<
div
className
=
"tip"
>
{
<
span
>
{
team_num
}
<
/span>}号队伍 还差{<span>{lack_member}</
span
>
}
名队员即可获得宝箱哦
~<
/div
>
<
img
className
=
{
'treasure-box'
}
src
=
"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/treasure-box-icon.png"
alt
=
""
/>
<
ul
className
=
'members'
>
{
new
Array
(
5
).
fill
(
'a'
).
map
((
item
,
index
)
=>
{
const
_member
=
member
[
index
]
return
<
li
key
=
{
index
}
>
{
_member
&&
_member
[
'is_captain'
]
&&
<
sup
>
队长
<
/sup>
}
<
img
className
=
{
'avatar'
}
src
=
{
_member
?
_member
[
'head_img'
]
:
"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/not-joined-placeholder.png"
}
alt
=
""
/>
<
/li
>
})
}
<
/ul
>
<
button
type
=
{
'button'
}
onClick
=
{
this
.
inviteMembers
.
bind
(
this
,
treasure_code
)}
>
邀请好友加入队伍
<
/button
>
<
/div>
,
closeIcon
:
this
.
closeIcon
,
afterClose
:
()
=>
{
if
(
!
isFollow
)
{
this
.
remind
(
'create'
,
treasure_code
)
}
<
/ul
>
<
button
type
=
{
'button'
}
onClick
=
{
this
.
inviteMembers
.
bind
(
this
,
treasure_code
)}
>
邀请好友加入队伍
<
/button
>
<
/div>
,
closeIcon
:
this
.
closeIcon
,
afterClose
:
()
=>
{
if
(
!
isFollow
)
{
this
.
remind
(
'create'
,
treasure_code
)
}
}
})
})
})
})
}
// 安卓手机保存二维码
...
...
@@ -354,34 +313,34 @@ class Landing extends Component {
remind
=
(
type
=
'create'
,
treasure_code
,
origin
=
1
)
=>
{
const
{
user
}
=
this
.
props
http
.
get
(
`
${
API
[
"base-api"
]}
/wx/user_temporary_qrcode/
${
user
.
data
.
uid
}
`
)
.
then
(
res
=>
{
const
{
data
}
=
res
.
data
return
data
.
url
}).
then
(
text
=>
{
.
then
(
res
=>
{
const
{
data
}
=
res
.
data
return
data
.
url
}).
then
(
text
=>
{
QRCode
.
toDataURL
(
text
)
.
then
(
url
=>
{
Popup
({
title
:
'提醒服务'
,
className
:
'landing-remind'
,
closeIcon
:
this
.
closeIcon
,
content
:
<
div
>
<
div
className
=
"des"
>
{
type
===
'create'
?
'有好友加入队伍后第一时间通知我~'
:
'获得宝箱时第一时间通知我~'
}
<
/div
>
<
img
src
=
{
url
}
alt
=
""
/>
{
browser
.
isAndroidApp
?
<
div
>
<
button
className
=
{
'android-qr-code-btn'
}
onClick
=
{
this
.
saveImage
.
bind
(
this
,
text
)}
>
保存二维码
<
/button
>
<
/div> : null
}
<
div
className
=
"des"
>
长按识别
/
扫码
关注【七月在线】服务号即可预约
<
/div
>
<
/div>
,
close
:
()
=>
{
// history.replace(`${match.path}?treasure_code=${treasure_code}&origin=1`)
sessionStorage
.
setItem
(
'closedRemind'
,
'1'
)
this
.
fetchPageData
({
treasure_code
,
origin
})
}
.
then
(
url
=>
{
Popup
({
title
:
'提醒服务'
,
className
:
'landing-remind'
,
closeIcon
:
this
.
closeIcon
,
content
:
<
div
>
<
div
className
=
"des"
>
{
type
===
'create'
?
'有好友加入队伍后第一时间通知我~'
:
'获得宝箱时第一时间通知我~'
}
<
/div
>
<
img
src
=
{
url
}
alt
=
""
/>
{
browser
.
isAndroidApp
?
<
div
>
<
button
className
=
{
'android-qr-code-btn'
}
onClick
=
{
this
.
saveImage
.
bind
(
this
,
text
)}
>
保存二维码
<
/button
>
<
/div> : null
}
<
div
className
=
"des"
>
长按识别
/
扫码
关注【七月在线】服务号即可预约
<
/div
>
<
/div>
,
close
:
()
=>
{
// history.replace(`${match.path}?treasure_code=${treasure_code}&origin=1`)
sessionStorage
.
setItem
(
'closedRemind'
,
'1'
)
this
.
fetchPageData
({
treasure_code
,
origin
})
}
})
})
})
})
}
...
...
@@ -406,9 +365,9 @@ class Landing extends Component {
sessionStorage
.
removeItem
(
'showShareTip'
)
if
(
!
user
.
hasError
)
{
this
.
getFollowStatus
()
.
then
(
isFollow
=>
{
!
isFollow
&&
this
.
remind
(
'create'
,
getParam
(
'treasure_code'
),
1
)
})
.
then
(
isFollow
=>
{
!
isFollow
&&
this
.
remind
(
'create'
,
getParam
(
'treasure_code'
),
1
)
})
}
}
})
...
...
@@ -428,16 +387,16 @@ class Landing extends Component {
return
}
http
.
get
(
`
${
API
.
home
}
/sys/treasure/createMyTeam`
)
.
then
(
res
=>
{
const
{
data
,
code
,
msg
}
=
res
.
data
if
(
code
==
200
)
{
.
then
(
res
=>
{
const
{
data
,
code
,
msg
}
=
res
.
data
if
(
code
==
200
)
{
this
.
createTeamSuccess
(
data
)
this
.
createTeamSuccess
(
data
)
}
else
{
Toast
.
info
(
msg
,
2
,
null
,
false
)
}
})
}
else
{
Toast
.
info
(
msg
,
2
,
null
,
false
)
}
})
}
requiredLogin
=
()
=>
{
...
...
@@ -485,177 +444,177 @@ class Landing extends Component {
* 4-已加入别的队伍
* */
return
(
<
div
id
=
{
'landing'
}
>
{
!
(
standby_plan
&&
browser
.
isWeixin
)
&&
<
div
id
=
"to-square"
>
<
a
href
=
'javascript:'
onClick
=
{
this
.
toSquare
}
>
前往活动会场,享更多福利!
>><
/a
>
<
/div
>
}
<
BoxContainer
>
<
i
className
=
{
`snow-deco
${
standby_plan
&&
browser
.
isWeixin
?
'standby'
:
''
}
`
}
/
>
<
div
id
=
{
'landing'
}
>
{
standby_plan
&&
browser
.
isWeixin
&&
<>
<
WhiteSpace
className
=
{
'standby-space'
}
/
>
<
div
className
=
{
'standby-tip'
}
>
点击右上角,选择“在浏览器打开”
<
/div
>
<
/
>
!
(
standby_plan
&&
browser
.
isWeixin
)
&&
<
div
id
=
"to-square"
>
<
a
href
=
'javascript:'
onClick
=
{
this
.
toSquare
}
>
前往活动会场,享更多福利!
>><
/a
>
<
/div
>
}
<
img
className
=
'main-avatar'
src
=
{
head_img
}
alt
=
""
/>
{
status
===
1
?
<
div
className
=
"des"
>
邀请好友加入队伍,开宝箱领取丰厚奖品
~<
/div
>
:
<
div
className
=
"des"
>
加入我的
<
span
>
{
team_num
}
<
/span>号队伍,一起开宝箱领取丰厚奖品~</
div
>
}
<
Prizes
showSystemNotices
=
{
false
}
/
>
<
BulletScreen
/>
<
div
className
=
"group"
>
<
ul
className
=
{
'member'
}
>
{
member
&&
member
.
length
&&
new
Array
(
5
).
fill
(
'a'
).
map
((
item
,
index
)
=>
{
const
_member
=
member
[
index
]
return
(
_member
?
<
li
key
=
{
index
}
>
<
div
className
=
'avatar-wrapper'
>
{
_member
.
is_captain
?
<
sup
>
队长
<
/sup> : nul
l
}
<
img
src
=
{
_member
.
head_img
}
alt
=
""
className
=
"avatar"
/>
<
/div
>
<
/li
>
:
<
li
key
=
{
index
}
>
<
div
className
=
"avatar-wrapper"
>
<
img
src
=
"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/default-member-avatar.png"
alt
=
""
className
=
"avatar"
/>
<
/div
>
<
/li
>
)
})
}
<
/ul
>
<
ul
className
=
{
'bars'
}
>
{
member
&&
member
.
length
&&
new
Array
(
5
).
fill
(
'a'
).
map
((
item
,
index
)
=>
{
return
(
<
li
key
=
{
index
}
className
=
{
`
${
index
<
member
.
length
?
'active'
:
''
}
`
}
/
>
)
})
}
<
/ul
>
<
BoxContainer
>
<
i
className
=
{
`snow-deco
${
standby_plan
&&
browser
.
isWeixin
?
'standby'
:
''
}
`
}
/
>
{
sta
tus
===
1
&&
!
activityEnd
&&
sta
ndby_plan
&&
browser
.
isWeixin
&&
<>
<
div
className
=
"group-des"
>
还差
{
lack_member
}
名队员即可获得当前宝箱哦
~
<
/div
>
{
!
(
standby_plan
&&
browser
.
isWeixin
)
&&
<
button
type
=
'button'
className
=
{
'invite-btn'
}
onClick
=
{
this
.
showShareTip
}
>
邀请好友加入队伍
<
/button
>
}
<
WhiteSpace
className
=
{
'standby-space'
}
/
>
<
div
className
=
{
'standby-tip'
}
>
点击右上角,选择“在浏览器打开”
<
/div
>
<
/
>
}
<
img
className
=
'main-avatar'
src
=
{
head_img
}
alt
=
""
/>
{
status
===
3
&&
!
activityEnd
&&
<>
<
div
className
=
"group-des"
>
<
p
>
已加入当前队伍
<
/p
>
{
my_team
[
'is_team'
]
?
<
p
>
您的
{
my_team
[
'team_num'
]}
号队伍还差
{
my_team
[
'lack_member'
]}
人即可获得宝箱
~<
/p
>
:
<
p
>
自己当队长,宝箱内有专属奖品哦
~<
/p
>
}
<
/div
>
status
===
1
?
<
div
className
=
"des"
>
邀请好友加入队伍,开宝箱领取丰厚奖品
~<
/div
>
:
<
div
className
=
"des"
>
加入我的
<
span
>
{
team_num
}
<
/span>号队伍,一起开宝箱领取丰厚奖品~</
div
>
}
<
Prizes
showSystemNotices
=
{
false
}
/
>
<
BulletScreen
/>
<
div
className
=
"group"
>
<
ul
className
=
{
'member'
}
>
{
!
(
standby_plan
&&
browser
.
isWeixin
)
&&
(
my_team
[
'is_team'
]
?
<
button
type
=
'button'
className
=
{
'invite-btn'
}
onClick
=
{
this
.
inviteMembers
.
bind
(
this
,
my_team
[
'treasure_code'
])}
>
继续组队
<
/button
>
:
<
button
type
=
'button'
className
=
{
'invite-btn'
}
onClick
=
{
this
.
createMyTeam
}
>
创建我的队伍
<
/button>
)
member
&&
member
.
length
&&
new
Array
(
5
).
fill
(
'a'
).
map
((
item
,
index
)
=>
{
const
_member
=
member
[
index
]
return
(
_member
?
<
li
key
=
{
index
}
>
<
div
className
=
'avatar-wrapper'
>
{
_member
.
is_captain
?
<
sup
>
队长
<
/sup> : nul
l
}
<
img
src
=
{
_member
.
head_img
}
alt
=
""
className
=
"avatar"
/>
<
/div
>
<
/li
>
:
<
li
key
=
{
index
}
>
<
div
className
=
"avatar-wrapper"
>
<
img
src
=
"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/default-member-avatar.png"
alt
=
""
className
=
"avatar"
/>
<
/div
>
<
/li
>
)
})
}
<
/
>
}
{
status
===
4
&&
!
activityEnd
&&
<>
<
div
className
=
"group-des"
>
<
p
>
已加入其他队伍
<
/p
>
<
/ul
>
<
ul
className
=
{
'bars'
}
>
{
member
&&
member
.
length
&&
new
Array
(
5
).
fill
(
'a'
).
map
((
item
,
index
)
=>
{
return
(
<
li
key
=
{
index
}
className
=
{
`
${
index
<
member
.
length
?
'active'
:
''
}
`
}
/
>
)
})
}
<
/ul
>
{
status
===
1
&&
!
activityEnd
&&
<>
<
div
className
=
"group-des"
>
还差
{
lack_member
}
名队员即可获得当前宝箱哦
~
<
/div
>
{
my_team
[
'is_team'
]
?
<
p
>
您的
{
my_team
[
'team_num'
]}
号队伍还差
{
my_team
[
'lack_member'
]}
人即可获得宝箱
~<
/p
>
:
<
p
>
自己当队长,宝箱内有专属奖品哦
~<
/p
>
!
(
standby_plan
&&
browser
.
isWeixin
)
&&
<
button
type
=
'button'
className
=
{
'invite-btn'
}
onClick
=
{
this
.
showShareTip
}
>
邀请好友加入队伍
<
/button
>
}
<
/
>
}
{
status
===
3
&&
!
activityEnd
&&
<>
<
div
className
=
"group-des"
>
<
p
>
已加入当前队伍
<
/p
>
{
my_team
[
'is_team'
]
?
<
p
>
您的
{
my_team
[
'team_num'
]}
号队伍还差
{
my_team
[
'lack_member'
]}
人即可获得宝箱
~<
/p
>
:
<
p
>
自己当队长,宝箱内有专属奖品哦
~<
/p
>
}
<
/div
>
{
!
(
standby_plan
&&
browser
.
isWeixin
)
&&
(
my_team
[
'is_team'
]
?
<
button
type
=
'button'
className
=
{
'invite-btn'
}
onClick
=
{
this
.
inviteMembers
.
bind
(
this
,
my_team
[
'treasure_code'
])}
>
继续组队
<
/button
>
:
<
button
type
=
'button'
className
=
{
'invite-btn'
}
onClick
=
{
this
.
createMyTeam
}
>
创建我的队伍
<
/button>
)
}
<
/
>
}
{
status
===
4
&&
!
activityEnd
&&
<>
<
div
className
=
"group-des"
>
<
p
>
已加入其他队伍
<
/p
>
{
my_team
[
'is_team'
]
?
<
p
>
您的
{
my_team
[
'team_num'
]}
号队伍还差
{
my_team
[
'lack_member'
]}
人即可获得宝箱
~<
/p
>
:
<
p
>
自己当队长,宝箱内有专属奖品哦
~<
/p
>
}
<
/div
>
{
!
(
standby_plan
&&
browser
.
isWeixin
)
&&
(
my_team
[
'is_team'
]
?
<
button
type
=
'button'
className
=
{
'invite-btn'
}
onClick
=
{
this
.
inviteMembers
.
bind
(
this
,
my_team
[
'treasure_code'
])}
>
继续组队
<
/button
>
:
<
button
type
=
'button'
className
=
{
'invite-btn'
}
onClick
=
{
this
.
createMyTeam
}
>
创建我的队伍
<
/button>
)
}
<
/
>
}
{
!
(
standby_plan
&&
browser
.
isWeixin
)
&&
status
===
2
&&
!
activityEnd
&&
<
button
type
=
'button'
className
=
{
'invite-btn'
}
onClick
=
{
this
.
joinTeam
}
>
同意加入队伍
<
/button
>
}
{
prize_info
&&
prize_info
.
length
!==
0
&&
!
activityEnd
&&
!
isCaptain
&&
<
div
className
=
"certainly-prompt"
>
第
{
prize_info
[
0
].
stage_no
}
个宝箱必中
{
prize_info
[
0
].
name
}
<
/div
>
{
!
(
standby_plan
&&
browser
.
isWeixin
)
&&
(
my_team
[
'is_team'
]
?
<
button
type
=
'button'
className
=
{
'invite-btn'
}
onClick
=
{
this
.
inviteMembers
.
bind
(
this
,
my_team
[
'treasure_code'
])}
>
继续组队
<
/button
>
:
<
button
type
=
'button'
className
=
{
'invite-btn'
}
onClick
=
{
this
.
createMyTeam
}
>
创建我的队伍
<
/button>
)
}
<
/
>
}
{
!
(
standby_plan
&&
browser
.
isWeixin
)
&&
status
===
2
&&
!
activityEnd
&&
<
button
type
=
'button'
className
=
{
'invite-btn'
}
onClick
=
{
this
.
joinTeam
}
>
同意加入队伍
<
/button
>
}
{
prize_info
&&
prize_info
.
length
!==
0
&&
!
activityEnd
&&
!
isCaptain
&&
<
div
className
=
"certainly-prompt"
>
第
{
prize_info
[
0
].
stage_no
}
个宝箱必中
{
prize_info
[
0
].
name
}
<
/div
>
}
{
activityEnd
&&
<
div
className
=
'activity-end'
>
<
div
>
活动已结束
<
/div
>
<
div
>
关注【七月在线】服务号了解更多活动信息
<
/div
>
<
img
src
=
"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/tinypng-common/right_weixin.png"
alt
=
""
/>
<
div
>
长按识别
/
微信扫码
<
/div
>
<
/div
>
}
<
/div
>
<
/BoxContainer
>
{
!
isCaptain
&&
<>
<
WhiteSpace
size
=
{
'xl'
}
/
>
<
YearCourse
getSum
=
{()
=>
{
}}
/
>
<
/
>
}
{
isLoading
&&
<
div
className
=
"loading"
style
=
{{
width
:
window
.
innerWidth
+
'px'
,
height
:
window
.
innerHeight
+
'px'
}}
>
<
FadeLoader
color
=
{
'#fff'
}
loading
=
{
isLoading
}
/
>
<
/div
>
}
<
/div
>
}
{
activityEnd
&&
<
div
className
=
'activity-end'
>
<
div
>
活动已结束
<
/div
>
<
div
>
关注【七月在线】服务号了解更多活动信息
<
/div
>
<
img
src
=
"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/tinypng-common/right_weixin.png"
alt
=
""
/>
<
div
>
长按识别
/
微信扫码
<
/div
>
<
/div
>
}
<
/div
>
<
/BoxContainer
>
{
!
isCaptain
&&
<>
<
WhiteSpace
size
=
{
'xl'
}
/
>
<
YearCourse
getSum
=
{()
=>
{
}}
/
>
<
/
>
}
{
isLoading
&&
<
div
className
=
"loading"
style
=
{{
width
:
window
.
innerWidth
+
'px'
,
height
:
window
.
innerHeight
+
'px'
}}
>
<
FadeLoader
color
=
{
'#fff'
}
loading
=
{
isLoading
}
/
>
<
/div
>
}
<
/div
>
)
}
}
export
default
connect
(
state
=>
({
user
:
state
.
user
}),
null
state
=>
({
user
:
state
.
user
}),
null
)(
Landing
)
src/components/detail/btnstatus/index.js
View file @
7b8ee3af
...
...
@@ -23,7 +23,7 @@ class BtnStatus extends Component {
bindPhone
:
false
,
bindConfrm
:
false
,
bindInfo
:
{},
// 冲突信息
formInfo
:
{},
formInfo
:
{},
}
}
...
...
@@ -314,14 +314,17 @@ class BtnStatus extends Component {
});
}
qimoChatClick
=
()
=>
{
qimoChatClick
()
}
render
()
{
// data 课程信息;barInfo 砍价信息
const
{
user
=
{},
toCart
,
country
}
=
this
.
props
;
const
{
const
{
countdown
,
barInfo
,
courseInfo
:
info
=
{},
bindPhone
,
barInfo
,
courseInfo
:
info
=
{},
bindPhone
,
bindConfrm
,
bindInfo
,
formInfo
,
...
...
@@ -331,7 +334,7 @@ class BtnStatus extends Component {
<
div
>
{
/* 绑定手机号 */
}
<
Mask
visible
=
{
bindPhone
}
handleToHide
=
{()
=>
this
.
handleToHide
(
'bindPhone'
)}
>
<
BindPhone
<
BindPhone
country
=
{
country
}
handleToBargain
=
{
this
.
toKanjia
}
confirmBindPhone
=
{
this
.
confirmBindPhone
}
...
...
@@ -340,19 +343,19 @@ class BtnStatus extends Component {
{
/* 绑定手机号--确认 */
}
<
Mask
visible
=
{
bindConfrm
}
handleToHide
=
{()
=>
this
.
handleToHide
(
'bindConfrm'
)}
>
<
BargainConfirmBind
<
BargainConfirmBind
data
=
{
formInfo
}
bindInfo
=
{
bindInfo
}
handleToHide
=
{()
=>
this
.
handleToHide
(
'bindConfrm'
)}
handleToBargain
=
{
this
.
toKanjia
}
/
>
<
/Mask
>
{
/*正常购买*/
}
{
info
.
is_baoming
===
0
&&
info
.
group_status
!==
3
&&
<
div
className
=
'btns-box'
>
<
a
className
=
'consult consult-s'
href
=
"https://q.url.cn/AB8aue?_type=wpa&qidian=true"
>
<
a
className
=
'consult consult-s'
onClick
=
{()
=>
this
.
qimoChatClick
()}
>
<
i
className
=
'iconfont iconerji'
><
/i
>
<
span
>
课程咨询
<
/span
>
<
/a
>
...
...
@@ -373,7 +376,7 @@ class BtnStatus extends Component {
{
info
.
is_baoming
===
0
&&
info
.
is_deposit
!=
0
&&
<
div
className
=
'btns-box'
>
<
a
className
=
'consult consult-m'
href
=
"https://q.url.cn/AB8aue?_type=wpa&qidian=true"
>
<
a
className
=
'consult consult-m'
onClick
=
{()
=>
this
.
qimoChatClick
()}
>
<
i
className
=
'iconfont iconerji'
/>
<
span
>
课程咨询
<
/span
>
<
/a
>
...
...
@@ -387,7 +390,7 @@ class BtnStatus extends Component {
{
info
.
is_baoming
===
1
&&
<
div
className
=
'btns-box'
>
<
a
className
=
'consult consult-m'
href
=
"https://q.url.cn/AB8aue?_type=wpa&qidian=true"
>
<
a
className
=
'consult consult-m'
onClick
=
{()
=>
this
.
qimoChatClick
()}
>
<
i
className
=
'iconfont iconerji'
/>
<
span
>
课程咨询
<
/span
>
<
/a
>
...
...
@@ -400,7 +403,7 @@ class BtnStatus extends Component {
{
info
.
is_baoming
===
0
&&
info
.
group_status
===
3
&&
<
div
className
=
'btns-box'
>
<
a
className
=
'consult consult-s'
href
=
"https://q.url.cn/AB8aue?_type=wpa&qidian=true"
>
<
a
className
=
'consult consult-s'
onClick
=
{()
=>
this
.
qimoChatClick
()}
>
<
i
className
=
'iconfont iconerji'
><
/i
>
<
span
>
课程咨询
<
/span
>
<
/a
>
...
...
@@ -421,7 +424,7 @@ class BtnStatus extends Component {
{
info
.
is_baoming
===
0
&&
info
.
group_status
===
4
&&
<
div
className
=
'btns-box'
>
<
a
className
=
'consult consult-s'
href
=
"https://q.url.cn/AB8aue?_type=wpa&qidian=true"
>
<
a
className
=
'consult consult-s'
onClick
=
{()
=>
this
.
qimoChatClick
()}
>
<
i
className
=
'iconfont iconerji'
><
/i
>
<
span
>
课程咨询
<
/span
>
<
/a
>
...
...
@@ -435,7 +438,7 @@ class BtnStatus extends Component {
{
info
.
is_baoming
===
0
&&
this
.
props
.
data
&&
this
.
props
.
data
.
is_bargain
&&
<
div
className
=
'btns-box'
>
<
a
className
=
'consult consult-s'
href
=
"https://q.url.cn/AB8aue?_type=wpa&qidian=true"
>
<
a
className
=
'consult consult-s'
onClick
=
{()
=>
this
.
qimoChatClick
()}
>
<
i
className
=
'iconfont iconerji'
><
/i
>
<
span
>
课程咨询
<
/span
>
<
/a
>
...
...
@@ -463,7 +466,7 @@ class BtnStatus extends Component {
{
this
.
state
.
isbuy
===
20
&&
<
div
className
=
'btns-box'
>
<
a
className
=
'consult-l'
href
=
"https://q.url.cn/AB8aue?_type=wpa&qidian=true"
>
<
a
className
=
'consult-l'
onClick
=
{()
=>
this
.
qimoChatClick
()}
>
<
i
className
=
'iconfont iconerji'
><
/i
>
<
span
>
课程咨询
<
/span
>
<
/a
>
...
...
@@ -474,7 +477,7 @@ class BtnStatus extends Component {
{
(
info
.
is_aist
&&
(
this
.
props
.
user
.
hasError
||
info
.
is_baoming
===
0
))
&&
<
div
className
=
'btns-box'
>
<
a
className
=
'consult consult-m'
href
=
"https://q.url.cn/AB8aue?_type=wpa&qidian=true"
>
<
a
className
=
'consult consult-m'
onClick
=
{()
=>
this
.
qimoChatClick
()}
>
<
i
className
=
'iconfont iconerji'
><
/i
>
<
span
>
课程咨询
<
/span
>
<
/a
>
...
...
@@ -488,7 +491,7 @@ class BtnStatus extends Component {
{
info
.
is_aist
&&
!
this
.
props
.
user
.
hasError
&&
info
.
is_baoming
===
1
&&
<
div
className
=
'btns-box'
>
<
a
className
=
'consult consult-m'
href
=
"https://q.url.cn/AB8aue?_type=wpa&qidian=true"
>
<
a
className
=
'consult consult-m'
onClick
=
{()
=>
this
.
qimoChatClick
()}
>
<
i
className
=
'iconfont iconerji'
><
/i
>
<
span
>
课程咨询
<
/span
>
<
/a
>
...
...
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