mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2025-12-14 06:42:51 +00:00
解决 eps 无法加载接口带有 - : 的情况
This commit is contained in:
parent
8e35ddc3ea
commit
a0cfff8fdf
@ -373,10 +373,16 @@ function createService() {
|
|||||||
// 创建方法
|
// 创建方法
|
||||||
e.api.forEach((a) => {
|
e.api.forEach((a) => {
|
||||||
// 方法名
|
// 方法名
|
||||||
const n = a.path.replace("/", "");
|
let n = a.path.replace("/", "");
|
||||||
|
|
||||||
if (n && !/[-:]/g.test(n)) {
|
if (n) {
|
||||||
d[k][n] = a;
|
// 示例 /info/:id
|
||||||
|
if (n.includes("/:")) {
|
||||||
|
a.path = a.path.split("/:")[0];
|
||||||
|
n = n.split("/:")[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
d[k][toCamel(n)] = a;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user