BaseService 解析异常

This commit is contained in:
icssoa 2021-08-19 17:35:41 +08:00
parent 73cb628d19
commit 9bd7bef48f
5 changed files with 1290 additions and 6003 deletions

4571
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "front-next",
"version": "0.7.0",
"version": "0.7.1",
"scripts": {
"dev": "vite",
"build": "vite build",
@ -55,7 +55,7 @@
"sass-loader": "^11.1.1",
"svg-sprite-loader": "^6.0.2",
"typescript": "4.1.3",
"vite": "^2.4.1",
"vite": "^2.5.0",
"vite-plugin-style-import": "^1.0.1",
"vite-svg-loader": "^2.1.0"
}

View File

@ -1,13 +1,8 @@
// @ts-nocheck
import request from "/@/service/request";
import { baseUrl, isDev } from "/@/config/env";
export default class BaseService {
permission: any;
namespace: any;
proxy: any;
url: any;
mock: any;
constructor() {
const crud: any = {
page: "page",

View File

@ -26,19 +26,13 @@ export function Service(value: any) {
// 复杂项
if (isObject(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.mock = mock;
if (proxy) {
target.prototype.proxy = proxy;
target.prototype.url = url || item ? item.target : null;
target.prototype.url = url;
}
}
};

2703
yarn.lock

File diff suppressed because it is too large Load Diff