Commit 94a1c322 by xuzhenghua

pull

parent faf8ed50
......@@ -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
......
......@@ -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'
}}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment