Commit 6c118570 by wangshuo

Merge branch '11-11-formal' into dev

parents 9ab88978 3dd04d46
...@@ -27,17 +27,25 @@ class BlessingGetPrize extends Component { ...@@ -27,17 +27,25 @@ class BlessingGetPrize extends Component {
} }
componentDidMount () { componentDidMount () {
http.get(`${API.home}/sys/lottery_result?id=${getParam('id')}`).then(res => { const _this = this;
const {code, msg, data} = res.data; setTimeout(function(){
if(code === 200) { const {history, uid} = _this.props;
this.setState({ if(!uid) {
...data.info, history.push('/passport')
prize_data: data.prize_data.slice(0, 6), }else{
}) http.get(`${API.home}/sys/lottery_result?id=${getParam('id')}`).then(res => {
} else { const {code, msg, data} = res.data;
Toast.info(msg); if(code === 200) {
_this.setState({
...data.info,
prize_data: data.prize_data.slice(0, 6),
})
} else {
Toast.info(msg);
}
});
} }
}); }, 100);
} }
showAddress = (bool) => { showAddress = (bool) => {
......
...@@ -33,10 +33,10 @@ class FormalDraw extends Component { ...@@ -33,10 +33,10 @@ class FormalDraw extends Component {
http.get(`${API.home}/sys/activity/prize_data`) http.get(`${API.home}/sys/activity/prize_data`)
.then(res => { .then(res => {
const {data, code, msg} = res.data const {data, code, msg} = res.data
const oneDay = data.list.filter(item => item.date === data.value.today)
const activeIndex = oneDay[0]['son'].findIndex(item => item.status == 3)
if (code == 200) { if (code == 200) {
const {today} = data.value const {today} = data.value
const oneDay = data.list.filter(item => item.date === data.value.today)
const activeIndex = oneDay[0]['son'].findIndex(item => item.status == 3)
this.setState({ this.setState({
tabs: data.list.map(item => ({title: item.date})), tabs: data.list.map(item => ({title: item.date})),
today, today,
......
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