(url = '', prefixPath)
| 93 | * @param {string} url -url地址 |
| 94 | */ |
| 95 | const getSwaggerPath = (url = '', prefixPath) => { |
| 96 | return new Promise((resolve, reject) => { |
| 97 | get({}, url) |
| 98 | .then((res) => res[0].location) |
| 99 | .then((res) => { |
| 100 | prefixPath |
| 101 | ? resolve(`${prefixPath.protocol}//${prefixPath.host}${res}`) |
| 102 | : resolve(res); |
| 103 | }) |
| 104 | .catch((err) => { |
| 105 | reject(err); |
| 106 | }); |
| 107 | }); |
| 108 | }; |
| 109 | /** |
| 110 | * @description 用于合并两个数组对象 |
| 111 | * @param {Array} arr1 |