Commit bc477a24 authored by 天马流星拳's avatar 天马流星拳

fix: 修复活动结束判断和排行榜展示逻辑

修复分享页活动结束判断条件,增加错误码900002的情况处理
重构首页排行榜展示逻辑,优先判断productEnd状态
parent 00d46f39
......@@ -48,19 +48,28 @@ class HomePage extends React.Component<any, any> {
async componentDidMount() {
await store.updateIndex()
const { canJoinCurrentRank } = store.indexData
// canJoinCurrentRank true-可以参与当前月度排行榜
if(canJoinCurrentRank){
this.setState({
rankingTab: 0,
})
this.getQueryRankInfo(0)
} else{
const { canJoinCurrentRank, productEnd } = store.indexData
// canJoinCurrentRank true-可以参与当前月度排行榜
// productEnd 理财到达终点,true-是 定位到总榜
if(productEnd){
this.setState({
rankingTab: 1,
})
this.getQueryRankInfo(1);
} else{
if(canJoinCurrentRank){
this.setState({
rankingTab: 0,
})
this.getQueryRankInfo(0)
} else{
this.setState({
rankingTab: 1,
})
this.getQueryRankInfo(1);
}
}
// 分享页
// PageCtrl.changePage(SharePage)
......
......@@ -71,7 +71,7 @@ class SharePage extends React.Component {
btn: 2
})
} else {
if (code === '20002') {
if (code === '20002' || code === '900002') {
Toast.show('活动已结束,感谢您的关注~')
} else {
switch (code) {
......
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