Commit 34a2e8dd by FE

Merge branch '00-formal' into pre

parents cf65a3f5 1254ec29
......@@ -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) {
......
......@@ -163,7 +163,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) {
......@@ -219,8 +219,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) {
......@@ -229,6 +234,7 @@ class MyTreasure extends Component {
})
}
}
}
this.setState({
isAddress: true
})
......@@ -447,24 +453,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