Selaa lähdekoodia

刷新跳转登录bug

zhouna 5 vuotta sitten
vanhempi
commit
7faee45df4
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      src/components/MainPage.vue

+ 1 - 1
src/components/MainPage.vue

@@ -155,7 +155,7 @@ export default {
     //const userInfo= JSON.parse(localStorage.getItem("userInfo"))
     const userInfo = this.$store.state.pathInfo;
     if(!userInfo.hospitalCode){    //用户数据丢失,刷新或本页面分享时,跳回登录页
-      const code = JSON.parse(localStorage.getItem("infoParam"));
+      const code = JSON.parse(localStorage.getItem("infoParam"))||JSON.parse(localStorage.getItem("loginParam"));
       this.noAllowed=true;
       this.$router.push({
         path:'/?hospitalCode='+code.hospitalCode