Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

优化部分功能 #135

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/itemcontainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ export default {
}
.item_title{
font-size: 0.65rem;
color: #00e;
color: #FFFFFF;
line-height: 0.7rem;
}
.item_list{
Expand All @@ -173,7 +173,7 @@ export default {
span{
display: inline-block;
font-size: 0.6rem;
color: #00e;
color: #FFFFFF;
vertical-align: middle;
}
.option_style{
Expand Down
Binary file added src/images/4-5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 25 additions & 10 deletions src/page/score/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
<header class="your_scores"><span class="score_num">{{score}}</span><span class="fenshu">分!</span></header>
<div class="result_tip">{{scoreTips}}</div>
</div>
<div class="share_button" @click="showCover"></div>
<div class="button_container">
<span class="share_button" @click="showCover"></span>
<router-link to="/" class="restart_button"></router-link>
</div>
<div class="share_code">
<header class="share_header">关注葡萄之家,获取答案。</header>
<img src="../../images/4-4.png" height="212" width="212" class="code_img">
Expand All @@ -28,7 +31,7 @@ export default {
scoreTipsArr:['你说,是不是把知识都还给小学老师了?','还不错,但还需要继续加油哦!','不要嘚瑟还有进步的空间!','智商离爆表只差一步了!','你也太聪明啦,葡萄之家欢迎你!'],
}
},
computed: mapState(['answerid']),
computed: mapState(['answerid', 'allTime']),
created(){
this.computedScore();
this.getScoreTip();
Expand All @@ -47,10 +50,12 @@ export default {
showCover: function (){
this.showHide = !this.showHide;
},
//根据分数显示提示
//根据分数、时间显示提示
getScoreTip: function (){
let index = Math.ceil(this.score/20)-1;
this.scoreTips = this.scoreTipsArr[index];
let scoreTips = this.scoreTipsArr[index];
let timeTips = " 您一共用时 " + this.allTime + " 秒";
this.scoreTips = scoreTips + timeTips;
}
},
}
Expand Down Expand Up @@ -96,12 +101,22 @@ export default {
text-align: center;
}
}
.share_button{
width: 6.025rem;
height: 2.4rem;
margin: 0.8rem auto 0;
background: url(../../images/4-3.png) no-repeat 0.4rem 0;
background-size: 5.825rem 100%;
.button_container{
text-align: center;
.share_button{
width: 6.025rem;
height: 2.4rem;
background: url(../../images/4-3.png) no-repeat 0.4rem 0;
background-size: 5.825rem 100%;
display: inline-block;
}
.restart_button{
width: 6.025rem;
height: 2.1rem;
background: url(../../images/4-5.png) no-repeat 0.4rem 0;
background-size: 5.825rem 100%;
display: inline-block;
}
}
.share_code{
width: 5.3rem;
Expand Down