Files
learning-system-portal/src/components/AlertPopup.vue
2022-12-23 17:38:51 +08:00

91 lines
2.1 KiB
Vue

<template>
<!--弹出窗口设置-->
<div>
<el-dialog :close-on-press-escape="false" :close-on-click-modal="false" class="medalbox" top="10vh" :visible.sync="showGonggao" :append-to-body="true" >
<div style="text-align: center;position: relative;">
<el-image :src="`${webBaseUrl}/images/gonggao/dlg202212.png`"></el-image>
<div>
<span class="dlg-close" @click="showGonggao = false"><i style="font-size: 28px;color: #ffff;" class="el-icon-close"></i></span>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
export default{
props:{
},
data() {
return {
showGonggao:false,
sessionKey:'alertpopup1',
};
},
mounted() {
let hasFlag = localStorage.getItem(this.sessionKey);
if(!hasFlag){
let now=new Date();
let max=new Date(2022,12,28,0,0,0);
if(now.getTime()<max.getTime()){
this.showGonggao=true;
localStorage.setItem(this.sessionKey,'1');
}
}
}
}
</script>
<style scoped lang="scss">
.dlg-box{
text-align: center;
margin: 0 auto;
//background: transparent !important;
padding:120px 60px 20px 50px;
}
.dlg-title{
color: #333333;
font-size: 26px;
padding: 30px 0px;
text-align: center;
font-weight: 600;
}
.dlg-content{
color: #333333;font-size: 18px;height: 150px;
}
.dlg-button{
border-radius: 22px;
display: inline-block;
font-size: 18px;
padding: 10px;
width: 300px;
height: 46px;
text-align: center;
color: #fff;
}
.dlg-close{
padding: 20px 10px 10px 10px;
border: 1px solid #cccccc;
border-radius: 50%;
cursor: pointer;
}
.medalbox {
::v-deep .el-dialog{
background: transparent !important;
box-shadow:none !important;
.el-dialog__header{
display: none !important;
}
.el-dialog__body{
// width: 320px !important;
// height: 420px !important;
background: transparent !important;
}
}
}
</style>