소스 검색

修改判断逻辑

lex-wxl 8 달 전
부모
커밋
776b74e10e
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 2
      src/store/modules/user.ts

+ 1 - 2
src/store/modules/user.ts

@@ -116,8 +116,7 @@ function handleUserInfo(userType: rolesType, userInfo: Record<string, any>) {
       realName = userInfo.realName
       phone = userInfo.phone
       subjectId = userInfo.subjectId
-      // userInfo.userVip?.vipType === 'NOT_VIP' || !userInfo.userVip?.vipType ||
-      isVip = userInfo.userVip ? false : userInfo.userVip?.vipType === "NOT_VIP" || !userInfo.userVip?.vipType ? true : false
+      isVip = userInfo.userVip ? (userInfo.userVip?.vipType === "NOT_VIP" || !userInfo.userVip?.vipType ? true : false) : false
    } else {
       avatar = userInfo.avatar
       username = userInfo.nickname