mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-22 09:16:44 +08:00
提交加的弹窗
This commit is contained in:
78
src/components/Popup/Medal2023.vue
Normal file
78
src/components/Popup/Medal2023.vue
Normal file
@@ -0,0 +1,78 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog :close-on-press-escape="false" :close-on-click-modal="false" class="medalbox" :visible.sync="show" :append-to-body="true" >
|
||||
<div style="text-align: center;position: relative;">
|
||||
<el-image :src="`${webBaseUrl}/images/medal/20230101.png`"></el-image>
|
||||
<div class="dlg-boot">
|
||||
<span class="dlg-close" @click="show = false"><i style="font-size: 28px;color: #999;" class="el-icon-close"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import apiYearMedal from '@/api/phase2/yearMedal.js';
|
||||
export default{
|
||||
data() {
|
||||
return {
|
||||
show:false,
|
||||
baseUrl:process.env.VUE_APP_FILE_BASE_URL
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
||||
let now=new Date();
|
||||
let min=new Date(2023,1,1,0,0,0);
|
||||
let max=new Date(2023,1,15,0,0,0);
|
||||
//console.log(now,min,max);
|
||||
//console.log(now.getTime(),min.getTime(),max.getTime());
|
||||
if(now.getTime()>min.getTime() && now.getTime()<max.getTime()){
|
||||
//console.log('open')
|
||||
apiYearMedal.has2023().then(rs=>{
|
||||
if(rs.status==200){
|
||||
if(!rs.result){
|
||||
this.show=true;
|
||||
apiYearMedal.save2023();
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.dlg-boot{
|
||||
height: 50px;
|
||||
margin-top: 30px;
|
||||
}
|
||||
.dlg-close{
|
||||
//float: right;
|
||||
//margin-top: -90px;
|
||||
border: 1px solid #cccccc;
|
||||
border-radius: 50%;
|
||||
|
||||
padding: 20px 10px 10px 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.jinian-medal-img{
|
||||
text-align: center;
|
||||
padding-top: 10px;
|
||||
}
|
||||
.medalbox {
|
||||
background: transparent !important;
|
||||
::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>
|
||||
Reference in New Issue
Block a user