Commit 105a10d2 by FE

Merge branch '00'

parents 25dcce8b b9631254
......@@ -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,14 +218,20 @@ class MyTreasure extends Component {
}
// 绑定地址--展示
handleToBindAddress = (id) => {
handleToBindAddress = (id, prizeName = '') => {
if (id) {
const {teams} = this.state
const data = teams.filter(item => item.id == id)
if (data.length > 0) {
if(prizeName) {
this.setState({
prizeName: data[0]['prize_name']
})
prizeName
});
}else {
const {teams} = this.state
const data = teams.filter(item => item.id == id)
if (data.length > 0) {
this.setState({
prizeName: data[0]['prize_name']
})
}
}
}
this.setState({
......
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