From d255edfd5f596787acd7d562519e48baa8ed7fb1 Mon Sep 17 00:00:00 2001 From: hrz <1710360675@qq.com> Date: Sat, 5 Apr 2025 20:16:02 +0800 Subject: [PATCH] =?UTF-8?q?update:=E8=AE=BE=E7=BD=AE=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E8=AF=BB=E5=8F=96=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/manager-web/.env.development | 5 +- main/manager-web/.env.production | 2 +- main/manager-web/src/apis/api.js | 11 +-- main/manager-web/src/components/HeaderBar.vue | 18 ++-- .../src/views/DeviceManagement.vue | 41 ++++---- main/manager-web/src/views/home.vue | 99 +++++++++---------- main/manager-web/src/views/login.vue | 4 +- main/manager-web/vue.config.js | 15 +-- 8 files changed, 90 insertions(+), 105 deletions(-) diff --git a/main/manager-web/.env.development b/main/manager-web/.env.development index b2aadb84..8af8a3c5 100644 --- a/main/manager-web/.env.development +++ b/main/manager-web/.env.development @@ -1 +1,4 @@ -VUE_APP_API_BASE_URL=https://2662r3426b.vicp.fun \ No newline at end of file +# 暂时使用群主的接口 +VUE_APP_API_BASE_URL=https://2662r3426b.vicp.fun/xiaozhi-esp32-api +# 如果本地开发,请使用以下接口 +# VUE_APP_API_BASE_URL=http://localhost:8002/xiaozhi-esp32-api \ No newline at end of file diff --git a/main/manager-web/.env.production b/main/manager-web/.env.production index b2aadb84..08733058 100644 --- a/main/manager-web/.env.production +++ b/main/manager-web/.env.production @@ -1 +1 @@ -VUE_APP_API_BASE_URL=https://2662r3426b.vicp.fun \ No newline at end of file +VUE_APP_API_BASE_URL=/xiaozhi-esp32-api \ No newline at end of file diff --git a/main/manager-web/src/apis/api.js b/main/manager-web/src/apis/api.js index a2354e0e..4d290ee8 100755 --- a/main/manager-web/src/apis/api.js +++ b/main/manager-web/src/apis/api.js @@ -1,22 +1,17 @@ // 引入各个模块的请求 import user from './module/user.js' -import admin from './module/admin.js' /** * 接口地址 - * 当前8002端口接口还没开发完成,暂时用 apifoxmock 接口代替 - * 如果你想调用8002端口,就用'/xiaozhi-esp32-api/api/v1',请与vue.config.js的devServer配置相结合,方便跨域请求 - * + * 开发时自动读取使用.env.development文件 + * 编译时自动读取使用.env.production文件 */ -const DEV_API_SERVICE = 'https://2662r3426b.vicp.fun/xiaozhi-esp32-api' -// 8002开发完成完成后使用这个 -// const DEV_API_SERVICE = '/xiaozhi-esp32-api' +const DEV_API_SERVICE = process.env.VUE_APP_API_BASE_URL /** * 根据开发环境返回接口url * @returns {string} */ export function getServiceUrl() { - // return '/xiaozhi-esp32-api' return DEV_API_SERVICE } diff --git a/main/manager-web/src/components/HeaderBar.vue b/main/manager-web/src/components/HeaderBar.vue index f926f0c2..7646c9c3 100644 --- a/main/manager-web/src/components/HeaderBar.vue +++ b/main/manager-web/src/components/HeaderBar.vue @@ -13,14 +13,14 @@ 智能体管理 -
- - 用户管理 -
模型配置
+
+ + 用户管理 +
@@ -41,9 +41,8 @@ {{ userInfo.username || '加载中...' }} - 个人中心 - 修改密码 - 退出登录 + 修改密码 + 退出登录 @@ -56,8 +55,8 @@