瀏覽代碼

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

补充判断接口返回为空的场景,避免未正确捕获登录过期状态
lsc 3 天之前
父節點
當前提交
0adbfa9ccc
共有 1 個文件被更改,包括 1 次插入1 次删除
  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
       }