Explorar el Código

fix(student page): 修复登录过期判断逻辑

补充判断接口返回为空的场景,避免未正确捕获登录过期状态
lsc hace 2 días
padre
commit
0adbfa9ccc
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/views/Student/index.vue

+ 1 - 1
src/views/Student/index.vue

@@ -3916,7 +3916,7 @@ const addOp3 = async (userTime: any, loadTime: any, object: any, status: any) =>
       const res = await axios.get('https://pbl.cocorobo.cn/api/pbl/selectUser', {
         params: { userid: props.userid }
       })
-      if (res == 201) {
+      if (res == 201 || res.length == 0) {
         message.error('登录已过期,请重新登录')
         return
       }