Commit da7eb068 by xuzhenghua

bug

parent 399c2cfb
......@@ -130,7 +130,7 @@ class FormalDraw extends Component {
lotteryFunc = (status, id) => {
const {hasError} = this.props.user
if (hasError) {
if (hasError && status != 4) {
this.props.toLogin()
return
}
......@@ -138,6 +138,8 @@ class FormalDraw extends Component {
this.draw(id)
} else if (status == 2) {
this.subscribe(id)
} else if (status == 4) {
location.href = `/prize-winner-list?tid=${id}`
}
}
......
......@@ -421,41 +421,47 @@ class BlessingPreheat extends Component {
}
getMyPrizeRecord = () => {
http.get(`${API.home}/sys/activity/my_lotteries`)
.then(res => {
const {code, data, msg} = res.data
if (code == 200) {
this.recordInstance = Popup({
title: '我的中奖纪录',
className: 'prize-record-popup',
content: (
<div className={'record-container'}>
<div className="list-title">
<div>时间</div>
<div>奖品名称</div>
</div>
<ul>
{
Array.isArray(data)
? data.map((item, index) => {
return (
<li key={index}>
<div className="time">{item.time}</div>
<div className="name"
onClick={this.showAddressPopup.bind(this, item['is_virtual'], item.prize)}>{item.prize}</div>
</li>
)
})
: <li style={{justifyContent: 'center'}}>暂无中奖纪录</li>
}
</ul>
</div>
)
const isLoginnew = !this.props.user.hasError
const {history} = this.props
if (!isLoginnew) {
history.push('/passport')
}else{
http.get(`${API.home}/sys/activity/my_lotteries`)
.then(res => {
const {code, data, msg} = res.data
if (code == 200) {
this.recordInstance = Popup({
title: '我的中奖纪录',
className: 'prize-record-popup',
content: (
<div className={'record-container'}>
<div className="list-title">
<div>时间</div>
<div>奖品名称</div>
</div>
<ul>
{
Array.isArray(data)
? data.map((item, index) => {
return (
<li key={index}>
<div className="time">{item.time}</div>
<div className="name"
onClick={this.showAddressPopup.bind(this, item['is_virtual'], item.prize)}>{item.prize}</div>
</li>
)
})
: <li style={{justifyContent: 'center'}}>暂无中奖纪录</li>
}
</ul>
</div>
)
})
} else {
Toast.info(msg, 2, null, false)
}
})
} else {
Toast.info(msg, 2, null, false)
}
})
}
}
submitAddress = debounce(() => {
......
......@@ -124,7 +124,8 @@ class Live extends Component {
})
}
})
} else {
} else if(data.errno == 4030 || data.errno == 4040){
}else {
Toast.info(data.msg, 2, null, false)
}
})
......
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