From 9417f5aea01653686ba58ee86b6e66cebcfd787a Mon Sep 17 00:00:00 2001 From: From-wh Date: Mon, 8 May 2023 09:52:14 +0800 Subject: [PATCH] =?UTF-8?q?improve:=20=E8=B0=83=E8=AF=95token=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/system/backendRouting/debugging.vue | 28 ++++++++++++------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/template/admin/src/pages/system/backendRouting/debugging.vue b/template/admin/src/pages/system/backendRouting/debugging.vue index 7d590f1d1..eae90794e 100644 --- a/template/admin/src/pages/system/backendRouting/debugging.vue +++ b/template/admin/src/pages/system/backendRouting/debugging.vue @@ -298,7 +298,15 @@ export default { this.interfaceData = this.formValidate; this.interfaceData.request_body = JSON.parse(JSON.stringify(this.interfaceData.request)); }, - mounted() {}, + mounted() { + if (!this.$refs.zTable.getTableData().tableData.length && this.apiType == 'adminapi') { + this.insertEvent('zTable', { + attribute: 'Authori-Zation', + value: 'Bearer ' + getCookies('token'), + }); + // this.insertEvent('zaTable'); + } + }, methods: { async handleChange(e, row, type) { if (e.value !== 'array' && e.value !== 'object') { @@ -407,15 +415,15 @@ export default { return x; }, changeTab(name) { - if (name === 'Header') { - if (!this.$refs.zTable.getTableData().tableData.length) { - this.insertEvent('zTable', { - attribute: 'Authori-Zation', - value: 'Bearer ' + getCookies('token'), - }); - this.insertEvent('zaTable'); - } - } + // if (name === 'Header') { + // if (!this.$refs.zTable.getTableData().tableData.length) { + // this.insertEvent('zTable', { + // attribute: 'Authori-Zation', + // value: 'Bearer ' + getCookies('token'), + // }); + // this.insertEvent('zaTable'); + // } + // } }, async insertEvent(type, d) { const $table = this.$refs[type];