mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2024-11-01 06:02:38 +08: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",
|
||||
"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"
|
||||
}
|
||||
|
@ -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",
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user