Procházet zdrojové kódy

新增undefined 判断

zhulu před 10 měsíci
rodič
revize
fe22354800
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      src/store/modules/user.js

+ 1 - 1
src/store/modules/user.js

@@ -12,7 +12,7 @@ const state = {
   //机构类型
   orgType:JSON.parse(sessionStorage.getItem("SET_USER_ORGTYPE"))||null,
 
-  subUserList:JSON.parse(sessionStorage.getItem("SET_USER_SUBUSERLIST"))||[],
+  subUserList:(sessionStorage.getItem("SET_USER_SUBUSERLIST")!='' && sessionStorage.getItem("SET_USER_SUBUSERLIST")!=null && sessionStorage.getItem("SET_USER_SUBUSERLIST")!='undefined') ? JSON.parse(sessionStorage.getItem("SET_USER_SUBUSERLIST"))||[]:[],
 
   //主用户用户名
   masterUserName: JSON.parse(sessionStorage.getItem("SET_MASTER_USER_NAME"))||null,