|
@@ -156,3 +156,20 @@ export function getParenthesesStr(text) {
|
|
|
}
|
|
|
return result
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+/**清空缓存并退出*/
|
|
|
+export function userExit(obj) {
|
|
|
+ //localStorage.clear(); //清除登录信息
|
|
|
+ localStorage.setItem("ywtb_usercode", "");
|
|
|
+ localStorage.setItem("ywtb_username", "");
|
|
|
+ localStorage.setItem("ywtb_unitcode", "");
|
|
|
+ localStorage.setItem("ywtb_unitname", "");
|
|
|
+ localStorage.setItem("ywtb_password", "");
|
|
|
+ localStorage.setItem("ywtb_lasttime", "");
|
|
|
+ localStorage.setItem("ywtb_role", "");
|
|
|
+ localStorage.setItem("ywtb_userkeycode", "");
|
|
|
+ localStorage.setItem("tempConfigButtonMap", "");
|
|
|
+ obj.$router.push('/login');
|
|
|
+}
|