Merge branch 'master' of codeup.aliyun.com:6265f483e4166464dc2f9c14/boeu/portal

This commit is contained in:
dongruihua
2022-12-26 11:48:01 +08:00
4 changed files with 20 additions and 73 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 KiB

View File

@@ -1,15 +1,12 @@
<template> <template>
<!--弹出窗口设置--> <!--弹出窗口设置-->
<div> <div>
<el-dialog :close-on-press-escape="false" :close-on-click-modal="false" class="medalbox" :visible.sync="showGonggao" :append-to-body="true" > <el-dialog :close-on-press-escape="false" :close-on-click-modal="false" class="medalbox" top="10vh" :visible.sync="showGonggao" :append-to-body="true" >
<div class="dlg-box" :style="`width:${config.width};height:${config.height}; background: url(${webBaseUrl}/images/gonggao/${config.bgImage}.png) no-repeat;`"> <div style="text-align: center;position: relative;">
<span class="dlg-close" @click="showGonggao = false"><i style="font-size: 28px;color: #999;" class="el-icon-close"></i></span> <el-image :src="`${webBaseUrl}/images/gonggao/dlg202212.png`"></el-image>
<div style="text-align:left;"> <div>
<div class="dlg-title" v-html="config.title"></div> <span class="dlg-close" @click="showGonggao = false"><i style="font-size: 28px;color: #ffff;" class="el-icon-close"></i></span>
<div class="dlg-content" v-html="config.content"></div>
</div> </div>
<div v-if="config.btnText"><a :href="config.pcUrl" @click="showGonggao = false" target="_blank" :style="{'background-color':config.btnColor}" class="dlg-button">{{config.btnText}}</a> </div>
<div v-if="config.author" style="text-align: right;padding-top: 20px;"><span>{{config.author}}</span> </div>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
@@ -18,58 +15,24 @@
<script> <script>
export default{ export default{
props:{ props:{
config: {
type:Object,
default(){
return{
id:'',//数据id
closeable:false,//不可以关闭
width:'500px',//宽度
height:'500px',
title:'公告',//标题
content:'',//文字内容
bgImage:'dlg_bg',//背景图
pcUrl:'',//点击后打开的地址,最好是使用相对地址
h5Url:'',
btnText:'立即参与',//
btnColor:'#008BFF',
author:'',
type:0,//0表不控制
}
}
},
}, },
data() { data() {
return { return {
showGonggao:false, showGonggao:false,
sessionKey:'alertpopup', sessionKey:'alertpopup1',
}; };
}, },
mounted() { mounted() {
let loadNum = localStorage.getItem(this.sessionKey); let hasFlag = localStorage.getItem(this.sessionKey);
let hasFlag = sessionStorage.getItem(this.sessionKey);
let $this=this;
if(!hasFlag){ if(!hasFlag){
let times=0;
if(loadNum){
times=Number(loadNum);
}
if(times<3){
let now=new Date(); let now=new Date();
let min=new Date(2022,10,9,0,0,0); let max=new Date(2022,12,28,0,0,0);
let max=new Date(2022,11,1,0,0,0); if(now.getTime()<max.getTime()){
//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; this.showGonggao=true;
times++; localStorage.setItem(this.sessionKey,'1');
localStorage.setItem(this.sessionKey,times);
sessionStorage.setItem(this.sessionKey,1);
} }
} }
}
} }
} }
</script> </script>
@@ -104,8 +67,9 @@
} }
.dlg-close{ .dlg-close{
float: right; padding: 20px 10px 10px 10px;
margin-top: -90px; border: 1px solid #cccccc;
border-radius: 50%;
cursor: pointer; cursor: pointer;
} }
.medalbox { .medalbox {

View File

@@ -124,7 +124,7 @@
</div> </div>
</div> </div>
</div> </div>
<popup v-if="popupConfig.id" :config="popupConfig"></popup> <popup></popup>
</div> </div>
</template> </template>
<script> <script>
@@ -181,26 +181,8 @@ export default {
this.sex = this.userInfo.sex; this.sex = this.userInfo.sex;
this.$store.dispatch('refrashMsg'); this.$store.dispatch('refrashMsg');
this.loadBoeData(); this.loadBoeData();
this.loadPopupConfig();
}, },
methods: { methods: {
loadPopupConfig(){
this.popupConfig={
id:'123',//数据id
closeable:false,//不可以关闭
width:'472px',//宽度
height:'500px',
title:'用户体验调研',//标题
content:'<div style="font-size:20px;font-weight: 600;padding-bottom:10px;">亲爱的校友:</div><div> 诚邀您对11月4日上线的学习平台V2.0的使用体验进行测评,我们将以您的意见反馈为输入,不断的优化和改进。</div>',//文字内容
bgImage:'dlg_bg_pen',//背景图
pcUrl:'https://boehrsurvey.wjx.cn/vm/O5XcWrk.aspx',//点击后打开的地址,最好是使用相对地址
h5Url:'',
btnText:'立即参与',//
btnColor:'#008BFF',
author:'BOEU学习平台产品团队',
type:0,//0表不控制
}
},
setCurIdentity(iden){ setCurIdentity(iden){
this.$store.dispatch('SetCurIdentity',iden); this.$store.dispatch('SetCurIdentity',iden);
}, },

View File

@@ -267,7 +267,8 @@ export default {
data() { data() {
return { return {
resOwnerListMap: [], resOwnerListMap: [],
fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL, //fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
fileBaseUrl:this.$xpage.constants.fileBaseUrl, //获成动态获取的处理
getType: getType, getType: getType,
loading: false, loading: false,
defaultProps: { defaultProps: {