mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2025-12-18 18:02:50 +00:00
BaseService 解析异常
This commit is contained in:
parent
73cb628d19
commit
9bd7bef48f
4571
package-lock.json
generated
4571
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "front-next",
|
"name": "front-next",
|
||||||
"version": "0.7.0",
|
"version": "0.7.1",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
@ -55,7 +55,7 @@
|
|||||||
"sass-loader": "^11.1.1",
|
"sass-loader": "^11.1.1",
|
||||||
"svg-sprite-loader": "^6.0.2",
|
"svg-sprite-loader": "^6.0.2",
|
||||||
"typescript": "4.1.3",
|
"typescript": "4.1.3",
|
||||||
"vite": "^2.4.1",
|
"vite": "^2.5.0",
|
||||||
"vite-plugin-style-import": "^1.0.1",
|
"vite-plugin-style-import": "^1.0.1",
|
||||||
"vite-svg-loader": "^2.1.0"
|
"vite-svg-loader": "^2.1.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,13 +1,8 @@
|
|||||||
|
// @ts-nocheck
|
||||||
import request from "/@/service/request";
|
import request from "/@/service/request";
|
||||||
import { baseUrl, isDev } from "/@/config/env";
|
import { baseUrl, isDev } from "/@/config/env";
|
||||||
|
|
||||||
export default class BaseService {
|
export default class BaseService {
|
||||||
permission: any;
|
|
||||||
namespace: any;
|
|
||||||
proxy: any;
|
|
||||||
url: any;
|
|
||||||
mock: any;
|
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
const crud: any = {
|
const crud: any = {
|
||||||
page: "page",
|
page: "page",
|
||||||
|
|||||||
@ -26,19 +26,13 @@ export function Service(value: any) {
|
|||||||
// 复杂项
|
// 复杂项
|
||||||
if (isObject(value)) {
|
if (isObject(value)) {
|
||||||
const { proxy, namespace, url, mock } = value;
|
const { proxy, namespace, url, mock } = value;
|
||||||
// @ts-ignore
|
|
||||||
const item: any = null;
|
|
||||||
|
|
||||||
if (proxy && !item) {
|
|
||||||
console.error(`${proxy} 指向的地址不存在!`);
|
|
||||||
}
|
|
||||||
|
|
||||||
target.prototype.namespace = namespace;
|
target.prototype.namespace = namespace;
|
||||||
target.prototype.mock = mock;
|
target.prototype.mock = mock;
|
||||||
|
|
||||||
if (proxy) {
|
if (proxy) {
|
||||||
target.prototype.proxy = proxy;
|
target.prototype.proxy = proxy;
|
||||||
target.prototype.url = url || item ? item.target : null;
|
target.prototype.url = url;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user