Commit 34a2e8dd by FE

Merge branch '00-formal' into pre

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