From a9d6c5f7ee65213e2f36a4bb839a60c062be51b5 Mon Sep 17 00:00:00 2001 From: "meilin.huang" <954537473@qq.com> Date: Tue, 12 Apr 2022 17:14:44 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20sql=E6=89=A7=E8=A1=8C=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E9=80=89=E4=B8=AD=E9=BC=A0=E6=A0=87=E5=8F=B3=E5=87=BB=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E6=89=A7=E8=A1=8C=E6=8C=89=E9=92=AE=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mayfly_go_web/src/common/request.ts | 4 +- mayfly_go_web/src/views/ops/db/SqlExec.vue | 79 +++++++++++++--------- mayfly_go_web/src/views/personal/index.vue | 2 +- 3 files changed, 49 insertions(+), 36 deletions(-) diff --git a/mayfly_go_web/src/common/request.ts b/mayfly_go_web/src/common/request.ts index a08a1b5c..149f0760 100755 --- a/mayfly_go_web/src/common/request.ts +++ b/mayfly_go_web/src/common/request.ts @@ -41,7 +41,7 @@ const service = Axios.create({ // request interceptor service.interceptors.request.use( - config => { + (config: any) => { // do something before request is sent const token = getSession("token") if (token) { @@ -99,7 +99,7 @@ service.interceptors.response.use( * @param {Object} uri uri * @param {Object} params 参数 */ -function request(method: string, url: string, params: any, headers: any, options: any): Promise { +function request(method: string, url: string, params: any = null, headers: any = null, options: any = null): Promise { if (!url) throw new Error('请求url不能为空'); // 简单判断该url是否是restful风格 diff --git a/mayfly_go_web/src/views/ops/db/SqlExec.vue b/mayfly_go_web/src/views/ops/db/SqlExec.vue index 94d708f2..753051dd 100644 --- a/mayfly_go_web/src/views/ops/db/SqlExec.vue +++ b/mayfly_go_web/src/views/ops/db/SqlExec.vue @@ -1,5 +1,9 @@