From 5260b62287efa38fed4cbd2f643dbe83d908644a Mon Sep 17 00:00:00 2001
From: rainv123 <2148537152@qq.com>
Date: Mon, 18 Aug 2025 14:54:54 +0800
Subject: [PATCH] =?UTF-8?q?update:=E4=BF=AE=E5=A4=8D=E5=88=87=E6=8D=A2?=
=?UTF-8?q?=E6=9C=8D=E5=8A=A1=E7=AB=AF=E5=9C=B0=E5=9D=80=E6=97=A0=E6=B3=95?=
=?UTF-8?q?=E7=94=9F=E6=95=88=EF=BC=8C=E7=99=BB=E9=99=86=E7=95=8C=E9=9D=A2?=
=?UTF-8?q?=E5=8F=B3=E4=B8=8A=E8=A7=92=E6=B7=BB=E5=8A=A0=E5=8F=AF=E8=B7=B3?=
=?UTF-8?q?=E8=BD=AC=E8=87=B3=E8=AE=BE=E7=BD=AE=E9=A1=B5=E7=9A=84=E6=8C=89?=
=?UTF-8?q?=E9=92=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
main/manager-mobile/src/pages.json | 1 +
main/manager-mobile/src/pages/login/index.vue | 46 +++++++++++++++++++
.../src/pages/settings/index.vue | 22 +++++++++
3 files changed, 69 insertions(+)
diff --git a/main/manager-mobile/src/pages.json b/main/manager-mobile/src/pages.json
index 5ddd6f53..1d73f4a2 100644
--- a/main/manager-mobile/src/pages.json
+++ b/main/manager-mobile/src/pages.json
@@ -2,6 +2,7 @@
"globalStyle": {
"navigationStyle": "default",
"navigationBarTitleText": "小智",
+ "navigationBarTitleText": "小智智控台",
"navigationBarBackgroundColor": "#f8f8f8",
"navigationBarTextStyle": "black",
"backgroundColor": "#FFFFFF"
diff --git a/main/manager-mobile/src/pages/login/index.vue b/main/manager-mobile/src/pages/login/index.vue
index 225c5da0..71f53cce 100644
--- a/main/manager-mobile/src/pages/login/index.vue
+++ b/main/manager-mobile/src/pages/login/index.vue
@@ -115,6 +115,15 @@ function generateUUID() {
})
}
+let skipReLaunch = false // 全局或组件作用域
+
+//跳转至服务端设置页面
+function goToServerSetting() {
+ uni.switchTab({
+ url: '/pages/settings/index',
+ })
+}
+
// 获取验证码
async function refreshCaptcha() {
const uuid = generateUUID()
@@ -217,6 +226,15 @@ onMounted(async () => {
+
+
+
+
+
@@ -775,4 +793,32 @@ onMounted(async () => {
}
}
}
+.server-btn {
+ position: absolute;
+ right: 20rpx; // 距离右边距
+ top: 40rpx; // 顶部稍微下移,不贴状态栏
+ width: 48rpx;
+ height: 48rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ z-index: 999;
+ cursor: pointer;
+ background: rgba(255, 255, 255, 0.15); // 半透明背景,更好看
+ border-radius: 24rpx; // 圆形按钮
+ box-shadow: 0 4rpx 12rpx rgba(0,0,0,0.2); // 阴影
+
+ &:active {
+ transform: scale(0.95);
+ }
+
+ .server-icon {
+ font-size: 28rpx;
+ color: #FFFFFF; // 白色图标
+ }
+
+ &:hover {
+ background: rgba(255, 255, 255, 0.25); // 悬停效果
+ }
+}
diff --git a/main/manager-mobile/src/pages/settings/index.vue b/main/manager-mobile/src/pages/settings/index.vue
index bcc3ced1..cef02761 100644
--- a/main/manager-mobile/src/pages/settings/index.vue
+++ b/main/manager-mobile/src/pages/settings/index.vue
@@ -116,6 +116,9 @@ function restartApp() {
// 切换地址后自动清空所有缓存
function clearAllCacheAfterUrlChange() {
try {
+ // 备份运行时覆盖地址,确保清理后恢复
+ const preservedOverride = getServerBaseUrlOverride()
+
// 完全清空所有缓存,包括token
uni.clearStorageSync()
@@ -126,6 +129,11 @@ function clearAllCacheAfterUrlChange() {
}
// #endif
+ // 恢复运行时覆盖地址(如有),需要在清理完成后再写入
+ if (preservedOverride) {
+ setServerBaseUrlOverride(preservedOverride)
+ }
+
// 重新获取缓存信息
getCacheInfo()
}
@@ -164,6 +172,8 @@ function showAbout() {
uni.showModal({
title: `关于${import.meta.env.VITE_APP_TITLE}`,
content: `${import.meta.env.VITE_APP_TITLE}\n\n基于 Vue.js 3 + uni-app 构建的跨平台移动端管理应用,为小智ESP32智能硬件提供设备管理、智能体配置等功能。\n\n© 2025 xiaozhi-esp32-server`,
+ title: `关于小智智控台`,
+ content: `小智智控台\n\n基于 Vue.js 3 + uni-app 构建的跨平台移动端管理应用,为小智智控台ESP32智能硬件提供设备管理、智能体配置等功能。\n\n© 2025 xiaozhi-esp32-server 0.7.5`,
showCancel: false,
confirmText: '确定',
})
@@ -192,6 +202,7 @@ onMounted(async () => {
@@ -206,6 +217,17 @@ onMounted(async () => {
+
+
+