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
c40cd6c4
Commit
c40cd6c4
authored
Dec 19, 2019
by
xuzhenghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pull
parent
2bd98e2a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
147 additions
and
52 deletions
+147
-52
build/asset-manifest.json
+0
-0
build/index.html
+0
-0
build/precache-manifest.38b5e3f2d4eb022a0fb67fbcfd91c885.js
+0
-0
build/service-worker.js
+1
-1
src/App.js
+6
-0
src/components/activity/newyear-2019/box-container/box-container.scss
+3
-3
src/components/activity/newyear-2019/common/prizes/index.js
+1
-1
src/components/activity/newyear-2019/landing/index.js
+58
-28
src/components/activity/newyear-2019/landing/landing.scss
+36
-2
src/components/activity/newyear-2019/myTreasure/index.js
+5
-4
src/components/activity/newyear-2019/myTreasure/index.scss
+11
-0
src/components/activity/newyear-2019/myTreasure/mask.js
+3
-2
src/components/activity/newyear-2019/myTreasure/team.js
+3
-4
src/components/activity/newyear-2019/preheat/LiveRoom/index.js
+8
-1
src/components/activity/newyear-2019/preheat/LiveRoom/index.scss
+4
-0
src/components/activity/newyear-2019/preheat/index.js
+1
-0
src/components/activity/newyear-2019/preheat/nav.scss
+1
-1
src/components/activity/newyear-2019/treasure-box/team.js
+6
-5
No files found.
build/asset-manifest.json
View file @
c40cd6c4
This diff is collapsed.
Click to expand it.
build/index.html
View file @
c40cd6c4
This diff is collapsed.
Click to expand it.
build/precache-manifest.
92a9e14e13ca045f8f7efb3984727ddb
.js
→
build/precache-manifest.
38b5e3f2d4eb022a0fb67fbcfd91c885
.js
View file @
c40cd6c4
This diff is collapsed.
Click to expand it.
build/service-worker.js
View file @
c40cd6c4
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
importScripts
(
"https://storage.googleapis.com/workbox-cdn/releases/3.6.3/workbox-sw.js"
);
importScripts
(
"https://storage.googleapis.com/workbox-cdn/releases/3.6.3/workbox-sw.js"
);
importScripts
(
importScripts
(
"/precache-manifest.
92a9e14e13ca045f8f7efb3984727ddb
.js"
"/precache-manifest.
38b5e3f2d4eb022a0fb67fbcfd91c885
.js"
);
);
workbox
.
clientsClaim
();
workbox
.
clientsClaim
();
...
...
src/App.js
View file @
c40cd6c4
...
@@ -157,6 +157,12 @@ class App extends Component {
...
@@ -157,6 +157,12 @@ class App extends Component {
if
(
code
&&
!
oid
)
{
if
(
code
&&
!
oid
)
{
//针对2019双旦活动特殊处理,活动结束后删掉
//treasure_code=3538333139312c31&origin=2&aa=bb&code=0211aiYB1VVOL60rmWWB1367YB11aiY7&state=STATE
if
(
getParam
(
'treasure_code'
)
==
'3538333139312c31'
&&
code
==
'0211aiYB1VVOL60rmWWB1367YB11aiY7'
){
return
}
http
.
get
(
`
${
API
[
'home'
]}
/m/wx_loginInfo/code/
${
code
}
?redirect=
${
encodeURIComponent
(
window
.
location
.
href
)}
`
)
http
.
get
(
`
${
API
[
'home'
]}
/m/wx_loginInfo/code/
${
code
}
?redirect=
${
encodeURIComponent
(
window
.
location
.
href
)}
`
)
.
then
(
res
=>
{
.
then
(
res
=>
{
let
data
=
res
.
data
let
data
=
res
.
data
...
...
src/components/activity/newyear-2019/box-container/box-container.scss
View file @
c40cd6c4
.box-container
{
.box-container
{
position
:
relative
;
position
:
relative
;
background
:
#327443
;
background
:
#327443
url("https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/PC/sd_nr_bj2.png")
repeat-y
;
background-size
:
100%
auto
;
padding
:
14px
0
;
padding
:
14px
0
;
.image-box
{
.image-box
{
height
:
100%
;
height
:
100%
;
background
:
url("https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/PC/sd_nr_bj2.png")
repeat-y
;
background-size
:
100%
auto
;
}
}
@mixin
common-deco
(
$bg
)
{
@mixin
common-deco
(
$bg
)
{
...
...
src/components/activity/newyear-2019/common/prizes/index.js
View file @
c40cd6c4
...
@@ -108,7 +108,7 @@ class Prizes extends Component {
...
@@ -108,7 +108,7 @@ class Prizes extends Component {
item
.
is_captain
!=
0
&&
<
span
className
=
'captain top-tag'
>
队长专属
<
/span
>
item
.
is_captain
!=
0
&&
<
span
className
=
'captain top-tag'
>
队长专属
<
/span
>
}
}
{
{
item
.
mode
===
2
&&
<
span
className
=
'stage top-tag'
>
第
{
item
.
stage_no
}
次
必中
<
/span
>
item
.
mode
===
2
&&
<
span
className
=
'stage top-tag'
>
第
{
item
.
stage_no
}
个
必中
<
/span
>
}
}
{
{
item
.
grant_max
item
.
grant_max
...
...
src/components/activity/newyear-2019/landing/index.js
View file @
c40cd6c4
...
@@ -19,6 +19,8 @@ class Landing extends Component {
...
@@ -19,6 +19,8 @@ class Landing extends Component {
joinSuccessPopup
=
null
joinSuccessPopup
=
null
shareTipPopup
=
null
shareTipPopup
=
null
swiper
=
null
swiper
=
null
shareTitle
=
''
shareDesc
=
''
state
=
{
state
=
{
...
@@ -36,6 +38,13 @@ class Landing extends Component {
...
@@ -36,6 +38,13 @@ class Landing extends Component {
componentDidMount
()
{
componentDidMount
()
{
this
.
fetchPageData
()
this
.
fetchPageData
()
window
.
showFollowAlert
=
this
.
remind
.
bind
(
this
,
'create'
)
window
.
showFollowAlert
=
this
.
remind
.
bind
(
this
,
'create'
)
document
.
title
=
'七月在线年终大回馈,幸运宝箱随你开,100%有奖!'
const
landing
=
document
.
querySelector
(
'#landing'
)
const
boxContainer
=
document
.
querySelector
(
'.box-container'
)
if
(
boxContainer
.
offsetHeight
<
window
.
innerHeight
){
landing
.
style
.
minHeight
=
`
${
window
.
innerHeight
}
px`
boxContainer
.
style
.
minHeight
=
`
${
window
.
innerHeight
}
px`
}
}
}
componentDidUpdate
(
prevProps
)
{
componentDidUpdate
(
prevProps
)
{
...
@@ -65,10 +74,12 @@ class Landing extends Component {
...
@@ -65,10 +74,12 @@ class Landing extends Component {
activityEnd
:
data
.
status
==
5
activityEnd
:
data
.
status
==
5
})
})
this
.
setupWxShareConfig
(
data
.
member
)
if
(
browser
.
isWeixin
)
{
if
(
browser
.
isWeixin
)
{
wxShare
({
wxShare
({
title
:
`@
${
data
.
member
[
0
].
user_name
}
邀您一起组队拿豪礼!`
,
title
:
this
.
shareTitle
,
desc
:
`加入我的队伍,机械键盘,纸质书籍等超多奖品等你拿!`
,
desc
:
this
.
shareDesc
,
link
:
`
${
window
.
location
.
origin
}${
location
.
pathname
}
?treasure_code=
${
getParam
(
'treasure_code'
)}
&origin=2`
,
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'
imgUrl
:
'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/wx-share-icon.png'
})
})
...
@@ -91,6 +102,13 @@ class Landing extends Component {
...
@@ -91,6 +102,13 @@ class Landing extends Component {
})
})
}
}
setupWxShareConfig
=
member
=>
{
const
len
=
member
.
length
let
count
=
5
-
len
<=
0
?
4
:
5
-
len
this
.
shareTitle
=
`还差
${
count
}
人即可开宝箱,100%有奖!`
this
.
shareDesc
=
'加入我的队伍,机械键盘,纸质书籍等超多奖品等你拿!--七月在线'
}
showSharePromptWithParam
=
()
=>
{
showSharePromptWithParam
=
()
=>
{
if
(
sessionStorage
.
getItem
(
'showShareTip'
)
&&
!
sessionStorage
.
getItem
(
'closedRemind'
))
{
if
(
sessionStorage
.
getItem
(
'showShareTip'
)
&&
!
sessionStorage
.
getItem
(
'closedRemind'
))
{
this
.
showShareTip
()
this
.
showShareTip
()
...
@@ -136,9 +154,9 @@ class Landing extends Component {
...
@@ -136,9 +154,9 @@ class Landing extends Component {
const
{
history
}
=
this
.
props
const
{
history
}
=
this
.
props
this
.
joinSuccessPopup
&&
this
.
joinSuccessPopup
.
remove
()
this
.
joinSuccessPopup
&&
this
.
joinSuccessPopup
.
remove
()
if
(
getParam
(
'version'
))
{
if
(
getParam
(
'version'
))
{
history
.
push
(
`
/year/yearTreasure?id=
${
id
}
&version=
${
getParam
(
'version'
)}
`
)
window
.
location
.
assign
(
`https://m.julyedu.com
/year/yearTreasure?id=
${
id
}
&version=
${
getParam
(
'version'
)}
`
)
}
else
{
}
else
{
history
.
push
(
`
/year/yearTreasure?id=
${
id
}
`
)
window
.
location
.
assign
(
`https://m.julyedu.com
/year/yearTreasure?id=
${
id
}
`
)
}
}
}
}
...
@@ -187,8 +205,8 @@ class Landing extends Component {
...
@@ -187,8 +205,8 @@ class Landing extends Component {
const
{
history
,
match
,
user
,
location
}
=
this
.
props
const
{
history
,
match
,
user
,
location
}
=
this
.
props
if
(
getParam
(
'version'
))
{
if
(
getParam
(
'version'
))
{
let
data
=
{
let
data
=
{
title
:
`@
${
user
.
data
.
username
}
邀您一起组队拿豪礼!`
,
title
:
this
.
shareTitle
,
desc
:
`加入我的队伍,机械键盘,纸质书籍等超多奖品等你拿!`
,
desc
:
this
.
shareDesc
,
link
:
`
${
window
.
location
.
origin
}${
location
.
pathname
}
?treasure_code=
${
treasure_code
}
&origin=2`
,
link
:
`
${
window
.
location
.
origin
}${
location
.
pathname
}
?treasure_code=
${
treasure_code
}
&origin=2`
,
imgUrl
:
'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/wx-share-icon.png'
imgUrl
:
'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/wx-share-icon.png'
}
}
...
@@ -304,8 +322,8 @@ class Landing extends Component {
...
@@ -304,8 +322,8 @@ class Landing extends Component {
if
(
browser
.
isAndroidApp
||
browser
.
isIOSApp
)
{
if
(
browser
.
isAndroidApp
||
browser
.
isIOSApp
)
{
SendMessageToApp
(
'toShare'
,
{
SendMessageToApp
(
'toShare'
,
{
title
:
`@
${
user
.
data
.
username
}
邀您一起组队拿豪礼!`
,
title
:
this
.
shareTitle
,
desc
:
`加入我的队伍,机械键盘,纸质书籍等超多奖品等你拿!`
,
desc
:
this
.
shareDesc
,
link
:
`
${
window
.
location
.
origin
}${
location
.
pathname
}
?treasure_code=
${
getParam
(
'treasure_code'
)}
&origin=2`
,
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'
imgUrl
:
'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/wx-share-icon.png'
})
})
...
@@ -354,11 +372,10 @@ class Landing extends Component {
...
@@ -354,11 +372,10 @@ class Landing extends Component {
}
}
requiredLogin
=
()
=>
{
requiredLogin
=
()
=>
{
const
{
history
,
user
}
=
this
.
props
const
{
history
,
user
,
location
}
=
this
.
props
if
(
user
.
hasError
)
{
if
(
user
.
hasError
)
{
if
(
browser
.
isWeixin
)
{
if
(
browser
.
isWeixin
)
{
window
.
location
.
assign
(
`https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri=
${
encodeURIComponent
(
window
.
location
.
href
+
'&aa=bb'
)}
&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
)
window
.
location
.
assign
(
`https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri=
${
encodeURIComponent
(
`
${
window
.
location
.
origin
}${
location
.
pathname
}
?treasure_code=
${
getParam
(
'treasure_code'
)}
&origin=
${
getParam
(
'origin'
)}
&aa=bb`
)}
&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
)
}
else
{
}
else
{
history
.
push
(
'/passport'
)
history
.
push
(
'/passport'
)
}
}
...
@@ -369,9 +386,9 @@ class Landing extends Component {
...
@@ -369,9 +386,9 @@ class Landing extends Component {
toSquare
=
()
=>
{
toSquare
=
()
=>
{
const
{
history
}
=
this
.
props
const
{
history
}
=
this
.
props
if
(
!
getParam
(
'version'
))
{
if
(
!
getParam
(
'version'
))
{
history
.
push
(
'
/year/yearindex'
)
window
.
location
.
assign
(
'https://m.julyedu.com
/year/yearindex'
)
}
else
{
}
else
{
history
.
push
(
'
/year/yearindex?version='
+
getParam
(
'version'
))
window
.
location
.
assign
(
'https://m.julyedu.com
/year/yearindex?version='
+
getParam
(
'version'
))
}
}
}
}
...
@@ -385,7 +402,8 @@ class Landing extends Component {
...
@@ -385,7 +402,8 @@ class Landing extends Component {
lack_member
,
lack_member
,
team_num
,
team_num
,
prize_info
,
prize_info
,
my_team
my_team
,
standby_plan
},
},
activityEnd
,
activityEnd
,
isCaptain
isCaptain
...
@@ -397,14 +415,23 @@ class Landing extends Component {
...
@@ -397,14 +415,23 @@ class Landing extends Component {
* 3-已加入当前队伍
* 3-已加入当前队伍
* 4-已加入别的队伍
* 4-已加入别的队伍
* */
* */
return
(
return
(
<
div
id
=
{
'landing'
}
>
<
div
id
=
{
'landing'
}
>
<
div
id
=
"to-square"
>
{
<
a
href
=
'javascript:'
onClick
=
{
this
.
toSquare
}
>
前往活动会场,享更多福利!
>><
/a
>
!
(
standby_plan
&&
browser
.
isWeixin
)
&&
<
/div
>
<
div
id
=
"to-square"
>
<
a
href
=
'javascript:'
onClick
=
{
this
.
toSquare
}
>
前往活动会场,享更多福利!
>><
/a
>
<
/div
>
}
<
BoxContainer
>
<
BoxContainer
>
<
i
className
=
"snow-deco"
/>
<
i
className
=
{
`snow-deco
${
standby_plan
&&
browser
.
isWeixin
?
'standby'
:
''
}
`
}
/
>
{
standby_plan
&&
browser
.
isWeixin
&&
<>
<
WhiteSpace
className
=
{
'standby-space'
}
/
>
<
div
className
=
{
'standby-tip'
}
>
点击右上角,选择“在浏览器打开”
<
/div
>
<
/
>
}
<
img
className
=
'main-avatar'
<
img
className
=
'main-avatar'
src
=
{
head_img
}
alt
=
""
/>
src
=
{
head_img
}
alt
=
""
/>
{
{
...
@@ -462,9 +489,12 @@ class Landing extends Component {
...
@@ -462,9 +489,12 @@ class Landing extends Component {
<
div
className
=
"group-des"
>
<
div
className
=
"group-des"
>
还差
{
lack_member
}
名队员即可获得当前宝箱哦
~
还差
{
lack_member
}
名队员即可获得当前宝箱哦
~
<
/div
>
<
/div
>
<
button
type
=
'button'
className
=
{
'invite-btn'
}
onClick
=
{
this
.
showShareTip
}
>
{
邀请好友加入队伍
!
(
standby_plan
&&
browser
.
isWeixin
)
&&
<
/button
>
<
button
type
=
'button'
className
=
{
'invite-btn'
}
onClick
=
{
this
.
showShareTip
}
>
邀请好友加入队伍
<
/button
>
}
<
/
>
<
/
>
}
}
{
{
...
@@ -479,14 +509,14 @@ class Landing extends Component {
...
@@ -479,14 +509,14 @@ class Landing extends Component {
}
}
<
/div
>
<
/div
>
{
{
my_team
[
'is_team'
]
?
!
(
standby_plan
&&
browser
.
isWeixin
)
&&
(
my_team
[
'is_team'
]
?
<
button
type
=
'button'
className
=
{
'invite-btn'
}
<
button
type
=
'button'
className
=
{
'invite-btn'
}
onClick
=
{
this
.
inviteMembers
.
bind
(
this
,
my_team
[
'treasure_code'
])}
>
onClick
=
{
this
.
inviteMembers
.
bind
(
this
,
my_team
[
'treasure_code'
])}
>
继续组队
继续组队
<
/button
>
<
/button
>
:
<
button
type
=
'button'
className
=
{
'invite-btn'
}
onClick
=
{
this
.
createMyTeam
}
>
:
<
button
type
=
'button'
className
=
{
'invite-btn'
}
onClick
=
{
this
.
createMyTeam
}
>
创建我的队伍
创建我的队伍
<
/button
>
<
/button>
)
}
}
<
/
>
<
/
>
}
}
...
@@ -502,25 +532,25 @@ class Landing extends Component {
...
@@ -502,25 +532,25 @@ class Landing extends Component {
}
}
<
/div
>
<
/div
>
{
{
my_team
[
'is_team'
]
?
!
(
standby_plan
&&
browser
.
isWeixin
)
&&
(
my_team
[
'is_team'
]
?
<
button
type
=
'button'
className
=
{
'invite-btn'
}
<
button
type
=
'button'
className
=
{
'invite-btn'
}
onClick
=
{
this
.
inviteMembers
.
bind
(
this
,
my_team
[
'treasure_code'
])}
>
onClick
=
{
this
.
inviteMembers
.
bind
(
this
,
my_team
[
'treasure_code'
])}
>
继续组队
继续组队
<
/button
>
<
/button
>
:
<
button
type
=
'button'
className
=
{
'invite-btn'
}
onClick
=
{
this
.
createMyTeam
}
>
:
<
button
type
=
'button'
className
=
{
'invite-btn'
}
onClick
=
{
this
.
createMyTeam
}
>
创建我的队伍
创建我的队伍
<
/button
>
<
/button>
)
}
}
<
/
>
<
/
>
}
}
{
{
status
===
2
&&
!
activityEnd
&&
<
button
type
=
'button'
className
=
{
'invite-btn'
}
onClick
=
{
this
.
joinTeam
}
>
!
(
standby_plan
&&
browser
.
isWeixin
)
&&
status
===
2
&&
!
activityEnd
&&
<
button
type
=
'button'
className
=
{
'invite-btn'
}
onClick
=
{
this
.
joinTeam
}
>
同意加入队伍
同意加入队伍
<
/button
>
<
/button
>
}
}
{
{
prize_info
&&
prize_info
.
length
!==
0
&&
!
activityEnd
&&
!
isCaptain
&&
<
div
className
=
"certainly-prompt"
>
prize_info
&&
prize_info
.
length
!==
0
&&
!
activityEnd
&&
!
isCaptain
&&
<
div
className
=
"certainly-prompt"
>
第
{
prize_info
[
0
].
stage_no
}
次
必中
{
prize_info
[
0
].
name
}
第
{
prize_info
[
0
].
stage_no
}
个宝箱
必中
{
prize_info
[
0
].
name
}
<
/div
>
<
/div
>
}
}
{
{
...
...
src/components/activity/newyear-2019/landing/landing.scss
View file @
c40cd6c4
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
#landing
{
#landing
{
background
:
#BC2A18
;
background
:
#BC2A18
;
text-align
:
center
;
text-align
:
center
;
min-height
:
100%
;
#to-square
{
#to-square
{
position
:
fixed
;
position
:
fixed
;
...
@@ -43,6 +44,10 @@
...
@@ -43,6 +44,10 @@
height
:
68px
;
height
:
68px
;
background
:
url("https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/snow-deco.png")
no-repeat
;
background
:
url("https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/snow-deco.png")
no-repeat
;
background-size
:
contain
;
background-size
:
contain
;
&
.standby
{
top
:
0
;
}
}
}
.main-avatar
{
.main-avatar
{
...
@@ -50,7 +55,7 @@
...
@@ -50,7 +55,7 @@
height
:
49px
;
height
:
49px
;
border-radius
:
50%
;
border-radius
:
50%
;
margin-bottom
:
5px
;
margin-bottom
:
5px
;
margin-top
:
37
.
5px
;
margin-top
:
5
5px
;
object-fit
:
cover
;
object-fit
:
cover
;
}
}
...
@@ -69,6 +74,35 @@
...
@@ -69,6 +74,35 @@
}
}
}
}
.standby-space
{
height
:
25px
;
}
.standby-tip
{
position
:
relative
;
width
:
270px
;
height
:
32px
;
background
:
#FFDE00
;
border-radius
:
5px
;
margin
:
0
auto
-40px
;
line-height
:
32px
;
text-align
:
center
;
color
:
#202426
;
font-size
:
15px
;
&
:
:
after
{
content
:
''
;
display
:
block
;
position
:
absolute
;
top
:
-120%
;
right
:
-6%
;
width
:
50px
;
height
:
38px
;
background
:
url("https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/standby-share-tip-icon.png")
;
background-size
:
contain
;
}
}
.group
{
.group
{
ul
.member
{
ul
.member
{
...
@@ -161,7 +195,7 @@
...
@@ -161,7 +195,7 @@
}
}
.certainly-prompt
{
.certainly-prompt
{
margin-top
:
-43
px
;
margin-top
:
27
px
;
padding-bottom
:
16px
;
padding-bottom
:
16px
;
font-size
:
14px
;
font-size
:
14px
;
color
:
#FFE300
;
color
:
#FFE300
;
...
...
src/components/activity/newyear-2019/myTreasure/index.js
View file @
c40cd6c4
...
@@ -43,6 +43,7 @@ class MyTreasure extends Component {
...
@@ -43,6 +43,7 @@ class MyTreasure extends Component {
componentDidMount
()
{
componentDidMount
()
{
this
.
fetchMyTreasure
()
this
.
fetchMyTreasure
()
this
.
fetchActivityStatus
()
this
.
fetchActivityStatus
()
document
.
title
=
'七月在线年终大回馈,幸运宝箱随你开,100%有奖!人气好课免费学,精品课程1分抢!'
;
}
}
componentWillReceiveProps
(
nextProp
)
{
componentWillReceiveProps
(
nextProp
)
{
...
@@ -344,9 +345,9 @@ class MyTreasure extends Component {
...
@@ -344,9 +345,9 @@ class MyTreasure extends Component {
handleToInvite
=
(
treasure_code
)
=>
{
handleToInvite
=
(
treasure_code
)
=>
{
const
{
history
}
=
this
.
props
const
{
history
}
=
this
.
props
if
(
getParam
(
'version'
))
{
if
(
getParam
(
'version'
))
{
history
.
push
(
`
/activity/newyear-2019/landing?treasure_code=
${
treasure_code
}
&origin=1&version=
${
getParam
(
'version'
)}
`
)
window
.
location
.
assign
(
`https://h5.julyedu.com
/activity/newyear-2019/landing?treasure_code=
${
treasure_code
}
&origin=1&version=
${
getParam
(
'version'
)}
`
)
}
else
{
}
else
{
history
.
push
(
`
/activity/newyear-2019/landing?treasure_code=
${
treasure_code
}
&origin=1`
)
window
.
location
.
assign
(
`https://h5.julyedu.com
/activity/newyear-2019/landing?treasure_code=
${
treasure_code
}
&origin=1`
)
}
}
}
}
...
@@ -517,7 +518,7 @@ class MyTreasure extends Component {
...
@@ -517,7 +518,7 @@ class MyTreasure extends Component {
<
/Mask
>
<
/Mask
>
{
/*绑定手机号--弹窗 */
}
{
/*绑定手机号--弹窗 */
}
<
Mask
visible
=
{
isPhone
}
handleToHide
=
{()
=>
this
.
handleToHideWindow
(
'isPhone'
)}
>
<
Mask
visible
=
{
isPhone
}
className
=
"popup-bind-phone"
handleToHide
=
{()
=>
this
.
handleToHideWindow
(
'isPhone'
)}
>
<
BindPhone
<
BindPhone
history
=
{
history
}
history
=
{
history
}
country
=
{
country
}
country
=
{
country
}
...
@@ -544,7 +545,7 @@ class MyTreasure extends Component {
...
@@ -544,7 +545,7 @@ class MyTreasure extends Component {
<
/Mask
>
<
/Mask
>
{
/* 绑定地址--弹窗 */
}
{
/* 绑定地址--弹窗 */
}
<
Mask
visible
=
{
isAddress
}
handleToHide
=
{()
=>
this
.
handleToHideWindow
(
'isAddress'
)}
>
<
Mask
visible
=
{
isAddress
}
className
=
"popup-bind-address"
handleToHide
=
{()
=>
this
.
handleToHideWindow
(
'isAddress'
)}
>
<
AddressPopup
<
AddressPopup
skip
=
"year"
skip
=
"year"
tip
=
{
tip
=
{
...
...
src/components/activity/newyear-2019/myTreasure/index.scss
View file @
c40cd6c4
...
@@ -86,6 +86,17 @@
...
@@ -86,6 +86,17 @@
}
}
}
}
.mask-content
{
&
.popup-bind-phone
{
height
:
350px
;
}
&
.popup-bind-address
{
height
:
316px
;
}
}
// 所有弹窗
// 所有弹窗
.popup-container
{
.popup-container
{
...
...
src/components/activity/newyear-2019/myTreasure/mask.js
View file @
c40cd6c4
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
Component
}
from
'react'
;
import
ReactDOM
from
'react-dom'
;
import
ReactDOM
from
'react-dom'
;
import
classnames
from
'classnames'
;
import
'./mask.scss'
;
import
'./mask.scss'
;
const
Root
=
document
.
querySelector
(
'body'
);
const
Root
=
document
.
querySelector
(
'body'
);
...
@@ -22,12 +23,12 @@ class Mask extends Component {
...
@@ -22,12 +23,12 @@ class Mask extends Component {
}
}
render
()
{
render
()
{
const
{
visible
,
handleToHide
}
=
this
.
props
;
const
{
visible
,
handleToHide
,
className
}
=
this
.
props
;
if
(
visible
)
{
if
(
visible
)
{
return
ReactDOM
.
createPortal
(
return
ReactDOM
.
createPortal
(
(
(
<
div
className
=
"mask"
>
<
div
className
=
"mask"
>
<
div
className
=
"mask-content"
>
<
div
className
=
{
classnames
(
"mask-content"
,
className
)}
>
{
this
.
props
.
children
}
{
this
.
props
.
children
}
<
/div
>
<
/div
>
<
div
className
=
"mask-footer"
>
<
div
className
=
"mask-footer"
>
...
...
src/components/activity/newyear-2019/myTreasure/team.js
View file @
c40cd6c4
...
@@ -138,8 +138,8 @@ class TreasureTeam extends Component {
...
@@ -138,8 +138,8 @@ class TreasureTeam extends Component {
<>
<>
{
{
is_captain
is_captain
?
<
Link
className
=
"team-button"
to
=
{
`/activity/newyear-2019/landing?treasure_code=
${
treasure_code
}
&origin=1`
}
>
继续邀请队友
<
/Link
>
?
<
a
className
=
"team-button"
href
=
{
`https://h5.julyedu.com/activity/newyear-2019/landing?treasure_code=
${
treasure_code
}
&origin=1`
}
>
继续邀请队友
<
/a
>
:
<
Link
className
=
"team-button"
to
=
{
`/activity/newyear-2019/landing?treasure_code=
${
treasure_code
}
&origin=2`
}
>
帮好友完成组队
<
/Link
>
:
<
a
className
=
"team-button"
href
=
{
`https://h5.julyedu.com/activity/newyear-2019/landing?treasure_code=
${
treasure_code
}
&origin=2`
}
>
帮好友完成组队
<
/a
>
}
}
<
/
>
<
/
>
}
}
...
@@ -176,4 +176,4 @@ class TreasureTeam extends Component {
...
@@ -176,4 +176,4 @@ class TreasureTeam extends Component {
}
}
}
}
export
default
TreasureTeam
;
export
default
TreasureTeam
;
\ No newline at end of file
src/components/activity/newyear-2019/preheat/LiveRoom/index.js
View file @
c40cd6c4
...
@@ -166,11 +166,18 @@ class LiveRoom extends Component {
...
@@ -166,11 +166,18 @@ class LiveRoom extends Component {
<
span
onClick
=
{
()
=>
this
.
subscribe
(
item
.
live_id
)}
className
=
"order__btn"
>
立即预约
<
/span
>
<
span
onClick
=
{
()
=>
this
.
subscribe
(
item
.
live_id
)}
className
=
"order__btn"
>
立即预约
<
/span
>
)
)
}
}
{
item
.
is_end
==
1
&&
item
.
transcribe_url
==
''
&&
(
<
span
className
=
"order__btn live__end"
>
已结束
<
/span
>
)
}
{
{
item
.
on_live
==
0
&&
item
.
is_end
==
0
&&
item
.
is_subscribe
==
1
&&
(
item
.
on_live
==
0
&&
item
.
is_end
==
0
&&
item
.
is_subscribe
==
1
&&
(
<
span
onClick
=
{
this
.
tip
}
className
=
"order__btn subscribed"
>
已预约
<
/span
>
<
span
onClick
=
{
this
.
tip
}
className
=
"order__btn subscribed"
>
已预约
<
/span
>
)
)
}
}
{
{
item
.
on_live
==
1
&&
item
.
is_end
==
0
&&
(
item
.
on_live
==
1
&&
item
.
is_end
==
0
&&
(
<
span
onClick
=
{()
=>
this
.
toLivingRoom
(
item
.
room_url
)}
className
=
"order__btn living"
>
正在直播
<
/span
>
<
span
onClick
=
{()
=>
this
.
toLivingRoom
(
item
.
room_url
)}
className
=
"order__btn living"
>
正在直播
<
/span
>
...
...
src/components/activity/newyear-2019/preheat/LiveRoom/index.scss
View file @
c40cd6c4
...
@@ -91,6 +91,10 @@
...
@@ -91,6 +91,10 @@
.subscribed
{
.subscribed
{
background
:
rgba
(
254
,
228
,
29
,
1
);
background
:
rgba
(
254
,
228
,
29
,
1
);
}
}
.live__end
{
background
:
#999
;
color
:
#fff
;
}
.living
{
.living
{
background
:
rgba
(
0
,
153
,
255
,
1
);
background
:
rgba
(
0
,
153
,
255
,
1
);
color
:
#fff
;
color
:
#fff
;
...
...
src/components/activity/newyear-2019/preheat/index.js
View file @
c40cd6c4
...
@@ -39,6 +39,7 @@ export default class index extends Component {
...
@@ -39,6 +39,7 @@ export default class index extends Component {
_this
.
loginInfo
(
result
)
_this
.
loginInfo
(
result
)
}
}
_this
.
getStage
()
_this
.
getStage
()
document
.
title
=
'七月在线年终大回馈,幸运宝箱随你开,100%有奖!人气好课免费学,精品课程1分抢!'
;
}
}
// 获取app登录数据
// 获取app登录数据
...
...
src/components/activity/newyear-2019/preheat/nav.scss
View file @
c40cd6c4
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
line-height
:
26px
;
line-height
:
26px
;
&
.active
{
&
.active
{
border
-right
:
1px
solid
#090F08
;
border
:
1px
solid
#090F08
;
border-radius
:
3px
;
border-radius
:
3px
;
color
:
#090F08
;
color
:
#090F08
;
background-color
:
#FEE41D
;
background-color
:
#FEE41D
;
...
...
src/components/activity/newyear-2019/treasure-box/team.js
View file @
c40cd6c4
...
@@ -102,9 +102,10 @@ class TeamInfo extends Component {
...
@@ -102,9 +102,10 @@ class TeamInfo extends Component {
// 直接跳转
// 直接跳转
if
(
!
getParam
(
'version'
))
{
if
(
!
getParam
(
'version'
))
{
this
.
props
.
history
.
push
(
'/activity/newyear-2019/landing?origin=1&treasure_code='
+
treasure_code
);
// this.props.history.push('/activity/newyear-2019/landing?origin=1&treasure_code=' + treasure_code);
window
.
location
.
assign
(
'https://h5.julyedu.com/activity/newyear-2019/landing?origin=1&treasure_code='
+
treasure_code
);
}
else
{
}
else
{
this
.
props
.
history
.
push
(
'
/activity/newyear-2019/landing?origin=1&treasure_code='
+
treasure_code
+
'&version='
+
getParam
(
'version'
));
window
.
location
.
assign
(
'https://h5.julyedu.com
/activity/newyear-2019/landing?origin=1&treasure_code='
+
treasure_code
+
'&version='
+
getParam
(
'version'
));
}
}
}
else
{
// 没自己的队伍
}
else
{
// 没自己的队伍
...
@@ -114,9 +115,9 @@ class TeamInfo extends Component {
...
@@ -114,9 +115,9 @@ class TeamInfo extends Component {
if
(
code
===
200
)
{
if
(
code
===
200
)
{
const
{
treasure_code
}
=
data
;
const
{
treasure_code
}
=
data
;
if
(
!
getParam
(
'version'
))
{
if
(
!
getParam
(
'version'
))
{
this
.
props
.
history
.
push
(
'
/activity/newyear-2019/landing?origin=1&treasure_code='
+
treasure_code
);
window
.
location
.
assign
(
'https://h5.julyedu.com
/activity/newyear-2019/landing?origin=1&treasure_code='
+
treasure_code
);
}
else
{
}
else
{
this
.
props
.
history
.
push
(
'
/activity/newyear-2019/landing?origin=1&treasure_code='
+
treasure_code
+
'&version='
+
getParam
(
'version'
));
window
.
location
.
assign
(
'https://h5.julyedu.com
/activity/newyear-2019/landing?origin=1&treasure_code='
+
treasure_code
+
'&version='
+
getParam
(
'version'
));
}
}
}
else
{
}
else
{
Toast
.
info
(
msg
);
Toast
.
info
(
msg
);
...
@@ -231,7 +232,7 @@ class TeamInfo extends Component {
...
@@ -231,7 +232,7 @@ class TeamInfo extends Component {
}
}
<
/div
>
<
/div
>
{
{
stage_no
>
0
&&
name
&&
<
p
className
=
'stage_prize'
>
{
`第
${
stage_no
}
次
必中
${
name
}
`
}
<
/p
>
stage_no
>
0
&&
name
&&
<
p
className
=
'stage_prize'
>
{
`第
${
stage_no
}
个宝箱
必中
${
name
}
`
}
<
/p
>
}
}
<
/div
>
<
/div
>
)
)
...
...
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