소스 검색

接口报错和版本一致不弹Confirm

lifanagju_citu 6 달 전
부모
커밋
4c8f570f22
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      src/App.vue

+ 2 - 1
src/App.vue

@@ -37,7 +37,8 @@ const checkVersion = () => {
     headers: { ['tenant-id']: tenantId },
     cache: 'no-store' // 禁用缓存
   }).then((res) => {
-    if (res?.data?.data === version) {
+    // 接口报错和版本一致不弹Confirm
+    if (!res?.data?.data || res.data.data === version) {
       return
     }
     if (ConfirmDone) {