You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
< template >
< uni -popup
type = "center"
ref = "popup"
:maskClick ="false" >
< div class = "popup" >
< div class = "title" > 恭喜您 , 考试通过 ! < / div >
< div class = "score" > { { rate } } 分 < / div >
< image src = "../../static/images/my/my-medal-book-mini.png" > < / image >
< div class = "btn-warp flex-between" >
< button class = "flex-center" @click ="closePopup" > 确 定 < / button >
< button class = "flex-center" @click ="lookMedal" > 查 看 证 书 < / button >
< / div >
< / div >
< / uni -popup >
< / template >
< script >
export default {
props : {
rate : {
type : Number ,
default : ( ) => {
return 0
}
} ,
planId : {
type : String ,
default : ( ) => {
return ''
}
}
} ,
mounted ( ) {
this . openPopup ( )
} ,
methods : {
openPopup ( ) {
this . $refs . popup . open ( )
} ,
closePopup ( ) {
this . $emit ( 'close' , '' )
this . $refs . popup . close ( )
} ,
lookMedal ( ) {
this . $emit ( 'close' , '' )
this . $refs . popup . close ( )
uni . navigateTo ( {
url : '/pages/lookMedal/index?rate=' + this . rate + '&planId=' + this . planId
} ) ;
}
}
}
< / script >
< style lang = "scss" >
. popup {
width : 572 rpx ;
height : 610 rpx ;
background : url ( '../../static/images/study/exam-pass-bg.png' ) no - repeat center / cover ;
text - align : center ;
padding - top : 52 rpx ;
box - sizing : border - box ;
. title {
color : $uni - text - color ;
font - size : 30 rpx ;
}
. score {
color : $uni - text - color - active ;
font - weight : 500 ;
font - size : 44 rpx ;
margin : 20 rpx 0 48 rpx ;
}
> image {
width : 352 rpx ;
height : 248 rpx ;
}
. btn - warp {
margin : 40 rpx auto 0 ;
width : calc ( 100 % - 148 rpx ) ;
button {
flex - shrink : 0 ;
width : 192 rpx ;
height : 60 rpx ;
border - radius : 40 rpx ;
font - size : 28 rpx ;
padding : 0 ;
margin : 0 ;
& : first - of - type {
color : $uni - text - color - grey ;
background - color : $uni - bg - color - grey ;
}
& : last - of - type {
color : # fff ;
background - color : $uni - border - color ;
}
}
}
}
< / style >