Commit a6579647 by xuzhenghua

bug

parent b0aed643
......@@ -3,6 +3,7 @@ import { debounce, groupBy, isEmpty } from "lodash";
import { http } from "@/utils"
import { Toast, Carousel } from "antd-mobile";
import { Link } from "react-router-dom";
import {logout} from '@/store/userAction'
import { connect } from "react-redux";
import './index.scss'
import { Popup } from "@common/index"
......@@ -93,6 +94,7 @@ class Anniversary2020 extends Component {
isShowUserAddress: false,
isShowPrizesRecords: false,
isWinPrize: false, //抽中奖品弹框
isReLogin: true,
isShowTeamMember: false,
isShowFollow: false,
//抽奖
......@@ -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() {
const {
navs,
......@@ -570,6 +586,7 @@ class Anniversary2020 extends Component {
isShowPrizesRecords,
prizeRecords,
isWinPrize,
isReLogin,
drawingItemId,
drawResult,
isShowTeamMember,
......@@ -1227,13 +1244,16 @@ class Anniversary2020 extends Component {
</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({
isWinPrize: false,
drawResult: {},
isReLogin: false,
});
}}></WinPrize>
}}></ReLogin>
}
{
isShowTeamMember && <TeamMember members={team.team_info} uid={user.data.uid} close={() => {
this.setState({
......@@ -1263,6 +1283,7 @@ class Anniversary2020 extends Component {
}
}
function WinPrize({name, close, info}) {
return <div className={'modal-cover'}>
<div className="modal win-prize">
......@@ -1274,6 +1295,22 @@ function WinPrize({name, close, info}) {
</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}) {
const _members = Array.isArray(members) && members.filter(item => item.uid != uid)
const statusText = ['回答错误', '回答正确', '未作答']
......@@ -1307,4 +1344,5 @@ export default connect(
dispatch => ({
addData: data => dispatch(addData(data)),
}),
)(Anniversary2020);
\ No newline at end of file
......@@ -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 {
ul {
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