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
840fffc3
Commit
840fffc3
authored
Jul 20, 2020
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
微信登录无痕验证
parent
c6d13618
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
168 additions
and
344 deletions
+168
-344
src/App.js
+0
-0
src/assets/css/index.scss
+135
-329
src/components/activity/2020-717/invitation/index.js
+23
-5
src/store/index.js
+10
-10
No files found.
src/App.js
View file @
840fffc3
This diff is collapsed.
Click to expand it.
src/assets/css/index.scss
View file @
840fffc3
...
...
@@ -10,25 +10,70 @@ $link-visited: #333; // 设置链接访问后的颜色
$main-color
:
#09f
;
// 主体颜色
// 字体
$font-family-zh
:
"Helvetica Neue"
,
Helvetica
,
"PingFang SC"
,
"Hiragino Sans GB"
,
"Microsoft YaHei"
,
"微软雅黑"
,
Arial
,
sans-serif
;
$font-family-zh
:
"Helvetica Neue"
,
Helvetica
,
"PingFang SC"
,
"Hiragino Sans GB"
,
"Microsoft YaHei"
,
"微软雅黑"
,
Arial
,
sans-serif
;
$font-family-en
:
Arial
,
sans-serif
!
default
;
// 盒子模型
$box-model
:
border-box
!
default
;
// z-index
$z-50
:
50
;
$z-100
:
100
;
$z-150
:
150
;
$z-200
:
200
;
$z-250
:
250
;
$z-max
:
999999
;
//为了应付某些插件z-index 值过高的问题
// 全局设置
// --------------------------------------------------
//
html
,
body
,
div
,
span
,
object
,
iframe
,
h1
,
h2
,
h3
,
h4
,
h5
,
h6
,
p
,
blockquote
,
pre
,
a
,
abbr
,
address
,
cite
,
code
,
del
,
dfn
,
em
,
img
,
ins
,
kbd
,
q
,
samp
,
small
,
strong
,
sub
,
sup
,
var
,
b
,
i
,
dl
,
dt
,
dd
,
ol
,
ul
,
li
,
fieldset
,
form
,
label
,
legend
,
table
,
caption
,
tbody
,
tfoot
,
thead
,
tr
,
th
,
td
{
html
,
body
,
div
,
span
,
object
,
iframe
,
h1
,
h2
,
h3
,
h4
,
h5
,
h6
,
p
,
blockquote
,
pre
,
a
,
abbr
,
address
,
cite
,
code
,
del
,
dfn
,
em
,
img
,
ins
,
kbd
,
q
,
samp
,
small
,
strong
,
sub
,
sup
,
var
,
b
,
i
,
dl
,
dt
,
dd
,
ol
,
ul
,
li
,
fieldset
,
form
,
label
,
legend
,
table
,
caption
,
tbody
,
tfoot
,
thead
,
tr
,
th
,
td
{
border
:
0
none
;
font-size
:
inherit
;
color
:
inherit
;
...
...
@@ -40,15 +85,23 @@ html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pr
max-height
:
100000px
;
}
h1
,
h2
,
h3
,
h4
,
h5
,
h6
{
h1
,
h2
,
h3
,
h4
,
h5
,
h6
{
font-weight
:
normal
;
}
em
,
strong
{
em
,
strong
{
font-style
:
normal
;
}
ul
,
ol
,
li
{
ul
,
ol
,
li
{
list-style
:
none
;
}
...
...
@@ -78,252 +131,12 @@ body {
padding-bottom
:
constant
(
safe-area-inset-bottom
);
}
// Links
a
{
text-decoration
:
none
;
outline
:
none
;
&
:hover
,
&
:link
,
&
:focus
{
text-decoration
:
none
;
}
&
:visited
{
}
}
// 暂时放置样式,后期需处理
.homeImg
{
display
:
block
;
width
:
100%
;
}
// 字体颜色
.main-color
{
color
:
$main-color
;
}
.color333
{
color
:
#333
}
.color666
{
color
:
#666
}
.color999
{
color
:
#999
}
// 背景颜色
.bg-white
{
background-color
:
#fff
}
// 间隔
.pt20
{
padding-top
:
20px
;
}
.pt30
{
padding-top
:
30px
;
}
.pt40
{
padding-top
:
40px
;
}
.pt50
{
padding-top
:
50px
;
}
.pt60
{
padding-top
:
60px
;
}
.plr20
{
padding-left
:
0
.2rem
;
padding-right
:
0
.2rem
;
}
// 请保证你的设计稿为750px宽,如果有其余字体大小,请在私有样式中设置
.font-20
{
font-size
:
0
.2rem
;
}
.font-24
{
font-size
:
0
.24rem
;
}
.font-26
{
font-size
:
0
.26rem
;
}
.font-28
{
font-size
:
0
.28rem
;
}
.font-30
{
font-size
:
0
.3rem
;
}
.font-32
{
font-size
:
0
.32rem
;
}
.font-34
{
font-size
:
0
.34rem
;
}
.font-36
{
font-size
:
0
.36rem
;
}
.font-38
{
font-size
:
0
.38rem
;
}
.font-40
{
font-size
:
0
.4rem
;
}
// 设置block
.block
{
display
:
block
;
}
.show
{
display
:
inherit
;
}
.hide
{
display
:
none
;
}
// 最外层页面设置
.box
{
max-width
:
10rem
;
margin-left
:
auto
;
margin-right
:
auto
;
}
// 半透明弹层
.alert-bg
{
position
:
fixed
;
z-index
:
$z-50
;
width
:
100%
;
top
:
0
;
bottom
:
0
;
background
:
rgba
(
0
,
0
,
0
,
.6
);
display
:
none
;
//注意:默认隐藏!!
}
.alpha-bg
{
position
:
fixed
;
z-index
:
100
;
background
:
rgba
(
0
,
0
,
0
,
.7
);
top
:
0
;
left
:
0
;
right
:
0
;
bottom
:
0
;
}
.fixed-bottom
{
position
:
fixed
;
z-index
:
99
;
bottom
:
0
;
width
:
100%
;
}
// 布局相关
// 水平
.hor
{
display
:
flex
;
flex-direction
:
row
;
flex-wrap
:
wrap
;
}
// 水平居中
.hor-center
{
display
:
flex
;
flex-direction
:
row
;
flex-wrap
:
nowrap
;
justify-content
:
center
;
}
// 垂直居中
.ver-center
{
display
:
flex
;
flex-direction
:
row
;
flex-wrap
:
nowrap
;
align-items
:
center
;
}
// 子元素内联垂直居中
.center-center
{
display
:
flex
;
flex-direction
:
row
;
flex-wrap
:
nowrap
;
align-items
:
center
;
justify-content
:
center
;
}
// 子元素块联水平垂直居中
.center-center-column
{
display
:
flex
;
flex-direction
:
column
;
flex-wrap
:
nowrap
;
align-items
:
center
;
justify-content
:
center
;
}
// 两边对齐
.space-between
{
display
:
flex
;
flex-direction
:
row
;
flex-wrap
:
wrap
;
align-items
:
center
;
justify-content
:
space-between
;
}
// last-no-border
.last-no-border
:last-child
{
border
:
none
;
background
:
none
;
}
// 图片设置
img
{
max-width
:
100%
;
}
.img-responsive
{
display
:
block
;
width
:
100%
;
}
// 这里主要应付 antd-mobile 的组件carousel 不能等比缩放的蛋疼问题
.home-swipe
{
height
:
40
.625vw
;
max-height
:
406
.25px
;
}
// 文本控制类
.text-left
{
text-align
:
left
;
}
.text-right
{
text-align
:
right
;
}
.text-center
{
text-align
:
center
;
}
// 字符溢出隐藏
.text-overflow-1
{
overflow
:
hidden
;
...
...
@@ -361,75 +174,6 @@ img {
-webkit-box-orient
:
vertical
;
}
// 浮动控制
.cf
{
&
:before
,
&
:after
{
content
:
''
;
display
:
table
;
}
&
:after
{
clear
:
both
;
}
}
.fl
{
float
:
left
;
}
.fr
{
float
:
right
;
}
.relative
{
position
:
relative
;
}
.absolute
{
position
:
absolute
;
}
.fixed
{
position
:
fixed
;
}
.z-50
{
z-index
:
50
;
}
.z-100
{
z-index
:
100
;
}
.z-150
{
z-index
:
150
;
}
.z-200
{
z-index
:
200
;
}
.z-250
{
z-index
:
250
;
}
.z-max
{
z-index
:
999999
;
}
.overflow-h
{
overflow
:
hidden
;
}
// 元素绝对定位的垂直水平居中
.absolute-center
{
position
:
absolute
;
left
:
50%
;
top
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
}
// radio 样式重写
input
[
type
=
"radio"
]
{
position
:
relative
;
...
...
@@ -445,7 +189,7 @@ input[type="radio"] {
input
[
type
=
"radio"
]
:before
{
position
:
absolute
;
content
:
''
;
content
:
""
;
display
:
block
;
width
:
0
.36rem
;
height
:
0
.36rem
;
...
...
@@ -461,7 +205,7 @@ input[type="radio"]:before {
input
[
type
=
"radio"
]
:checked:after
{
position
:
absolute
;
z-index
:
50
;
content
:
''
;
content
:
""
;
display
:
block
;
width
:
0
.36rem
;
height
:
0
.36rem
;
...
...
@@ -476,7 +220,7 @@ input[type="radio"]:checked:after {
input
[
type
=
"radio"
]
:checked:before
{
position
:
absolute
;
z-index
:
100
;
content
:
''
;
content
:
""
;
display
:
block
;
width
:
0
.18rem
;
height
:
0
.18rem
;
...
...
@@ -501,14 +245,14 @@ input[type="radio"]:checked:before {
font-weight
:
600
;
}
.am-modal-button-group-h
{
.am-modal-button
{
font-size
:
15px
;
}
}
.am-modal-alert-content
,
.am-modal-propmt-content
{
.am-modal-alert-content
,
.am-modal-propmt-content
{
color
:
#333
;
font-size
:
15px
;
}
...
...
@@ -538,7 +282,69 @@ input[type="radio"]:checked:before {
}
}
#global-captcha
{
height
:
44px
;
.modal-cover
{
position
:
fixed
;
top
:
0
;
left
:
0
;
right
:
0
;
bottom
:
0
;
background
:
rgba
(
0
,
0
,
0
,
0
.7
);
z-index
:
9999
;
.modal
{
position
:
absolute
;
left
:
50%
;
top
:
50%
;
transform
:
translate
(
-50%
,
-65%
);
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
flex-wrap
:
wrap
;
width
:
300px
;
height
:
130px
;
text-align
:
center
;
padding
:
20px
20px
;
background
:
#fff
;
border-radius
:
5px
;
font-size
:
16px
;
color
:
#525c65
;
&
>
div
{
margin-bottom
:
10px
;
}
._nc
{
height
:
48px
;
}
.stage
{
height
:
48px
;
.slider
{
height
:
48px
;
box-shadow
:
0
0
3px
#9a9a9a
;
.label
,
.track
,
.button
{
height
:
48px
;
}
}
}
}
.close
{
position
:
absolute
;
bottom
:
-80px
;
left
:
50%
;
margin-left
:
-18px
;
font-size
:
36px
;
color
:
#fff
;
}
#global-captcha
{
width
:
100%
;
height
:
48px
;
margin-bottom
:
50px
;
}
}
src/components/activity/2020-717/invitation/index.js
View file @
840fffc3
...
...
@@ -9,6 +9,7 @@ import { CopyToClipboard } from "react-copy-to-clipboard";
import
{
Link
}
from
'react-router-dom'
import
storage
from
'store2'
import
{
CaptchaAli
}
from
"@common/index"
import
{
showCaptchaModal
}
from
"@/store/no-trace-validation/reducer"
;
class
Invitation
extends
Component
{
...
...
@@ -94,7 +95,12 @@ class Invitation extends Component {
}
joinTeam
=
data
=>
{
const
{
user
,
history
}
=
this
.
props
const
{
user
,
history
,
noTraceValidation
,
showCaptchaModal
}
=
this
.
props
if
(
noTraceValidation
.
isNeedValidation
&&
!
noTraceValidation
.
isShowCaptcha
)
{
showCaptchaModal
()
return
}
if
(
user
.
hasError
)
{
if
(
browser
.
isWeixin
)
{
window
.
location
.
href
=
"https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri="
+
encodeURIComponent
(
window
.
location
.
href
+
"&aa=bb"
).
toLowerCase
()
+
"&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect"
...
...
@@ -103,33 +109,42 @@ class Invitation extends Component {
}
return
}
if
(
this
.
state
.
teamInfo
.
is_check
&&
!
this
.
state
.
isShowCaptcha
)
{
this
.
setState
({
isShowCaptcha
:
true
,
});
return
}
let
_data
=
{
team_code
:
getParam
(
'team_code'
)}
if
(
data
.
token
&&
data
.
sig
)
{
_data
=
{...
_data
,
...
data
}
}
http
.
post
(
`
${
API
.
home
}
/activity/anniversary/joinTeam`
,
_data
)
.
then
(
res
=>
{
const
{
code
,
msg
}
=
res
.
data
if
(
code
===
200
)
{
Toast
.
info
(
'加入成功'
,
2
,
null
,
false
)
this
.
setState
((
state
,
props
)
=>
{
return
{
teamInfo
:
{...
state
.
teamInfo
,
...{
status
:
2
,
is_check
:
false
}},
isShowCaptcha
:
false
,
}
});
})
}
else
if
(
code
===
5002
)
{
this
.
state
.
instance
&&
this
.
state
.
instance
.
reset
()
}
else
if
(
code
===
25015
)
{
this
.
setState
({
isActivityEnd
:
true
,
});
})
}
else
{
Toast
.
info
(
msg
)
}
...
...
@@ -265,7 +280,9 @@ function BottomButton({status, isActivityEnd, isAnswered, joinTeam, drawQuestion
export
default
compose
(
connect
(
({
user
})
=>
({
user
}),
null
,
({
user
,
noTraceValidation
})
=>
({
user
,
noTraceValidation
}),
{
showCaptchaModal
,
},
),
)(
Invitation
);
\ No newline at end of file
src/store/index.js
View file @
840fffc3
import
{
combineReducers
}
from
'redux'
;
import
myCourses
from
'@/components/study/myCourses/reducers'
import
courseInfo
from
'@/components/detail/reducers'
import
user
from
'./userReducer'
import
country
from
'@/components/country/countryRedux'
import
{
combineReducers
}
from
"redux"
import
myCourses
from
"@/components/study/myCourses/reducers"
import
courseInfo
from
"@/components/detail/reducers"
import
user
from
"./userReducer"
import
country
from
"@/components/country/countryRedux"
import
intelligentRecommend
from
"@components/intelligent-recommend/store"
import
anniversary2020Question
from
'@components/activity/2020-717/question/store/reducer'
//2020周年庆活动答题页
import
anniversary2020Question
from
"@components/activity/2020-717/question/store/reducer"
//2020周年庆活动答题页
import
noTraceValidation
from
"./no-trace-validation/reducer"
const
reducer
=
combineReducers
({
myCourses
,
...
...
@@ -14,6 +14,7 @@ const reducer = combineReducers({
country
,
intelligentRecommend
,
anniversary2020Question
,
});
noTraceValidation
,
})
export
default
reducer
;
\ No newline at end of file
export
default
reducer
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