From c751071b8a70fcf323f60df979101fd3aa8352d8 Mon Sep 17 00:00:00 2001 From: SummerColdWind <472959020@qq.com> Date: Sun, 28 Jul 2024 16:52:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=952?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/byte.js | 2 +- src/utils/request.js | 4 ++-- src/views/layoutPage.vue | 16 +++++++++++++++- src/views/toolBox/bytePage.vue | 3 ++- src/views/toolBox/testPage.vue | 4 +++- 5 files changed, 23 insertions(+), 6 deletions(-) diff --git a/src/api/byte.js b/src/api/byte.js index fc31fdc..5820cca 100644 --- a/src/api/byte.js +++ b/src/api/byte.js @@ -1,7 +1,7 @@ import request from '@/utils/request.js' export const sendByteInterface = (context) => { - return request.get('', { + return request.get('/api/test', { params: { byte: context } diff --git a/src/utils/request.js b/src/utils/request.js index 5f7e106..663f249 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -1,8 +1,8 @@ import axios from "axios"; const instance = axios.create({ - baseURL: '', - timeout: 1000, + baseURL: 'http://localhost:5000', + timeout: 10000, // headers: {'X-Custom-Header': 'foobar'} }); diff --git a/src/views/layoutPage.vue b/src/views/layoutPage.vue index 0a610ce..1c08f1d 100644 --- a/src/views/layoutPage.vue +++ b/src/views/layoutPage.vue @@ -77,7 +77,15 @@ - Header + + + + + + @@ -106,6 +114,12 @@ } + .el-header { + border-bottom: 1px solid #777; + height: 50px; + line-height: 50px; + } + } diff --git a/src/views/toolBox/bytePage.vue b/src/views/toolBox/bytePage.vue index 7c0a22d..3a80908 100644 --- a/src/views/toolBox/bytePage.vue +++ b/src/views/toolBox/bytePage.vue @@ -14,7 +14,8 @@ const rules = { const byteForm = ref(null) const sendByte = async () => { await byteForm.value.validate() - console.log(form.value) + const res = await sendByteInterface(form.value.context) + console.log(res.data) } diff --git a/src/views/toolBox/testPage.vue b/src/views/toolBox/testPage.vue index bda6aa0..cee2536 100644 --- a/src/views/toolBox/testPage.vue +++ b/src/views/toolBox/testPage.vue @@ -3,7 +3,9 @@