mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-09 02:46:44 +08:00
增加春节勋章
This commit is contained in:
74
src/components/Popup/China2023.vue
Normal file
74
src/components/Popup/China2023.vue
Normal file
@@ -0,0 +1,74 @@
|
||||
<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/china2023.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>
|
||||
export default{
|
||||
data() {
|
||||
return {
|
||||
show:false,
|
||||
baseUrl:process.env.VUE_APP_FILE_BASE_URL,
|
||||
localKey:'local-china-2023'
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
let now=new Date();
|
||||
let min=new Date(2022,11,1,0,0,0);
|
||||
let max=new Date(2023,2,5,0,0,0);
|
||||
//console.log(now,min,max);
|
||||
//console.log(now.getTime(),min.getTime(),max.getTime());
|
||||
if(now.getTime()<max.getTime()){
|
||||
//console.log('open')
|
||||
var localData=localStorage.getItem(this.localKey);
|
||||
if(!localData){
|
||||
this.show=true;
|
||||
var localData=localStorage.setItem(this.localKey,'has');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</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>
|
||||
@@ -131,7 +131,7 @@
|
||||
import { mapGetters, mapActions } from 'vuex';
|
||||
import apiMessage from '@/api/system/message.js';
|
||||
import popup from '@/components/AlertPopup.vue';
|
||||
import yearMedal from '@/components/Popup/Medal2023.vue';
|
||||
import yearMedal from '@/components/Popup/China2023.vue';
|
||||
import apiBoeCourse from '@/api/boe/course.js';
|
||||
import {userAvatarText} from "@/utils/tools.js";
|
||||
export default {
|
||||
|
||||
@@ -27,6 +27,11 @@
|
||||
<p class="index-title" style="padding-top: 10px;">元旦勋章</p>
|
||||
<!-- <p class="index-text">您已超过{{item.exceed}}人</p> -->
|
||||
</div>
|
||||
<div class="medal-index">
|
||||
<img style="width:138px;height:151px" :src="`${webBaseUrl}/images/medal/china2023m.png`" alt="">
|
||||
<p class="index-title" style="padding-top: 10px;">春节勋章</p>
|
||||
<!-- <p class="index-text">您已超过{{item.exceed}}人</p> -->
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="home-no-list">
|
||||
<img class="img" style="width:360px;height:226px" :src="`${webBaseUrl}/images/homeWu/no-madel.png`" alt="" srcset="">
|
||||
|
||||
@@ -438,8 +438,6 @@
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
// this.teachform.expertise.forEach(item =>{
|
||||
// this.childData.forEach(it =>{
|
||||
// if(item == it.id){
|
||||
|
||||
Reference in New Issue
Block a user