提交加的弹窗

This commit is contained in:
daihh
2022-12-30 19:52:53 +08:00
parent 641a765536
commit 7885c20f4e
8 changed files with 113 additions and 7 deletions

View 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>