Commit 2ee51c29 by FE

split and bind address quesition

parent fe650fa4
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -16,7 +16,6 @@ class SplitSuccess extends Component {
http.post(`${API.home}/sys/split_treasure`, params).then(res => {
const { code, data } = res.data;
if(code === 200) {
debugger;
successSplitTreasure(data);
if(data.bind_phone) {
setTimeout(() => {
......@@ -24,7 +23,7 @@ class SplitSuccess extends Component {
}, 500);
}else if(data.bind_address) {
setTimeout(() => {
handleToBindAddress(data.id);
handleToBindAddress(data.id, data.prize_name);
}, 500);
}
}else if(code === 12000) {
......
......@@ -162,7 +162,7 @@ class MyTreasure extends Component {
}, 500)
} else if (data.bind_address) {
setTimeout(() => {
this.handleToBindAddress(data.id)
this.handleToBindAddress(data.id, data.prize_name)
}, 500)
}
} else if (code === 12000) {
......@@ -218,8 +218,13 @@ class MyTreasure extends Component {
}
// 绑定地址--展示
handleToBindAddress = (id) => {
handleToBindAddress = (id, prizeName = '') => {
if (id) {
if(prizeName) {
this.setState({
prizeName
})
}else {
const {teams} = this.state
const data = teams.filter(item => item.id == id)
if (data.length > 0) {
......@@ -228,6 +233,7 @@ class MyTreasure extends Component {
})
}
}
}
this.setState({
isAddress: true
})
......@@ -446,24 +452,24 @@ class MyTreasure extends Component {
return (
<div data-skip="treasure">
{(!browser.isAndroidApp && !browser.isIOSApp) && <HeaderBar title="我的宝箱" arrow={true}/>}
<div className="team-empty">
{
isEnd &&
<div className="team-empty">
<p className="activity-end__desc">
活动已结束<br/>
{seconds}s后将自动返回首页
</p>
</div>
}
{
(!isEnd && isEmpty) &&
<>
<div className="team-empty">
<i className="team-empty__icon"></i>
<p className="team-empty__desc">您当前还没有宝箱哦~</p>
<p className="team-empty__desc">快去组队邀请好友一起开宝箱吧!</p>
<button className="team-empty__button" onClick={this.toOrganizeTeam}>组队开宝箱</button>
</>
}
</div>
}
{
(!isEnd && !isEmpty && userInfo.uid) &&
<div className="treasure-content">
......
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