Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
clearLoginStatus(){
//删掉 cookie 中存的 token 和 userId
CookieUtils.removeCookie("token");
CookieUtils.removeCookie("userId");
//清除 vuex 中的用户信息
this.$store.commit("setUserInfo", {});
this.isLogin = false;
Message.info("已安全退出")
}
clearLoginStatus(){
//删掉 cookie 中存的 token 和 userId
CookieUtils.removeCookie("token");
CookieUtils.removeCookie("userId");
//清除 vuex 中的用户信息
this.$store.commit("setUserInfo", {});
this.isLogin = false;
Message.info("已安全退出")
}
toast : function(message,type){
let option = {
'message' : message,
'duration' : 2200
};
if(type == 'error'){
Message.error(option)
}
else if (type == "success"){
Message.success(option);
}
else if (type == "warning"){
Message.warning(option);
}
else{
Message.info(option);
}
},
showTreeError(error){
Message.info(error.message);
}
}
let option = {
showClose: true,
message: message,
offset: 60
}
if (!isEmpty(type)) {
option.type = type
}
if (type === 'success') {
Message.success(option)
} else if (type === 'warning') {
Message.warning(option)
} else if (type === 'error') {
Message.error(option)
} else {
Message.info(option)
}
}
function showUnderDevelopmentMessage () {
Message.info(i18n.t('app.under-development-message'))
}