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
94a1c322
Commit
94a1c322
authored
Nov 01, 2019
by
xuzhenghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pull
parent
faf8ed50
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
18 deletions
+7
-18
src/components/blessingPreheat/index.js
+5
-16
src/components/blessingPreheat/luckDraw/index.js
+2
-2
No files found.
src/components/blessingPreheat/index.js
View file @
94a1c322
...
...
@@ -34,7 +34,6 @@ class BlessingPreheat extends Component {
this
.
navTop
=
183
this
.
prevY
=
0
this
.
state
=
{
isLogin
:
false
,
userInfoList
:
[],
isRule
:
false
,
isCourse
:
false
,
...
...
@@ -104,17 +103,6 @@ class BlessingPreheat extends Component {
}
componentDidUpdate
(
prevProps
,
prevState
){
let
{
user
}
=
this
.
props
console
.
log
(
this
.
props
.
user
.
hasError
,
this
.
state
.
userHasError
);
if
(
this
.
props
.
user
.
hasError
!==
this
.
state
.
userHasError
)
{
const
uid
=
user
&&
user
.
data
&&
user
.
data
.
uid
;
this
.
setState
({
isLogin
:
!
uid
?
false
:
true
,
userHasError
:
user
.
hasError
})
}
}
// 获取app登录数据
loginInfo
=
(
result
)
=>
{
...
...
@@ -206,7 +194,6 @@ class BlessingPreheat extends Component {
}
fetchUserBlessing
()
{
// 判断登录未登录 根据this.state.isLogin
Toast
.
info
(
'fetchUserBlessing'
,
2
)
const
{
userInfo
}
=
this
.
state
;
...
...
@@ -254,7 +241,9 @@ class BlessingPreheat extends Component {
handleToShow
=
(
key
,
isLogin
=
false
)
=>
{
// 需要用户登录 并且用户未登录
if
(
isLogin
&&
!
this
.
state
.
isLogin
)
{
const
isLoginnew
=
!
this
.
props
.
user
.
hasError
if
(
isLogin
&&
isLoginnew
)
{
this
.
toLogin
()
}
else
{
let
obj
=
{}
...
...
@@ -267,7 +256,7 @@ class BlessingPreheat extends Component {
// 邀请好友注册
handleToShowInvite
=
()
=>
{
const
{
isLogin
}
=
this
.
state
;
const
isLogin
=
!
this
.
props
.
user
.
hasError
if
(
isLogin
)
{
if
(
!
getParam
(
'version'
))
{
QRCode
.
toDataURL
(
`
${
API
.
m
}
/invite`
,
{
...
...
@@ -391,7 +380,6 @@ class BlessingPreheat extends Component {
const
{
navs
,
userInfo
,
isLogin
,
isRule
,
isCourse
,
inviteUrl
,
...
...
@@ -405,6 +393,7 @@ class BlessingPreheat extends Component {
index
}
=
this
.
state
;
const
{
history
}
=
this
.
props
;
const
isLogin
=
!
this
.
props
.
user
.
hasError
return
(
<
div
id
=
{
'blessing-preheat'
}
>
<
Banner
...
...
src/components/blessingPreheat/luckDraw/index.js
View file @
94a1c322
...
...
@@ -37,9 +37,9 @@ class LuckDraw extends Component {
const
{
tabs
,
prizes
}
=
this
.
state
;
return
(
<
div
className
=
"luck-draw__container"
>
<
Tabs
<
Tabs
swipeable
=
{
false
}
tabs
=
{
tabs
}
tabBarBackgroundColor
=
"transparent"
tabBarBackgroundColor
=
"transparent"
tabBarUnderlineStyle
=
{{
display
:
'none'
}}
...
...
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