Browse Source

fix: list bug修改。

zhangyi 1 year ago
parent
commit
ccd275474e
2 changed files with 9 additions and 9 deletions
  1. 3 3
      src/components/ResultPage.vue
  2. 6 6
      src/network/api/user.js

+ 3 - 3
src/components/ResultPage.vue

@@ -111,12 +111,12 @@ function sleepFun(logStr) {
 
 const getTaskList = async () => {
 
-  for (let i = 0; i < 10; i++) {
-    await sleepFun(i + 1)
+  for (let i = 0; i < 100; i++) {
     const token = getToken()
-    if (token.length > 0) {
+    if (token && token.length > 0) {
       break
     }
+    await sleepFun(i + 1)
   }
 
 

+ 6 - 6
src/network/api/user.js

@@ -1,9 +1,9 @@
 import { POST_JSON } from '../../utils/http'
 
-export const postCreatTask = (d) => POST_JSON('/poc-api/task/create', d)
-export const postTaskDetail = (d) => POST_JSON('/poc-api/task/detail', d)
-export const postRemoveTask = (d) => POST_JSON('/poc-api/task/remove', d)
-export const postCollectTask = (d) => POST_JSON('/poc-api/task/edit', d)
-export const postTaskList = (d) => POST_JSON('/poc-api/task/list', d)
+export const postCreatTask = (d) => POST_JSON('/poc/task/create', d)
+export const postTaskDetail = (d) => POST_JSON('/poc/task/detail', d)
+export const postRemoveTask = (d) => POST_JSON('/poc/task/remove', d)
+export const postCollectTask = (d) => POST_JSON('/poc/task/edit', d)
+export const postTaskList = (d) => POST_JSON('/poc/task/list', d)
 
-export const postLogin = (d, b) => POST_JSON('/poc-api/user/login', d, b)
+export const postLogin = (d, b) => POST_JSON('/poc/user/login', d, b)