()
| 72 | |
| 73 | // UUID生成 |
| 74 | generateUUID() { |
| 75 | const alphanumeric = "0123456789abcdef"; |
| 76 | const sections = [8, 4, 4, 4, 12]; |
| 77 | let uuid = ""; |
| 78 | for (let i = 0; i < sections.length; i++) { |
| 79 | for (let j = 0; j < sections[i]; j++) { |
| 80 | uuid += alphanumeric[Math.floor(Math.random() * alphanumeric.length)]; |
| 81 | } |
| 82 | if (i !== sections.length - 1) { |
| 83 | uuid += "-"; |
| 84 | } |
| 85 | } |
| 86 | return uuid; |
| 87 | } |
| 88 | |
| 89 | // Post请求构建 |
| 90 | getPostHeader(key, path, body) { |
no outgoing calls
no test coverage detected