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