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
926738c7
Commit
926738c7
authored
Dec 18, 2019
by
FE
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '00' of gitlab.julyedu.com:baiguangyao/mr-julyedu into 00
parents
7f7f8563
a6b931aa
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
89 additions
and
29 deletions
+89
-29
src/components/activity/newyear-2019/common/prizes/prizes.scss
+33
-0
src/components/activity/newyear-2019/common/system-bullet-screen/index.js
+5
-1
src/components/activity/newyear-2019/landing/index.js
+29
-24
src/components/activity/newyear-2019/landing/landing.scss
+3
-1
src/components/activity/newyear-2019/myTreasure/index.js
+0
-0
src/components/activity/newyear-2019/preheat/LiveRoom/index.js
+7
-0
src/components/activity/newyear-2019/preheat/index.js
+2
-2
src/components/activity/newyear-2019/treasure-box/index.js
+1
-1
src/components/activity/newyear-2019/treasure-box/team.js
+9
-0
No files found.
src/components/activity/newyear-2019/common/prizes/prizes.scss
View file @
926738c7
...
@@ -116,6 +116,12 @@
...
@@ -116,6 +116,12 @@
}
}
}
}
&
li
:last-child
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.top-tag
{
.top-tag
{
position
:
absolute
;
position
:
absolute
;
top
:
0
;
top
:
0
;
...
@@ -167,6 +173,7 @@
...
@@ -167,6 +173,7 @@
height
:
2px
;
height
:
2px
;
background
:
#fff
;
background
:
#fff
;
border-radius
:
1px
;
border-radius
:
1px
;
.progress
{
.progress
{
position
:
absolute
;
position
:
absolute
;
right
:
0
;
right
:
0
;
...
@@ -188,3 +195,29 @@
...
@@ -188,3 +195,29 @@
}
}
}
}
}
}
.landing-treasure-rules
{
width
:
320px
;
&
.popup-container
{
top
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
.title
{
font-size
:
18px
;
color
:
#111111
;
}
}
.content
{
padding
:
0
19px
15px
;
margin-top
:
22px
;
color
:
#666666
;
font-size
:
14px
;
li
{
margin-bottom
:
5px
;
}
}
}
src/components/activity/newyear-2019/common/system-bullet-screen/index.js
View file @
926738c7
...
@@ -60,8 +60,12 @@ class SystemBulletScreen extends Component {
...
@@ -60,8 +60,12 @@ class SystemBulletScreen extends Component {
content
.
style
.
transform
=
`translate3d(
${
-
(
contentWidth
-
wrapperWidth
)
-
10
}
px,0,0)`
content
.
style
.
transform
=
`translate3d(
${
-
(
contentWidth
-
wrapperWidth
)
-
10
}
px,0,0)`
},
1000
)
},
1000
)
}
else
{
}
else
{
const
{
bullets
}
=
this
.
props
const
len
=
bullets
.
length
*
3
setTimeout
(()
=>
{
setTimeout
(()
=>
{
++
this
.
count
;
if
(
++
this
.
count
===
len
)
{
this
.
sysNotice
.
style
.
height
=
`0px`
}
(
swiper
&&
!
swiper
.
destroyed
)
&&
swiper
.
slideNext
()
(
swiper
&&
!
swiper
.
destroyed
)
&&
swiper
.
slideNext
()
},
3000
)
},
3000
)
}
}
...
...
src/components/activity/newyear-2019/landing/index.js
View file @
926738c7
...
@@ -17,8 +17,10 @@ class Landing extends Component {
...
@@ -17,8 +17,10 @@ class Landing extends Component {
closeIcon
=
'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/close-btn.png'
closeIcon
=
'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/close-btn.png'
createTeamSuccessPopup
=
null
createTeamSuccessPopup
=
null
joinSuccessPopup
=
null
joinSuccessPopup
=
null
shareTipPopup
=
null
swiper
=
null
swiper
=
null
state
=
{
state
=
{
teamData
:
{
teamData
:
{
member
:
[]
member
:
[]
...
@@ -42,8 +44,13 @@ class Landing extends Component {
...
@@ -42,8 +44,13 @@ class Landing extends Component {
}
}
}
}
componentWillUnmount
()
{
this
.
shareTipPopup
&&
this
.
shareTipPopup
.
remove
()
}
fetchPageData
=
({
origin
=
this
.
state
.
origin
,
treasure_code
=
this
.
state
.
treasure_code
}
=
{})
=>
{
fetchPageData
=
({
origin
=
this
.
state
.
origin
,
treasure_code
=
this
.
state
.
treasure_code
}
=
{})
=>
{
const
{
location
}
=
this
.
props
http
.
post
(
`
${
API
.
home
}
/sys/treasure/team`
,
{
http
.
post
(
`
${
API
.
home
}
/sys/treasure/team`
,
{
treasure_code
,
treasure_code
,
origin
origin
...
@@ -58,6 +65,16 @@ class Landing extends Component {
...
@@ -58,6 +65,16 @@ class Landing extends Component {
activityEnd
:
data
.
status
==
5
activityEnd
:
data
.
status
==
5
})
})
if
(
browser
.
isWeixin
)
{
wxShare
({
title
:
`@
${
data
.
member
[
0
].
user_name
}
邀您一起组队拿豪礼!`
,
desc
:
`加入我的队伍,机械键盘,纸质书籍等超多奖品等你拿!`
,
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`)
}
let
searchParams
=
new
URLSearchParams
(
window
.
location
.
search
)
let
searchParams
=
new
URLSearchParams
(
window
.
location
.
search
)
if
(
searchParams
.
get
(
'origin'
)
===
'1'
&&
!
browser
.
isWeixin
)
{
if
(
searchParams
.
get
(
'origin'
)
===
'1'
&&
!
browser
.
isWeixin
)
{
searchParams
.
set
(
'origin'
,
'2'
)
searchParams
.
set
(
'origin'
,
'2'
)
...
@@ -75,7 +92,7 @@ class Landing extends Component {
...
@@ -75,7 +92,7 @@ class Landing extends Component {
}
}
showSharePromptWithParam
=
()
=>
{
showSharePromptWithParam
=
()
=>
{
if
(
sessionStorage
.
getItem
(
'showShareTip'
))
{
if
(
sessionStorage
.
getItem
(
'showShareTip'
)
&&
!
sessionStorage
.
getItem
(
'closedRemind'
)
)
{
this
.
showShareTip
()
this
.
showShareTip
()
}
}
}
}
...
@@ -115,7 +132,8 @@ class Landing extends Component {
...
@@ -115,7 +132,8 @@ class Landing extends Component {
})
})
}
}
handleToMyTreasure
=
()
=>
{
handleToMyTreasure
=
id
=>
{
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'
)}
`
)
history
.
push
(
`/year/yearTreasure?id=
${
id
}
&version=
${
getParam
(
'version'
)}
`
)
...
@@ -125,7 +143,6 @@ class Landing extends Component {
...
@@ -125,7 +143,6 @@ class Landing extends Component {
}
}
joinSuccess
=
({
id
,
status
,
my_team
:
{
team_num
,
lack_member
,
is_team
,
treasure_code
}})
=>
{
joinSuccess
=
({
id
,
status
,
my_team
:
{
team_num
,
lack_member
,
is_team
,
treasure_code
}})
=>
{
const
{
history
}
=
this
.
props
this
.
joinSuccessPopup
=
Popup
({
this
.
joinSuccessPopup
=
Popup
({
title
:
<
div
className
=
{
'join-success'
}
>
title
:
<
div
className
=
{
'join-success'
}
>
<
img
src
=
"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/check-icon.png"
alt
=
""
/>
<
img
src
=
"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/check-icon.png"
alt
=
""
/>
...
@@ -145,9 +162,9 @@ class Landing extends Component {
...
@@ -145,9 +162,9 @@ class Landing extends Component {
{
{
status
===
2
status
===
2
?
<
img
style
=
{{
width
:
'150px'
,
marginTop
:
'23px'
}}
?
<
img
style
=
{{
width
:
'150px'
,
marginTop
:
'23px'
}}
src
=
"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/
PC/treasure-box.png
"
src
=
"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/
treasure-split.gif
"
alt
=
""
alt
=
""
onClick
=
{
this
.
handleToMyTreasure
}
onClick
=
{
this
.
handleToMyTreasure
.
bind
(
this
,
id
)
}
/
>
/
>
:
is_team
:
is_team
?
<
button
type
=
'button'
?
<
button
type
=
'button'
...
@@ -177,14 +194,6 @@ class Landing extends Component {
...
@@ -177,14 +194,6 @@ class Landing extends Component {
}
}
SendMessageToApp
(
"toShare"
,
data
)
SendMessageToApp
(
"toShare"
,
data
)
}
}
if
(
browser
.
isWeixin
)
{
wxShare
({
title
:
`@
${
user
.
data
.
username
}
邀您一起组队拿豪礼!`
,
desc
:
`加入我的队伍,机械键盘,纸质书籍等超多奖品等你拿!`
,
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'
})
}
sessionStorage
.
setItem
(
'showShareTip'
,
'1'
)
sessionStorage
.
setItem
(
'showShareTip'
,
'1'
)
history
.
replace
(
`
${
match
.
url
}
?treasure_code=
${
treasure_code
}
&origin=
${
1
}
`
)
history
.
replace
(
`
${
match
.
url
}
?treasure_code=
${
treasure_code
}
&origin=
${
1
}
`
)
this
.
createTeamSuccessPopup
&&
this
.
createTeamSuccessPopup
.
remove
()
&&
(
this
.
createTeamSuccessPopup
=
null
)
this
.
createTeamSuccessPopup
&&
this
.
createTeamSuccessPopup
.
remove
()
&&
(
this
.
createTeamSuccessPopup
=
null
)
...
@@ -278,6 +287,7 @@ class Landing extends Component {
...
@@ -278,6 +287,7 @@ class Landing extends Component {
<
/div>
,
<
/div>
,
close
:
()
=>
{
close
:
()
=>
{
// history.replace(`${match.path}?treasure_code=${treasure_code}&origin=1`)
// history.replace(`${match.path}?treasure_code=${treasure_code}&origin=1`)
sessionStorage
.
setItem
(
'closedRemind'
,
'1'
)
this
.
fetchPageData
({
this
.
fetchPageData
({
treasure_code
,
treasure_code
,
origin
origin
...
@@ -301,16 +311,7 @@ class Landing extends Component {
...
@@ -301,16 +311,7 @@ class Landing extends Component {
})
})
}
else
{
}
else
{
if
(
browser
.
isWeixin
&&
getParam
(
'origin'
)
==
1
)
{
this
.
shareTipPopup
=
Popup
({
wxShare
({
title
:
`@
${
user
.
data
.
username
}
邀您一起组队拿豪礼!`
,
desc
:
`加入我的队伍,机械键盘,纸质书籍等超多奖品等你拿!`
,
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`)
}
Popup
({
title
:
<
div
>
还差
<
span
>
{
this
.
state
.
teamData
.
lack_member
}
<
/span>名队友即可获得宝箱 快分享给好友吧~</
div
>
,
title
:
<
div
>
还差
<
span
>
{
this
.
state
.
teamData
.
lack_member
}
<
/span>名队友即可获得宝箱 快分享给好友吧~</
div
>
,
className
:
`landing-share-tip
${
browser
.
isWeixin
?
'wechat'
:
''
}
`
,
className
:
`landing-share-tip
${
browser
.
isWeixin
?
'wechat'
:
''
}
`
,
closable
:
false
,
closable
:
false
,
...
@@ -356,7 +357,11 @@ class Landing extends Component {
...
@@ -356,7 +357,11 @@ class Landing extends Component {
const
{
history
,
user
}
=
this
.
props
const
{
history
,
user
}
=
this
.
props
if
(
user
.
hasError
)
{
if
(
user
.
hasError
)
{
history
.
push
(
'/passport'
)
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`
)
}
else
{
history
.
push
(
'/passport'
)
}
return
true
return
true
}
}
}
}
...
...
src/components/activity/newyear-2019/landing/landing.scss
View file @
926738c7
.sup
{
.sup
{
position
:
absolute
;
position
:
absolute
;
right
:
-10px
;
right
:
-10px
;
top
:
-13px
;
top
:
0
;
transform
:
translateY
(
-50%
);
width
:
30px
;
width
:
30px
;
height
:
16px
;
height
:
16px
;
background
:
rgba
(
255
,
227
,
0
,
1
);
background
:
rgba
(
255
,
227
,
0
,
1
);
...
@@ -108,6 +109,7 @@
...
@@ -108,6 +109,7 @@
width
:
36px
;
width
:
36px
;
height
:
36px
;
height
:
36px
;
border-radius
:
50%
;
border-radius
:
50%
;
border
:
1px
solid
#fff
;
}
}
}
}
...
...
src/components/activity/newyear-2019/myTreasure/index.js
View file @
926738c7
This diff is collapsed.
Click to expand it.
src/components/activity/newyear-2019/preheat/LiveRoom/index.js
View file @
926738c7
...
@@ -25,6 +25,13 @@ class LiveRoom extends Component {
...
@@ -25,6 +25,13 @@ class LiveRoom extends Component {
componentDidMount
()
{
componentDidMount
()
{
this
.
getLiveInfo
();
this
.
getLiveInfo
();
}
}
shouldComponentUpdate
(
nextProps
,
nextState
,
nextContext
)
{
if
(
this
.
props
.
isAppUpdate
!==
nextProps
.
isAppUpdate
)
{
this
.
getLiveInfo
();
return
false
}
return
true
}
getLiveInfo
=
()
=>
{
getLiveInfo
=
()
=>
{
http
.
get
(
`
${
API
.
home
}
/activity/get_live_info`
).
then
(
res
=>
{
http
.
get
(
`
${
API
.
home
}
/activity/get_live_info`
).
then
(
res
=>
{
const
{
code
,
data
,
msg
}
=
res
.
data
;
const
{
code
,
data
,
msg
}
=
res
.
data
;
...
...
src/components/activity/newyear-2019/preheat/index.js
View file @
926738c7
...
@@ -133,11 +133,11 @@ export default class index extends Component {
...
@@ -133,11 +133,11 @@ export default class index extends Component {
<
/div
>
<
/div
>
{
/* 大咖直播 */
}
{
/* 大咖直播 */
}
<
LiveRoom
/>
<
LiveRoom
isAppUpdate
=
{
this
.
state
.
isAppUpdate
}
/
>
{
/* 组队开宝箱 */
}
{
/* 组队开宝箱 */
}
{
{
treasure_stage
===
1
&&
<
TreasureBox
getRemovable
=
{
this
.
getRemovable
}
/
>
treasure_stage
===
1
&&
<
TreasureBox
isAppUpdate
=
{
this
.
state
.
isAppUpdate
}
getRemovable
=
{
this
.
getRemovable
}
/
>
}
}
{
/*课程*/
}
{
/*课程*/
}
...
...
src/components/activity/newyear-2019/treasure-box/index.js
View file @
926738c7
...
@@ -16,7 +16,7 @@ class TreasureBox extends Component {
...
@@ -16,7 +16,7 @@ class TreasureBox extends Component {
<
div
style
=
{{
textAlign
:
'center'
,
fontSize
:
'12px'
,
color
:
'#FFDC1E'
,
marginTop
:
'10px'
}}
>
邀请好友组队一起开宝箱,满
5
人后将随机获得以下奖品
~<
/div
>
<
div
style
=
{{
textAlign
:
'center'
,
fontSize
:
'12px'
,
color
:
'#FFDC1E'
,
marginTop
:
'10px'
}}
>
邀请好友组队一起开宝箱,满
5
人后将随机获得以下奖品
~<
/div
>
<
Prizes
showSystemNotices
=
{
true
}
/
>
<
Prizes
showSystemNotices
=
{
true
}
/
>
<
UserBulletScreen
/>
<
UserBulletScreen
/>
<
TeamInfo
getRemovable
=
{
this
.
props
.
getRemovable
}
/
>
<
TeamInfo
isAppUpdate
=
{
this
.
props
.
isAppUpdate
}
getRemovable
=
{
this
.
props
.
getRemovable
}
/
>
<
TreasureRank
history
=
{
this
.
props
.
history
}
/
>
<
TreasureRank
history
=
{
this
.
props
.
history
}
/
>
<
/CommonContainer
>
<
/CommonContainer
>
)
)
...
...
src/components/activity/newyear-2019/treasure-box/team.js
View file @
926738c7
...
@@ -83,11 +83,20 @@ class TeamInfo extends Component {
...
@@ -83,11 +83,20 @@ class TeamInfo extends Component {
}
}
}
}
shouldComponentUpdate
(
nextProps
,
nextState
,
nextContext
)
{
if
(
this
.
props
.
isAppUpdate
!==
nextProps
.
isAppUpdate
)
{
this
.
getTeamInfo
();
return
false
}
return
true
}
// 邀请好友组队
// 邀请好友组队
createTeam
=
()
=>
{
createTeam
=
()
=>
{
if
(
this
.
props
.
user
.
hasError
)
{
if
(
this
.
props
.
user
.
hasError
)
{
this
.
toLogin
();
this
.
toLogin
();
}
else
{
}
else
{
sessionStorage
.
setItem
(
'showShareTip'
,
'1'
)
const
{
is_my_team
,
my_team
:
{
treasure_code
}}
=
this
.
state
;
const
{
is_my_team
,
my_team
:
{
treasure_code
}}
=
this
.
state
;
if
(
is_my_team
)
{
// 有自己的队伍
if
(
is_my_team
)
{
// 有自己的队伍
// 直接跳转
// 直接跳转
...
...
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