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
1ffa718e
Commit
1ffa718e
authored
Jul 13, 2020
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
周年庆
parent
23ae3a76
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
14 deletions
+40
-14
src/components/activity/2020-717/activity/index.js
+6
-2
src/components/activity/2020-717/invitation/index.js
+4
-3
src/components/activity/2020-717/question/index.js
+21
-8
src/components/activity/2020-717/question/index.scss
+9
-1
No files found.
src/components/activity/2020-717/activity/index.js
View file @
1ffa718e
...
...
@@ -9,6 +9,7 @@ import { Popup } from "@common/index"
import
classnames
from
'classnames'
import
tweenFunctions
from
'tween-functions'
import
storage
from
'store2'
import
{
REDO
,
addData
}
from
"@components/activity/2020-717/question/store/reducer"
class
Anniversary2020
extends
Component
{
...
...
@@ -116,6 +117,7 @@ class Anniversary2020 extends Component {
this
.
getBulletScreenData
()
this
.
getRankList
()
this
.
getStageCourses
(
'zero'
)
this
.
props
.
addData
({
type
:
REDO
})
if
(
this
.
store
.
session
.
get
(
'toInvitation'
)
&&
!
this
.
props
.
user
.
hasError
)
{
this
.
getFollowStaus
()
this
.
store
.
session
.
remove
(
'toInvitation'
)
...
...
@@ -1251,7 +1253,6 @@ class Anniversary2020 extends Component {
isShowFollow
:
false
,
});
}}
><
/i
>
<
/div
>
<
/div
>
}
...
...
@@ -1301,5 +1302,7 @@ function TeamMember({members, close, uid}) {
export
default
connect
(
({
user
})
=>
({
user
}),
null
,
dispatch
=>
({
addData
:
data
=>
dispatch
(
addData
(
data
)),
}),
)(
Anniversary2020
);
\ No newline at end of file
src/components/activity/2020-717/invitation/index.js
View file @
1ffa718e
import
React
,
{
Component
}
from
'react'
;
import
'./index.scss'
import
{
WithFullSize
}
from
"@/HOCs"
import
{
connect
}
from
"react-redux"
;
import
{
compose
}
from
"redux"
;
import
{
HeaderBar
}
from
"@common/index"
...
...
@@ -8,10 +7,11 @@ import { getParam, http, browser, wxShare } from "@/utils"
import
{
Toast
}
from
"antd-mobile"
;
import
{
CopyToClipboard
}
from
"react-copy-to-clipboard"
;
import
{
Link
}
from
'react-router-dom'
import
storage
from
'store2'
class
Invitation
extends
Component
{
store
=
storage
.
namespace
(
'anniversary2020'
)
state
=
{
prizes
:
[],
invitationInfo
:
{},
...
...
@@ -27,6 +27,7 @@ class Invitation extends Component {
this
.
getPrizesInfo
()
if
(
getParam
(
'team_code'
))
{
this
.
getTeamInfo
()
this
.
store
.
session
.
set
(
'team_code'
,
getParam
(
'team_code'
))
}
else
{
this
.
getInvitationInfo
()
}
...
...
@@ -78,7 +79,7 @@ class Invitation extends Component {
teamInfo
:
data
,
isMaster
:
data
.
is_captain
||
!
getParam
(
'team_code'
),
});
if
(
data
.
is_captain
)
{
if
(
data
.
is_captain
)
{
this
.
getInvitationInfo
()
}
}
else
{
...
...
src/components/activity/2020-717/question/index.js
View file @
1ffa718e
...
...
@@ -8,9 +8,10 @@ import { Link } from "react-router-dom"
import
{
compose
}
from
'redux'
import
{
connect
}
from
'react-redux'
import
{
addData
,
ADD_RECOMMENDS
,
ADD_QUESTION
,
ADD_RESULT
,
REDO
}
from
'./store/reducer'
import
storage
from
'store2'
class
Question
extends
Component
{
store
=
storage
.
namespace
(
'anniversary2020'
)
state
=
{
question
:
{},
result
:
{},
...
...
@@ -40,6 +41,14 @@ class Question extends Component {
type
:
ADD_QUESTION
,
payload
:
data
,
})
}
else
if
(
code
===
25004
)
{
const
{
history
}
=
this
.
props
let
teamCode
=
this
.
store
.
session
.
get
(
'team_code'
)
if
(
teamCode
)
{
history
.
push
(
`/anniversary_2020/invitation?team_code=
${
teamCode
}
`
)
}
else
{
history
.
push
(
`/anniversary_2020`
)
}
}
else
{
Toast
.
info
(
msg
)
}
...
...
@@ -131,7 +140,7 @@ class Question extends Component {
}
getOptionLabel
=
(
index
)
=>
{
return
String
.
fromCharCode
(
65
+
index
)
return
index
>=
0
?
String
.
fromCharCode
(
65
+
index
)
:
'空'
}
redo
=
()
=>
{
...
...
@@ -204,11 +213,9 @@ class Question extends Component {
isTeamHead
=
{
isTeamHead
}
isActivityEnd
=
{
isActivityEnd
}
submit
=
{()
=>
{
if
(
this
.
state
.
selectedOptionId
)
{
this
.
setState
({
isShowConfirm
:
true
,
})
}
});
}}
redo
=
{
this
.
redo
}
/
>
...
...
@@ -223,15 +230,20 @@ class Question extends Component {
}
{
isResultConfirm
&&
<
ResultConfirm
resultFun
=
{
this
.
resultFun
}
is_correct
=
{
this
.
state
.
is_correct
}
is_sign
=
{
this
.
state
.
is_sign
}
><
/ResultConfirm
>
<
ResultConfirm
resultFun
=
{
this
.
resultFun
}
is_correct
=
{
this
.
state
.
is_correct
}
is_sign
=
{
this
.
state
.
is_sign
}
close
=
{()
=>
{
this
.
setState
({
isResultConfirm
:
false
});
}}
>
<
/ResultConfirm
>
}
<
/div
>
)
}
}
function
ResultConfirm
({
resultFun
,
is_correct
,
is_sign
})
{
function
ResultConfirm
({
resultFun
,
is_correct
,
is_sign
,
close
})
{
return
<
div
className
=
"modal-cover"
>
<
div
className
=
"modal"
>
{
...
...
@@ -250,6 +262,7 @@ function ResultConfirm({resultFun, is_correct, is_sign}) {
}
<
/button
>
<
/div
>
<
i
className
=
"close iconiconfront-2 iconfont"
onClick
=
{
close
}
><
/i
>
<
/div
>
<
/div
>
}
...
...
src/components/activity/2020-717/question/index.scss
View file @
1ffa718e
...
...
@@ -185,6 +185,15 @@
background-color
:
rgba
(
0
,
0
,
0
,
.6
);
z-index
:
200
;
.close
{
position
:
absolute
;
bottom
:
-54px
;
left
:
50%
;
transform
:
translateX
(
-50%
);
font-size
:
24px
;
color
:
#fff
;
}
.modal
{
position
:
absolute
;
top
:
50%
;
...
...
@@ -193,7 +202,6 @@
width
:
300px
;
background
:
#fff
;
border-radius
:
5px
;
overflow
:
hidden
;
}
.title
{
...
...
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