mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-12 12:26:44 +08:00
弹出窗口控制修改
This commit is contained in:
@@ -29,6 +29,7 @@
|
|||||||
baseUrl:process.env.VUE_APP_FILE_BASE_URL,
|
baseUrl:process.env.VUE_APP_FILE_BASE_URL,
|
||||||
popupList:[],//需要弹出的窗口
|
popupList:[],//需要弹出的窗口
|
||||||
sessionKey:'alertpopup',
|
sessionKey:'alertpopup',
|
||||||
|
localTimesKey:'popuptimes'
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -84,12 +85,25 @@
|
|||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
countPopup(){
|
countPopup(){
|
||||||
// let newLogin = localStorage.getItem(this.$xpage.constants.newLoginKey);
|
//let newLogin = localStorage.getItem(this.$xpage.constants.newLoginKey);
|
||||||
// this.popupList.forEach(item=>{
|
this.popupList.forEach(item=>{
|
||||||
// if(item.loginEd && newLogin && newLogin==1){
|
//次数检查
|
||||||
|
if(item.times>0){
|
||||||
|
var localKey=this.localTimesKey+item.id;
|
||||||
|
var curLocal=localStorage.getItem(localKey);
|
||||||
|
if(curLocal){
|
||||||
|
let times=parseInt(curLocal);
|
||||||
|
if(item.times< times){
|
||||||
|
item.show=false;
|
||||||
|
}else{
|
||||||
|
localStorage.setItem(localKey,curLocal+1);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
localStorage.setItem(localKey,1);
|
||||||
|
}
|
||||||
|
|
||||||
// }
|
}
|
||||||
// })
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user