增加公告弹窗

This commit is contained in:
daihh
2022-11-07 17:22:11 +08:00
parent ee7b98e2e9
commit 26600d5376

View File

@@ -0,0 +1,68 @@
<template>
<view>
<u-overlay :show="showGonggao">
<view class="warp">
<view class="gonggao">
<view class="gonggao-title">最新公告</view>
<view class="gonggao-text">
为了保障信息安全为您提供更优质的服务学习平台计划在2022年11月9日0点-11月9日早6点进行服务器升级
在此期间您无法登录学习给您带来不便还请谅解感谢您的理解与支持
</view>
</view>
</view>
</u-overlay>
</view>
</template>
<script>
export default {
data(){
return {
showGonggao:false
}
},
mounted() {
let now=new Date();
let min=new Date(2022,10,7,0,0,0);
let max=new Date(2022,10,9,6,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')
this.showGonggao=true;
}
}
}
</script>
<style scoped lang="scss">
.warp {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
.gonggao{
background: url("/mobile/static/images/gonggao/dlg_bg.png") no-repeat;
background-size: cover;
width:471upx;
height:495upx;
padding: 40upx;
}
.gonggao-title{
color: #333333;
font-size: 32upx;
margin-top: 190upx;
padding: 10upx 0px;
text-align: center;
font-weight: 900;
font-family: PingFangSC-Regular, sans-serif;
}
.gonggao-text{
color: #333333;
font-size: 22upx;
line-height: 35upx;
padding: 10upx 20upx;
}
</style>