Index updated

This commit is contained in:
Vion
2022-01-17 16:14:32 +08:00
parent 5c5b50b7ea
commit 847e27bc4a
5 changed files with 252 additions and 177 deletions

View File

@@ -379,17 +379,19 @@
</div>
</template>
<script>
const isReload={
needload:false
};
export default {
data() {
return {
headerScroll:false,
loginornot:true,//用户是否登录提示点
usermessage:null,//存储用户信息
headerScroll:false,
loginornot:true,//用户是否登录提示点
usermessage:null,//存储用户信息
};
},
created(){
},
mounted() {
//判断用户有无登录显示红点
let usernot=JSON.parse(localStorage.getItem("userInfo"));
@@ -401,11 +403,45 @@ export default {
this.loginornot=false
this.usermessage=usernot;
}
//debugger;
if(isReload.needload)
location.reload();
if(isReload.needload==false)
isReload.needload=true;
//console.log(this.loginornot);
/*
if(RCDL && RCDL.utilities && RCDL.navigation && RCDL.navigation.rebuild)
{
if (["sm", "xs", "md-1"].includes(RCDL.utilities.breakpoints.values.width.current)) {
this.refreshMobileNav();
}
else
{
this.refreshDesktopNav();
}
}
*/
},
methods: {
refreshDesktopNav:function(){
RCDL.navigation.currentState=null;
RCDL.navigation.rebuild();
},
refreshMobileNav:function(){
let itemGroupList=document.querySelectorAll("nav[data-toggle-group=mobile] .rc-list--align[role=menu]");
itemGroupList.forEach(function(ele,i){
if(ele.className.indexOf("rc-expand--horizontal")<0 && ele.className.indexOf("rc-btn-offset--top")<0)
{
if(ele.id.indexOf("nav-list")>=0)
ele.classList.add("rc-expand--horizontal");
else if(ele.id.indexOf("nav-footer")>=0)
ele.classList.add("rc-expand--vertical");
}
})
},
bindTracking: function(){
//console.log('bindTracking');
},