(array, key)
| 67 | |
| 68 | }, |
| 69 | uniqueArray(array, key) { |
| 70 | // 数组去重 |
| 71 | const map = new Map(); |
| 72 | for (const item of array) { |
| 73 | if (!map.has(item[key])) { |
| 74 | map.set(item[key], item); |
| 75 | } |
| 76 | } |
| 77 | return [...map.values()]; |
| 78 | }, |
| 79 | apiUrlToAuto(url) { |
| 80 | // url中存在windowLocationOrigin的替换为自动获取 |
| 81 | if (!url) return |
nothing calls this directly
no outgoing calls
no test coverage detected