(len = 20)
| 63 | } |
| 64 | |
| 65 | function randomUuid(len = 20) { |
| 66 | const chars = "abcdef0123456789"; |
| 67 | let value = ""; |
| 68 | for (let i = 0; i < len; i++) value += chars[Math.floor(Math.random() * chars.length)]; |
| 69 | return value; |
| 70 | } |
| 71 | |
| 72 | function isTokenError(message) { |
| 73 | return /401|403|token|登录|授权|失效|过期|no-show-toast/i.test(String(message || "")); |