Commit 8145fb55 authored by 天马流星拳's avatar 天马流星拳

fix(AnswerPanel): 恢复注释的自动关闭和奖品展示逻辑

refactor(HomePage): 重构排名列表项的布局结构
将span-4改为flex布局并添加内部span元素,提高样式可维护性

test(mock): 恢复部分排名数据的mock数据
用于测试不同收益率情况下的显示效果
parent 08d28ed1
......@@ -320,27 +320,27 @@ export default [
score: 3318, //收益率
meFlag: false //是否是我,为true是
},
// {
// index: 3, //排名,null表示未上榜,前端判断大于等于100,展示99+
// userName:'136xxxx7894', // 用户名
// userId:1, //用户id
// score: null, //收益率
// meFlag: false //是否是我,为true是
// },
// {
// index: 4, //排名,null表示未上榜,前端判断大于等于100,展示99+
// userName:'136xxxx7894', // 用户名
// userId:1, //用户id
// score: 1318, //收益率
// meFlag: false //是否是我,为true是
// },
// {
// index: 5, //排名,null表示未上榜,前端判断大于等于100,展示99+
// userName:'136xxxx7894', // 用户名
// userId:1, //用户id
// score: 0, //收益率
// meFlag: false //是否是我,为true是
// },
{
index: 3, //排名,null表示未上榜,前端判断大于等于100,展示99+
userName:'136xxxx7894', // 用户名
userId:1, //用户id
score: null, //收益率
meFlag: false //是否是我,为true是
},
{
index: 4, //排名,null表示未上榜,前端判断大于等于100,展示99+
userName:'136xxxx7894', // 用户名
userId:1, //用户id
score: 1318, //收益率
meFlag: false //是否是我,为true是
},
{
index: 5, //排名,null表示未上榜,前端判断大于等于100,展示99+
userName:'136xxxx7894', // 用户名
userId:1, //用户id
score: 0, //收益率
meFlag: false //是否是我,为true是
},
// {
// index: 6, //排名,null表示未上榜,前端判断大于等于100,展示99+
// userName:'136xxxx7894', // 用户名
......
......@@ -363,10 +363,16 @@
width: 25%;
}
.span-4{
width: 136px;
height: 47px;
width: 25%;
.sparkBg("homePage/top-btn2.png");
display: flex;
align-items: center;
justify-content: center;
.span-4-1{
width: 136px;
height: 47px;
.sparkBg("homePage/top-btn2.png");
}
}
}
}
......@@ -396,10 +402,16 @@
width: 25%;
}
.span-4{
width: 136px;
height: 47px;
width: 25%;
.sparkBg("homePage/top-btn2.png");
width: 25%;
display: flex;
align-items: center;
justify-content: center;
.span-4-1{
width: 136px;
height: 47px;
.sparkBg("homePage/top-btn2.png");
}
}
}
}
......
......@@ -269,7 +269,9 @@ class HomePage extends React.Component<any, any> {
<span className='span-2'>{item.userName}</span>
{/* <span className='span-3'>+{item.score}%</span> */}
<span className='span-3'>{item.score != null ? (item.score > 0 ? `+${item.score}` : item.score) : '-'}%</span>
<span className='span-4' onClick={() => this.viewDistribution(item)}></span>
<span className='span-4' onClick={() => this.viewDistribution(item)}>
<span className='span-4-1'></span>
</span>
</div>
))
) : (
......@@ -284,7 +286,9 @@ class HomePage extends React.Component<any, any> {
<span className='span-2'>{myRank.userName}(我)</span>
{/* <span className='span-3'>+{myRank.score}%</span> */}
<span className='span-3'>{myRank.score != null ? (myRank.score > 0 ? `+${myRank.score}` : myRank.score) : '-'}%</span>
<span className='span-4' onClick={() => this.viewDistribution(myRank)}></span>
<span className='span-4' onClick={() => this.viewDistribution(myRank)}>
<span className='span-4-1'></span>
</span>
</div>
{/* 展开 */}
{
......
......@@ -72,10 +72,10 @@ class AnswerPanel extends React.Component {
startId: this.startId,
})
if (success) {
// setTimeout(() => {
// this.handleClose();
// ModalCtrl.showModal(AnswerPrizePanel, data.options[0] || {});
// }, 2000)
setTimeout(() => {
this.handleClose();
ModalCtrl.showModal(AnswerPrizePanel, data.options[0] || {});
}, 2000)
taskStore.queryTaskInfo();
store.updateIndex();
}
......
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