Commit a6579647 by xuzhenghua

bug

parent b0aed643
...@@ -3,6 +3,7 @@ import { debounce, groupBy, isEmpty } from "lodash"; ...@@ -3,6 +3,7 @@ import { debounce, groupBy, isEmpty } from "lodash";
import { http } from "@/utils" import { http } from "@/utils"
import { Toast, Carousel } from "antd-mobile"; import { Toast, Carousel } from "antd-mobile";
import { Link } from "react-router-dom"; import { Link } from "react-router-dom";
import {logout} from '@/store/userAction'
import { connect } from "react-redux"; import { connect } from "react-redux";
import './index.scss' import './index.scss'
import { Popup } from "@common/index" import { Popup } from "@common/index"
...@@ -93,6 +94,7 @@ class Anniversary2020 extends Component { ...@@ -93,6 +94,7 @@ class Anniversary2020 extends Component {
isShowUserAddress: false, isShowUserAddress: false,
isShowPrizesRecords: false, isShowPrizesRecords: false,
isWinPrize: false, //抽中奖品弹框 isWinPrize: false, //抽中奖品弹框
isReLogin: true,
isShowTeamMember: false, isShowTeamMember: false,
isShowFollow: false, isShowFollow: false,
//抽奖 //抽奖
...@@ -551,6 +553,20 @@ class Anniversary2020 extends Component { ...@@ -551,6 +553,20 @@ class Anniversary2020 extends Component {
}); });
} }
winPrizeClose=() => {
this.setState({
isWinPrize: false,
drawResult: {},
isReLogin: true
});
}
reLogin=()=>{
console.log(2,this.props)
// this.props.logout()
// this.props.history.push('/passport')
}
render() { render() {
const { const {
navs, navs,
...@@ -570,6 +586,7 @@ class Anniversary2020 extends Component { ...@@ -570,6 +586,7 @@ class Anniversary2020 extends Component {
isShowPrizesRecords, isShowPrizesRecords,
prizeRecords, prizeRecords,
isWinPrize, isWinPrize,
isReLogin,
drawingItemId, drawingItemId,
drawResult, drawResult,
isShowTeamMember, isShowTeamMember,
...@@ -1227,13 +1244,16 @@ class Anniversary2020 extends Component { ...@@ -1227,13 +1244,16 @@ class Anniversary2020 extends Component {
</div> </div>
} }
{ {
isWinPrize && <WinPrize name={drawResult.prize_name} info={drawResult.prize_info} close={() => { isWinPrize && <WinPrize name={drawResult.prize_name} info={drawResult.prize_info} close={this.winPrizeClose}></WinPrize>
}
{
isReLogin && <ReLogin reLogin={this.reLogin} close={() => {
this.setState({ this.setState({
isWinPrize: false, isReLogin: false,
drawResult: {},
}); });
}}></WinPrize> }}></ReLogin>
} }
{ {
isShowTeamMember && <TeamMember members={team.team_info} uid={user.data.uid} close={() => { isShowTeamMember && <TeamMember members={team.team_info} uid={user.data.uid} close={() => {
this.setState({ this.setState({
...@@ -1263,6 +1283,7 @@ class Anniversary2020 extends Component { ...@@ -1263,6 +1283,7 @@ class Anniversary2020 extends Component {
} }
} }
function WinPrize({name, close, info}) { function WinPrize({name, close, info}) {
return <div className={'modal-cover'}> return <div className={'modal-cover'}>
<div className="modal win-prize"> <div className="modal win-prize">
...@@ -1274,6 +1295,22 @@ function WinPrize({name, close, info}) { ...@@ -1274,6 +1295,22 @@ function WinPrize({name, close, info}) {
</div> </div>
} }
function ReLogin({close,reLogin}) {
return <div className={'modal-cover'}>
<div className="modal re-login">
<div className="title">温馨提示</div>
<div className="des">为了您的账号安全,请尽快绑定手机号,以免影响奖品发放。</div>
<div className="contact">点击下方"重新登录”,<br/>
选择"微信授权登录",按提示绑定即可。</div>
<button onClick={reLogin}>重新登录</button>
<i className={'iconfont iconiconfront-2 close'} onClick={close}></i>
</div>
</div>
}
function TeamMember({members, close, uid}) { function TeamMember({members, close, uid}) {
const _members = Array.isArray(members) && members.filter(item => item.uid != uid) const _members = Array.isArray(members) && members.filter(item => item.uid != uid)
const statusText = ['回答错误', '回答正确', '未作答'] const statusText = ['回答错误', '回答正确', '未作答']
...@@ -1304,7 +1341,8 @@ function TeamMember({members, close, uid}) { ...@@ -1304,7 +1341,8 @@ function TeamMember({members, close, uid}) {
export default connect( export default connect(
({user}) => ({user}), ({user}) => ({user}),
dispatch => ({ dispatch => ({
addData: data => dispatch(addData(data)), addData: data => dispatch(addData(data)),
}), }),
)(Anniversary2020); )(Anniversary2020);
\ No newline at end of file
...@@ -1214,6 +1214,37 @@ ...@@ -1214,6 +1214,37 @@
} }
} }
.re-login {
padding: 20px!important;
.des {
text-align: justify;
font-size: 15px;
color: #545C64;
}
.contact {
margin-top: 15px;
font-size: 15px;
font-weight: 400;
color: #271BD3;
}
button {
width: 121px;
height: 33px;
transform: translateX(50%);
background: rgba(0, 153, 255, 1);
border-radius: 17px;
font-size: 15px;
color: #fff;
-webkit-appearance: none;
outline: 0;
border: 0;
margin-top: 10px;
}
}
.members { .members {
ul { ul {
max-height: 230px; max-height: 230px;
......
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