diff --git a/main/manager-mobile/README.md b/main/manager-mobile/README.md
index 3a4f33a38..121b595c6 100644
--- a/main/manager-mobile/README.md
+++ b/main/manager-mobile/README.md
@@ -1,51 +1,51 @@
-## 智控台移动版(manager-mobile)
-基于 uni-app v3 + Vue 3 + Vite 的跨端移动管理端,支持 App(Android & iOS)和微信小程序。
+## Xiaozhi Control Panel Mobile Version (manager-mobile)
+Cross-platform mobile management client based on uni-app v3 + Vue 3 + Vite, supporting App (Android & iOS) and WeChat Mini Program.
-### 平台兼容性
+### Platform Compatibility
-| H5 | iOS | Android | 微信小程序 |
+| H5 | iOS | Android | WeChat Mini Program |
| -- | --- | ------- | ---------- |
| √ | √ | √ | √ |
-提示:不同 UI 组件在不同平台的适配度略有差异,请以对应组件库文档为准。
+Note: Different UI components have slight differences in adaptation across platforms, please refer to the corresponding component library documentation.
-### 开发环境要求
+### Development Environment Requirements
- Node >= 18
-- pnpm >= 7.30(建议使用项目中声明的 `pnpm@10.x`)
-- 可选:HBuilderX(App 调试/打包)、微信开发者工具(微信小程序)
+- pnpm >= 7.30 (recommended to use `pnpm@10.x` declared in the project)
+- Optional: HBuilderX (App debugging/packaging), WeChat Developer Tools (WeChat Mini Program)
-### 快速开始
-1) 配置环境变量
- - 复制 `env/.env.example` 为 `env/.env.development`
- - 根据实际情况修改配置项(特别是 `VITE_SERVER_BASEURL`、`VITE_UNI_APPID`、`VITE_WX_APPID`)
+### Quick Start
+1) Configure environment variables
+ - Copy `env/.env.example` to `env/.env.development`
+ - Modify configuration items according to actual situation (especially `VITE_SERVER_BASEURL`, `VITE_UNI_APPID`, `VITE_WX_APPID`)
-2) 安装依赖
+2) Install dependencies
```bash
pnpm i
```
-3) 本地开发(热更新)
-- h5: `pnpm dev:h5`,然后观察启动日志显示的ip端口号
-- 微信小程序:`pnpm dev:mp` 或 `pnpm dev:mp-weixin`,然后用微信开发者工具导入 `dist/dev/mp-weixin`
-- App:用 HBuilderX 导入 `manager-mobile`,然后参考下面的教程就能运行了
+3) Local development (hot reload)
+- h5: `pnpm dev:h5`, then observe the ip port number displayed in the startup log
+- WeChat Mini Program: `pnpm dev:mp` or `pnpm dev:mp-weixin`, then import `dist/dev/mp-weixin` with WeChat Developer Tools
+- App: Import `manager-mobile` with HBuilderX, then follow the tutorial below to run
-### 环境变量与配置
-项目使用自定义 `env` 目录存放环境文件,按 Vite 规范命名:`.env.development`、`.env.production` 等。
+### Environment Variables and Configuration
+The project uses a custom `env` directory to store environment files, named according to Vite specifications: `.env.development`, `.env.production`, etc.
-关键变量(部分):
-- VITE_APP_TITLE:应用名称(写入 `manifest.config.ts`)
-- VITE_UNI_APPID:uni-app 应用 appid(App)
-- VITE_WX_APPID:微信小程序 appid(mp-weixin)
-- VITE_FALLBACK_LOCALE:默认语言,如 `zh-Hans`
-- VITE_SERVER_BASEURL:服务端基础地址(HTTP 请求 baseURL)
-- VITE_DELETE_CONSOLE:构建时是否移除 console(`true`/`false`)
-- VITE_SHOW_SOURCEMAP:是否生成 sourcemap(默认关闭)
-- VITE_LOGIN_URL:未登录跳转的登录页路径(路由拦截器使用)
+Key variables (partial):
+- VITE_APP_TITLE: Application name (written to `manifest.config.ts`)
+- VITE_UNI_APPID: uni-app application appid (App)
+- VITE_WX_APPID: WeChat Mini Program appid (mp-weixin)
+- VITE_FALLBACK_LOCALE: Default language, such as `zh-Hans`
+- VITE_SERVER_BASEURL: Server base address (HTTP request baseURL)
+- VITE_DELETE_CONSOLE: Whether to remove console during build (`true`/`false`)
+- VITE_SHOW_SOURCEMAP: Whether to generate sourcemap (default off)
+- VITE_LOGIN_URL: Login page path for unauthenticated redirect (used by route interceptor)
-示例(`env/.env.development`):
+Example (`env/.env.development`):
```env
-VITE_APP_TITLE=小智
+VITE_APP_TITLE=Xiaozhi
VITE_FALLBACK_LOCALE=zh-Hans
VITE_UNI_APPID=
VITE_WX_APPID=
@@ -57,111 +57,111 @@ VITE_SHOW_SOURCEMAP=false
VITE_LOGIN_URL=/pages/login/index
```
-说明:
-- `manifest.config.ts` 会从 `env` 读取标题、appid、语言等配置。
+Note:
+- `manifest.config.ts` will read title, appid, language and other configurations from `env`.
-### 重要注意事项
-⚠️ **部署前必须修改的配置项:**
+### Important Notes
+⚠️ **Configuration items that must be modified before deployment:**
-1. **应用 ID 配置**
- - `VITE_UNI_APPID`:需要在 [DCloud 开发者中心](https://dev.dcloud.net.cn/) 创建应用并获取 AppID
- - `VITE_WX_APPID`:需要在 [微信公众平台](https://mp.weixin.qq.com/) 注册小程序并获取 AppID
+1. **Application ID Configuration**
+ - `VITE_UNI_APPID`: Need to create an application in [DCloud Developer Center](https://dev.dcloud.net.cn/) and get AppID
+ - `VITE_WX_APPID`: Need to register a mini program in [WeChat Public Platform](https://mp.weixin.qq.com/) and get AppID
-2. **服务端地址**
- - `VITE_SERVER_BASEURL`:修改为您的实际服务端地址
+2. **Server Address**
+ - `VITE_SERVER_BASEURL`: Modify to your actual server address
-3. **应用信息**
- - `VITE_APP_TITLE`:修改为您的应用名称
- - 更新 `src/static/logo.png` 等图标资源
+3. **Application Information**
+ - `VITE_APP_TITLE`: Modify to your application name
+ - Update icon resources such as `src/static/logo.png`
-4. **其他配置**
- - 检查 `manifest.config.ts` 中的应用配置信息
- - 根据需要修改 `src/layouts/fg-tabbar/tabbarList.ts` 中的 tabbar 配置
+4. **Other Configuration**
+ - Check application configuration information in `manifest.config.ts`
+ - Modify tabbar configuration in `src/layouts/fg-tabbar/tabbarList.ts` as needed
-### 详细操作指南
+### Detailed Operation Guide
-#### 1. 获取 uni-app AppID
-
-- 复制生成的 AppID 到环境变量 `VITE_UNI_APPID` 中
+#### 1. Get uni-app AppID
+
+- Copy the generated AppID to environment variable `VITE_UNI_APPID`
-#### 2. 本地运行步骤
-
+#### 2. Local Running Steps
+
-**App 本地调试:**
-1. 用 HBuilderX 导入 `manager-mobile` 目录
-2. 重新识别项目
-3. 连接手机或使用模拟器进行真机调试
+**App Local Debugging:**
+1. Import `manager-mobile` directory with HBuilderX
+2. Re-identify the project
+3. Connect phone or use simulator for real device debugging
-**项目识别问题解决:**
-
+**Project Recognition Issue Resolution:**
+
-如果 HBuilderX 无法正确识别项目类型:
-- 在项目根目录右键选择"重新识别项目类型"
-- 确保项目被识别为 "uni-app" 项目
+If HBuilderX cannot correctly identify the project type:
+- Right-click in the project root directory and select "Re-identify Project Type"
+- Ensure the project is identified as a "uni-app" project
-### 路由与鉴权
-- 在 `src/main.ts` 中注册了路由拦截插件 `routeInterceptor`。
-- 黑名单拦截:仅对配置为需要登录的页面进行校验(来源 `@/utils` 的 `getNeedLoginPages`)。
-- 登录判断:基于用户信息(`pinia` 的 `useUserStore`),未登录将跳转到 `VITE_LOGIN_URL`,并附带重定向回原页面的参数。
+### Routing and Authentication
+- Route interceptor plugin `routeInterceptor` is registered in `src/main.ts`.
+- Blacklist interception: Only validates pages configured to require login (from `getNeedLoginPages` in `@/utils`).
+- Login determination: Based on user information (`useUserStore` from `pinia`), unauthenticated users will be redirected to `VITE_LOGIN_URL` with parameters to redirect back to the original page.
-### 网络请求
-- 基于 `alova` + `@alova/adapter-uniapp`,统一在 `src/http/request/alova.ts` 创建实例。
-- `baseURL` 读取环境配置(`getEnvBaseUrl`),可通过 `method.config.meta.domain` 动态切换域名。
-- 认证:默认从本地 `token`(`uni.getStorageSync('token')`)注入 `Authorization` 头,缺失则重定向登录。
-- 响应:统一处理 `statusCode !== 200` 的 HTTP 错误与业务 `code !== 0` 的错误;`401` 会清除 token 并跳转登录。
+### Network Requests
+- Based on `alova` + `@alova/adapter-uniapp`, unified instance creation in `src/http/request/alova.ts`.
+- `baseURL` reads environment configuration (`getEnvBaseUrl`), can dynamically switch domains through `method.config.meta.domain`.
+- Authentication: Default injection of `Authorization` header from local `token` (`uni.getStorageSync('token')`), redirect to login if missing.
+- Response: Unified handling of HTTP errors with `statusCode !== 200` and business errors with `code !== 0`; `401` will clear token and redirect to login.
-### 构建与发布
+### Build and Release
-**微信小程序:**
-1. 确保已配置正确的 `VITE_WX_APPID`
-2. 运行 `pnpm build:mp`,产物在 `dist/build/mp-weixin`
-3. 用微信开发者工具导入项目目录,并上传代码
-4. 在微信公众平台提交审核
+**WeChat Mini Program:**
+1. Ensure correct `VITE_WX_APPID` is configured
+2. Run `pnpm build:mp`, output in `dist/build/mp-weixin`
+3. Import project directory with WeChat Developer Tools and upload code
+4. Submit for review in WeChat Public Platform
-**Android & iOS App:**
+**Android & iOS App:**
-#### 3. App 打包发行步骤
+#### 3. App Packaging and Release Steps
-**步骤一:准备打包**
-
+**Step 1: Prepare Packaging**
+
-1. 确保已配置正确的 `VITE_UNI_APPID`
-2. 运行 `pnpm build:app`,产物在 `dist/build/app`
-3. 用 HBuilderX 导入项目目录
-4. 在 HBuilderX 中点击"发行" → "原生App-云打包"
+1. Ensure correct `VITE_UNI_APPID` is configured
+2. Run `pnpm build:app`, output in `dist/build/app`
+3. Import project directory with HBuilderX
+4. Click "Release" → "Native App-Cloud Packaging" in HBuilderX
-**步骤二:配置打包参数**
-
+**Step 2: Configure Packaging Parameters**
+
-1. **应用图标和启动图**:上传应用图标和启动页面图片
-2. **应用版本号**:设置版本号和版本名称
-3. **签名证书**:
- - Android:上传 keystore 证书文件
- - iOS:配置开发者证书和描述文件
-4. **包名配置**:设置应用的包名(Bundle ID)
-5. **打包类型**:选择测试包或正式包
-6. 点击"打包"开始云打包流程
+1. **App Icon and Launch Screen**: Upload app icon and launch screen images
+2. **App Version Number**: Set version number and version name
+3. **Signature Certificate**:
+ - Android: Upload keystore certificate file
+ - iOS: Configure developer certificate and provisioning profile
+4. **Package Name Configuration**: Set app package name (Bundle ID)
+5. **Packaging Type**: Choose test package or release package
+6. Click "Package" to start cloud packaging process
-**发布到应用商店:**
-- **Android**:将生成的 APK 文件上传到各大 Android 应用市场
-- **iOS**:将生成的 IPA 文件通过 App Store Connect 上传到 App Store(需要 Apple 开发者账号)
+**Release to App Stores:**
+- **Android**: Upload generated APK file to major Android app markets
+- **iOS**: Upload generated IPA file to App Store through App Store Connect (requires Apple Developer account)
-### 约定与工程化
-- 页面与分包:由 `@uni-helper/vite-plugin-uni-pages` 与 `pages.config.ts` 统一生成;tabbar 配置在 `src/layouts/fg-tabbar/tabbarList.ts`。
-- 组件与 hooks 自动导入:见 `vite.config.ts` 中 `unplugin-auto-import` 与 `@uni-helper/vite-plugin-uni-components`。
-- 样式:使用 UnoCSS 与 `src/style/index.scss`。
-- 状态管理:`pinia` + `pinia-plugin-persistedstate`。
-- 代码规范:内置 `eslint`、`husky`、`lint-staged`,提交前自动格式化(`lint-staged`)。
+### Conventions and Engineering
+- Pages and sub-packages: Generated by `@uni-helper/vite-plugin-uni-pages` and `pages.config.ts`; tabbar configuration in `src/layouts/fg-tabbar/tabbarList.ts`.
+- Component and hooks auto-import: See `unplugin-auto-import` and `@uni-helper/vite-plugin-uni-components` in `vite.config.ts`.
+- Styling: Uses UnoCSS and `src/style/index.scss`.
+- State management: `pinia` + `pinia-plugin-persistedstate`.
+- Code standards: Built-in `eslint`, `husky`, `lint-staged`, auto-format before commit (`lint-staged`).
-### 常用脚本
+### Common Scripts
```bash
-# 开发
-pnpm dev:mp # 等价 dev:mp-weixin
+# Development
+pnpm dev:mp # Equivalent to dev:mp-weixin
-# 构建
-pnpm build:mp # 等价 build:mp-weixin
+# Build
+pnpm build:mp # Equivalent to build:mp-weixin
-# 其他
+# Others
pnpm type-check
pnpm lint && pnpm lint:fix
```
diff --git a/main/manager-mobile/env/.env b/main/manager-mobile/env/.env
index e0f4eea67..f32b546ec 100644
--- a/main/manager-mobile/env/.env
+++ b/main/manager-mobile/env/.env
@@ -1,19 +1,20 @@
-VITE_APP_TITLE = '小智'
+VITE_APP_TITLE = 'Xiao Zhi'
VITE_APP_PORT = 9000
VITE_UNI_APPID = '__UNI__36A515E'
VITE_WX_APPID = 'wxa2abb91f64032a2b'
-# h5部署网站的base,配置到 manifest.config.ts 里的 h5.router.base
+# The base path for the H5 website deployment, configured in manifest.config.ts under h5.router.base
VITE_APP_PUBLIC_BASE=/
-# 登录页面
+# Login Page
VITE_LOGIN_URL = '/pages/login/index'
-# 第一个请求地址
+
+# Primary API endpoint URL
VITE_SERVER_BASEURL = 'https://2662r3426b.vicp.fun/xiaozhi'
VITE_UPLOAD_BASEURL = '/otaMag/upload'
-# h5是否需要配置代理
+# Whether the H5 app requires proxy configuration
VITE_APP_PROXY=true
VITE_APP_PROXY_PREFIX = '/xiaozhi'
\ No newline at end of file
diff --git a/main/manager-mobile/eslint.config.mjs b/main/manager-mobile/eslint.config.mjs
index 54ce246d6..0dd559164 100644
--- a/main/manager-mobile/eslint.config.mjs
+++ b/main/manager-mobile/eslint.config.mjs
@@ -7,14 +7,14 @@ export default uniHelper({
ignores: [
'src/uni_modules/',
'dist',
- // unplugin-auto-import 生成的类型文件,每次提交都改变,所以加入这里吧,与 .gitignore 配合使用
+ // Type files generated by unplugin-auto-import, changes on every commit, so add them here to work with .gitignore
'auto-import.d.ts',
- // vite-plugin-uni-pages 生成的类型文件,每次切换分支都一堆不同的,所以直接 .gitignore
+ // Type files generated by vite-plugin-uni-pages, many differences on every branch switch, so directly .gitignore
'uni-pages.d.ts',
- // 插件生成的文件
+ // Plugin generated files
'src/pages.json',
'src/manifest.json',
- // 忽略自动生成文件
+ // Ignore auto-generated files
'src/service/app/**',
],
rules: {
diff --git a/main/manager-mobile/manifest.config.ts b/main/manager-mobile/manifest.config.ts
index d0429b861..3db19b38d 100644
--- a/main/manager-mobile/manifest.config.ts
+++ b/main/manager-mobile/manifest.config.ts
@@ -4,13 +4,13 @@ import process from 'node:process'
import { defineManifestConfig } from '@uni-helper/vite-plugin-uni-manifest'
import { loadEnv } from 'vite'
-// 手动解析命令行参数获取 mode
+// Manually parse command line arguments to get mode
function getMode() {
const args = process.argv.slice(2)
const modeFlagIndex = args.findIndex(arg => arg === '--mode')
- return modeFlagIndex !== -1 ? args[modeFlagIndex + 1] : args[0] === 'build' ? 'production' : 'development' // 默认 development
+ return modeFlagIndex !== -1 ? args[modeFlagIndex + 1] : args[0] === 'build' ? 'production' : 'development' // Default development
}
-// 获取环境变量的范例
+// Example of getting environment variables
const env = loadEnv(getMode(), path.resolve(process.cwd(), 'env'))
const {
VITE_APP_TITLE,
@@ -33,7 +33,7 @@ export default defineManifestConfig({
// base: VITE_APP_PUBLIC_BASE,
},
},
- /* 5+App特有相关 */
+ /* 5+App specific */
'app-plus': {
usingComponents: true,
nvueStyleCompiler: 'uni-app',
@@ -47,11 +47,11 @@ export default defineManifestConfig({
autoclose: true,
delay: 0,
},
- /* 模块配置 */
+ /* Module configuration */
modules: {},
- /* 应用发布信息 */
+ /* Application distribution information */
distribute: {
- /* android打包配置 */
+ /* Android packaging configuration */
android: {
minSdkVersion: 30,
targetSdkVersion: 30,
@@ -76,11 +76,11 @@ export default defineManifestConfig({
'',
],
},
- /* ios打包配置 */
+ /* iOS packaging configuration */
ios: {},
- /* SDK配置 */
+ /* SDK configuration */
sdkConfigs: {},
- /* 图标配置 */
+ /* Icon configuration */
icons: {
android: {
hdpi: 'unpackage/res/icons/72x72.png',
@@ -115,14 +115,14 @@ export default defineManifestConfig({
},
},
},
- /* 快应用特有相关 */
+ /* Quick app specific */
'quickapp': {},
- /* 小程序特有相关 */
+ /* Mini program specific */
'mp-weixin': {
appid: VITE_WX_APPID,
setting: {
urlCheck: false,
- // 是否启用 ES6 转 ES5
+ // Whether to enable ES6 to ES5 conversion
es6: true,
minified: true,
},
@@ -133,7 +133,7 @@ export default defineManifestConfig({
// __usePrivacyCheck__: true,
permission: {
'scope.userLocation': {
- desc: 'WiFi配网功能需要获取位置权限',
+ desc: 'WiFi configuration function requires location permission',
},
},
requiredPrivateInfos: ['getLocation'],
diff --git a/main/manager-mobile/package.json b/main/manager-mobile/package.json
index 9c4ed55ff..19adec812 100644
--- a/main/manager-mobile/package.json
+++ b/main/manager-mobile/package.json
@@ -4,20 +4,20 @@
"version": "3.4.0",
"unibest-version": "3.4.0",
"packageManager": "pnpm@10.10.0",
- "description": "xiaozhi-esp32-server的移动端管理后台",
+ "description": "Mobile management backend for xiaozhi-esp32-server",
"generate-time": "2025-08-04",
"author": {
"name": "huangjunsen",
- "zhName": "黄俊森",
+ "zhName": "Huang Junsen",
"email": "huangjunsen@xiaozhi.com",
"github": "https://github.com/huangjunsen0406",
"gitee": "https://gitee.com/huang-jun-sen"
},
"license": "MIT",
- "homepage": "https://github.com/xinnan-tech/xiaozhi-esp32-server",
- "repository": "https://github.com/xinnan-tech/xiaozhi-esp32-server",
+ "homepage": "https://github.com/lapy/xiaozhi-esp32-server",
+ "repository": "https://github.com/lapy/xiaozhi-esp32-server",
"bugs": {
- "url": "https://github.com/xinnan-tech/xiaozhi-esp32-server/issues"
+ "url": "https://github.com/lapy/xiaozhi-esp32-server/issues"
},
"engines": {
"node": ">=18",
@@ -100,7 +100,7 @@
"js-cookie": "^3.0.5",
"pinia": "2.0.36",
"pinia-plugin-persistedstate": "3.2.1",
- "sm-crypto": "^0.3.13",
+ "sm-crypto": "^0.4.0",
"vue": "^3.4.21",
"wot-design-uni": "^1.9.1",
"z-paging": "2.8.7"
@@ -154,7 +154,7 @@
"vue-tsc": "^2.2.10"
},
"resolutions": {
- "bin-wrapper": "npm:bin-wrapper-china"
+ "bin-wrapper": "npm:bin-wrapper"
},
"lint-staged": {
"*": "eslint --fix"
diff --git a/main/manager-mobile/pages.config.ts b/main/manager-mobile/pages.config.ts
index 4547919c2..fc2da42b9 100644
--- a/main/manager-mobile/pages.config.ts
+++ b/main/manager-mobile/pages.config.ts
@@ -4,7 +4,7 @@ import { tabBar } from './src/layouts/fg-tabbar/tabbarList'
export default defineUniPages({
globalStyle: {
navigationStyle: 'default',
- navigationBarTitleText: '小智',
+ navigationBarTitleText: 'XiaoZhi',
navigationBarBackgroundColor: '#f8f8f8',
navigationBarTextStyle: 'black',
backgroundColor: '#FFFFFF',
@@ -18,6 +18,6 @@ export default defineUniPages({
'z-paging/components/z-paging$1/z-paging$1.vue',
},
},
- // tabbar 的配置统一在 "./src/layouts/fg-tabbar/tabbarList.ts" 文件中
+ // tabbar configuration is unified in "./src/layouts/fg-tabbar/tabbarList.ts" file
tabBar: tabBar as any,
})
diff --git a/main/manager-mobile/pnpm-lock.yaml b/main/manager-mobile/pnpm-lock.yaml
index 9faf80cdf..1116a7a94 100644
--- a/main/manager-mobile/pnpm-lock.yaml
+++ b/main/manager-mobile/pnpm-lock.yaml
@@ -5,7 +5,7 @@ settings:
excludeLinksFromLockfile: false
overrides:
- bin-wrapper: npm:bin-wrapper-china
+ bin-wrapper: npm:bin-wrapper
patchedDependencies:
'@dcloudio/uni-h5':
@@ -91,6 +91,9 @@ importers:
pinia-plugin-persistedstate:
specifier: 3.2.1
version: 3.2.1(pinia@2.0.36(typescript@5.7.2)(vue@3.5.15(typescript@5.7.2)))
+ sm-crypto:
+ specifier: ^0.4.0
+ version: 0.4.0
vue:
specifier: ^3.4.21
version: 3.5.15(typescript@5.7.2)
@@ -4719,6 +4722,9 @@ packages:
resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==}
hasBin: true
+ jsbn@1.1.0:
+ resolution: {integrity: sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==}
+
jsdoc-type-pratt-parser@4.1.0:
resolution: {integrity: sha512-Hicd6JK5Njt2QB6XYFS7ok9e37O8AYk3jTcppG4YVQnYjOemymvTcmc7OWsmq/Qqj5TdRFO5/x/tIPmBeRtGHg==}
engines: {node: '>=12.0.0'}
@@ -6020,6 +6026,9 @@ packages:
resolution: {integrity: sha512-bSiSngZ/jWeX93BqeIAbImyTbEihizcwNjFoRUIY/T1wWQsfsm2Vw1agPKylXvQTU7iASGdHhyqRlqQzfz+Htg==}
engines: {node: '>=18'}
+ sm-crypto@0.4.0:
+ resolution: {integrity: sha512-OexH2V1EqmhXuOIPGoCl55OjMF0wwPUM/zhUjT0Q6vHBeopSRvTNRy76/1eRoFs3VBKt39hdFnxwpFmooHYa2A==}
+
source-map-js@1.2.1:
resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==}
engines: {node: '>=0.10.0'}
@@ -12652,6 +12661,8 @@ snapshots:
dependencies:
argparse: 2.0.1
+ jsbn@1.1.0: {}
+
jsdoc-type-pratt-parser@4.1.0: {}
jsdom@16.7.0:
@@ -14145,6 +14156,10 @@ snapshots:
ansi-styles: 6.2.1
is-fullwidth-code-point: 5.0.0
+ sm-crypto@0.4.0:
+ dependencies:
+ jsbn: 1.1.0
+
source-map-js@1.2.1: {}
source-map-support@0.5.21:
diff --git a/main/manager-mobile/scripts/postupgrade.js b/main/manager-mobile/scripts/postupgrade.js
index 65e4e604e..f4679f197 100644
--- a/main/manager-mobile/scripts/postupgrade.js
+++ b/main/manager-mobile/scripts/postupgrade.js
@@ -1,13 +1,13 @@
-// # 执行 `pnpm upgrade` 后会升级 `uniapp` 相关依赖
-// # 在升级完后,会自动添加很多无用依赖,这需要删除以减小依赖包体积
-// # 只需要执行下面的命令即可
+// # After executing `pnpm upgrade`, uniapp related dependencies will be upgraded
+// # After upgrade, many useless dependencies will be automatically added, which need to be deleted to reduce package size
+// # Just execute the following command
const { exec } = require('node:child_process')
-// 定义要执行的命令
+// Define commands to execute
const dependencies = [
'@dcloudio/uni-app-harmony',
- // TODO: 如果不需要某个平台的小程序,请手动删除或注释掉
+ // TODO: If you don't need mini programs for certain platforms, please manually delete or comment out
'@dcloudio/uni-mp-alipay',
'@dcloudio/uni-mp-baidu',
'@dcloudio/uni-mp-jd',
@@ -17,19 +17,19 @@ const dependencies = [
'@dcloudio/uni-mp-toutiao',
'@dcloudio/uni-mp-xhs',
'@dcloudio/uni-quickapp-webview',
- // i18n模板要注释掉下面的
+ // i18n template should comment out the following
'vue-i18n',
]
-// 使用exec执行命令
+// Use exec to execute commands
exec(`pnpm un ${dependencies.join(' ')}`, (error, stdout, stderr) => {
if (error) {
- // 如果有错误,打印错误信息
- console.error(`执行出错: ${error}`)
+ // If there is an error, print error information
+ console.error(`Execution error: ${error}`)
return
}
- // 打印正常输出
+ // Print normal output
console.log(`stdout: ${stdout}`)
- // 如果有错误输出,也打印出来
+ // If there is error output, print it out too
console.error(`stderr: ${stderr}`)
})
diff --git a/main/manager-mobile/src/App.vue b/main/manager-mobile/src/App.vue
index d31d32d79..275bbbda7 100644
--- a/main/manager-mobile/src/App.vue
+++ b/main/manager-mobile/src/App.vue
@@ -1,78 +1,23 @@
-
-
+
+
-
+
-
+
{
@refresherrefresh="onRefresh"
@scrolltolower="onLoadMore"
>
-
+
{
v-else-if="currentTab === 'voiceprint-management'"
ref="voiceprintRef"
:agent-id="currentAgentId"
- @update-refresher-enabled="updateRefresherEnabled"
/>
diff --git a/main/manager-mobile/src/pages/agent/provider.vue b/main/manager-mobile/src/pages/agent/provider.vue
index 47bd56e0b..61af2c72c 100644
--- a/main/manager-mobile/src/pages/agent/provider.vue
+++ b/main/manager-mobile/src/pages/agent/provider.vue
@@ -2,25 +2,29 @@
{
"layout": "default",
"style": {
- "navigationBarTitleText": "编辑源",
+ "navigationBarTitleText": "Edit Sources",
"navigationStyle": "custom"
}
}
-
+
{
-
+
-
+
- {{ t('agent.tools.builtInPlugins') }}
+ Built-in Plugins
-
+
-
+
-
+
@@ -311,7 +307,7 @@ onMounted(async () => {
v-if="notSelectedList.length === 0"
class="h-[400rpx] flex items-center justify-center"
>
-
+
{
-
+
-
+
{
{{ func.name }}
- {{ t('agent.tools.clickToConfigure') }}
+ Click to configure parameters
-
+
{
⚙
-
+
{
-
+
- {{ t('agent.tools.mcpEndpoint') }}
+ MCP Access Point
{
class="ml-[20rpx] h-[70rpx] flex items-center justify-center rounded-[10rpx] bg-[#1677ff] px-[20rpx] text-[24rpx] text-white"
@click="copyMcpAddress"
>
- {{ t('agent.tools.copy') }}
+ Copy
-
+
-
+
@@ -442,10 +438,10 @@ onMounted(async () => {
-
+
@@ -455,7 +451,7 @@ onMounted(async () => {
:style="{ height: 'calc(75vh - 60rpx)' }"
>
-
+
- {{ currentFunction?.name }} {{ t('agent.tools.noParamsNeeded') }}
+ {{ currentFunction?.name }} requires no parameter configuration
-
+
{
class="border border-[#eeeeee] rounded-[20rpx] bg-white p-[30rpx]"
style="box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.04);"
>
-
+
{{ field.label }}
@@ -486,57 +482,57 @@ onMounted(async () => {
-
+
-
+
-
+
- {{ t('agent.tools.eachLineOneItem') }}
+ Enter one item per line
-
+
- {{ t('agent.tools.pleaseInputValidJson') }}
+ Please enter valid JSON format
-
+
{
"
>
-
+
- {{ t('agent.tools.enableFunction') }}
+ Enable function
- {{ t('agent.tools.toggleFunction') }}
+ Turn this function on or off
{
/>
-
+
{
-
-
diff --git a/main/manager-mobile/src/pages/chat-history/detail.vue b/main/manager-mobile/src/pages/chat-history/detail.vue
index ae2d3d41e..c70233f48 100644
--- a/main/manager-mobile/src/pages/chat-history/detail.vue
+++ b/main/manager-mobile/src/pages/chat-history/detail.vue
@@ -3,7 +3,7 @@
"layout": "default",
"style": {
"navigationStyle": "custom",
- "navigationBarTitleText": "聊天详情"
+ "navigationBarTitleText": "Chat Details"
}
}
@@ -13,15 +13,14 @@ import type { ChatMessage, UserMessageContent } from '@/api/chat-history/types'
import { onLoad, onUnload } from '@dcloudio/uni-app'
import { computed, ref } from 'vue'
import { getAudioId, getChatHistory } from '@/api/chat-history/chat-history'
-import { t } from '@/i18n'
-import { debounce, getEnvBaseUrl } from '@/utils'
+import { getEnvBaseUrl } from '@/utils'
import { toast } from '@/utils/toast'
defineOptions({
name: 'ChatDetail',
})
-// 获取屏幕边界到安全区域距离
+// Get distance from screen boundary to safe area
let safeAreaInsets: any
let systemInfo: any
@@ -42,36 +41,36 @@ systemInfo = uni.getSystemInfoSync()
safeAreaInsets = systemInfo.safeAreaInsets
// #endif
-// 页面参数
+// Page parameters
const sessionId = ref('')
const agentId = ref('')
-// 智能体信息(简化)
+// Agent information (simplified)
const currentAgent = computed(() => {
return {
id: agentId.value,
- agentName: t('chatHistory.assistantName'),
+ agentName: 'AI Assistant',
}
})
-// 聊天数据
+// Chat data
const messageList = ref([])
const loading = ref(false)
-// 音频播放相关
+// Audio playback related
const audioContext = ref(null)
const playingAudioId = ref(null)
const expandedToolResults = ref({})
-// 返回上一页
+// Return to previous page
function goBack() {
uni.navigateBack()
}
-// 加载聊天记录
+// Load chat records
async function loadChatHistory() {
if (!sessionId.value || !agentId.value) {
- console.error('缺少必要参数')
+ console.error('Missing required parameters')
return
}
@@ -81,15 +80,15 @@ async function loadChatHistory() {
messageList.value = response
}
catch (error) {
- console.error('获取聊天记录失败:', error)
- toast.error(t('chatHistory.loadFailed'))
+ console.error('Failed to get chat history:', error)
+ toast.error('Failed to get chat history')
}
finally {
loading.value = false
}
}
-// 解析用户消息内容
+// Parse user message content
function parseUserMessage(content: string): UserMessageContent | null {
try {
return JSON.parse(content)
@@ -99,31 +98,31 @@ function parseUserMessage(content: string): UserMessageContent | null {
}
}
-// 获取消息显示内容
+// Get message display content
function getMessageContent(message: ChatMessage): string {
if (message.chatType === 1) {
- // 用户消息,需要解析JSON
+ // User message, need to parse JSON
const parsed = parseUserMessage(message.content)
return parsed ? parsed.content : message.content
}
else {
- // AI消息,直接显示
+ // AI message, display directly
return message.content
}
}
-// 获取说话人名称
+// Get speaker name
function getSpeakerName(message: ChatMessage): string {
if (message.chatType === 1) {
const parsed = parseUserMessage(message.content)
- return parsed ? parsed.speaker : t('chatHistory.userName')
+ return parsed ? parsed.speaker : 'User'
}
else {
- return currentAgent.value?.agentName || t('chatHistory.aiAssistantName')
+ return currentAgent.value?.agentName || 'AI Assistant'
}
}
-// 格式化时间
+// Format time
function formatTime(timeStr: string) {
if (!timeStr)
return t('chatHistory.unknownTime')
@@ -171,41 +170,36 @@ function formatTime(timeStr: string) {
return `${year}-${month}-${day}`
}
-// 播放音频
-const playAudio = debounce(async (audioId: string) => {
+// Play audio
+async function playAudio(audioId: string) {
if (!audioId) {
- toast.error(t('chatHistory.invalidAudioId'))
+ toast.error('Invalid audio ID')
return
}
try {
- // 如果正在播放其他音频,先停止
+ // If playing other audio, stop first
if (audioContext.value) {
audioContext.value.stop()
- }
- // 如果当前音频ID与请求ID相同暂停播放
- if (playingAudioId.value === audioId) {
- playingAudioId.value = null
- return
+ audioContext.value.destroy()
+ audioContext.value = null
}
- // 获取音频下载ID
+ // Get audio download ID
const downloadId = await getAudioId(audioId)
- // 构造音频播放地址
+ // Construct audio playback URL
const baseUrl = getEnvBaseUrl()
const audioUrl = `${baseUrl}/agent/play/${downloadId}`
- // 创建音频上下文
- if (!audioContext.value) {
- audioContext.value = uni.createInnerAudioContext()
- }
+ // Create audio context
+ audioContext.value = uni.createInnerAudioContext()
audioContext.value.src = audioUrl
- // 设置播放状态
+ // Set playback status
playingAudioId.value = audioId
- // 监听播放完成
+ // Listen for playback completion
audioContext.value.onEnded(() => {
playingAudioId.value = null
if (audioContext.value) {
@@ -214,10 +208,10 @@ const playAudio = debounce(async (audioId: string) => {
}
})
- // 监听播放错误
+ // Listen for playback errors
audioContext.value.onError((error) => {
- console.error('音频播放失败:', error)
- toast.error(t('chatHistory.audioPlayFailed'))
+ console.error('Audio playback failed:', error)
+ toast.error('Audio playback failed')
playingAudioId.value = null
if (audioContext.value) {
audioContext.value.destroy()
@@ -225,15 +219,15 @@ const playAudio = debounce(async (audioId: string) => {
}
})
- // 开始播放
+ // Start playback
audioContext.value.play()
}
catch (error) {
- console.error('播放音频失败:', error)
- toast.error(t('chatHistory.playAudioFailed'))
+ console.error('Audio playback failed:', error)
+ toast.error('Audio playback failed')
playingAudioId.value = null
}
-}, 400)
+}
function extractContentFromString(content: string) {
if (!content || content.trim() === '') {
@@ -287,8 +281,8 @@ onLoad((options) => {
agentId.value = options.agentId
}
else {
- console.error('缺少必要参数')
- toast.error(t('chatHistory.parameterError'))
+ console.error('Missing required parameters')
+ toast.error('Page parameter error')
}
})
@@ -308,17 +302,17 @@ onUnload(() => {
-
+
-
-
+
+
-
+
{
- {{ t('chatHistory.loading') }}
+ Loading...
@@ -351,7 +345,7 @@ onUnload(() => {
'tool-message': message.chatType === 3,
}"
>
-
+
-
+
{{ getMessageContent(message) }}
@@ -419,7 +413,7 @@ onUnload(() => {
-
+
-
+
@@ -198,9 +198,9 @@ defineExpose({
-
+
-
+
- {{ t('chatHistory.totalChats', { count: session.chatCount }) }}
+ {{ session.chatCount }} messages
@@ -229,23 +229,23 @@ defineExpose({
-
+
- {{ t('chatHistory.loading') }}
+ Loading...
-
+
- {{ t('chatHistory.noMoreData') }}
+ No more data
-
+
diff --git a/main/manager-mobile/src/pages/device-config/components/ultrasonic-config.vue b/main/manager-mobile/src/pages/device-config/components/ultrasonic-config.vue
index af8d9acf2..b4a32b974 100644
--- a/main/manager-mobile/src/pages/device-config/components/ultrasonic-config.vue
+++ b/main/manager-mobile/src/pages/device-config/components/ultrasonic-config.vue
@@ -1,9 +1,8 @@
-
+
- {{ t('deviceConfig.selectedNetwork') }}: {{ props.selectedNetwork.ssid }}
+ Selected network: {{ props.selectedNetwork.ssid }}
- {{ t('deviceConfig.signal') }}: {{ props.selectedNetwork.rssi }}dBm
+ Signal: {{ props.selectedNetwork.rssi }}dBm
- {{ props.selectedNetwork.authmode === 0 ? t('deviceConfig.openNetwork') : t('deviceConfig.encryptedNetwork') }}
+ {{ props.selectedNetwork.authmode === 0 ? 'Open network' : 'Encrypted network' }}
- {{ t('deviceConfig.password') }}: {{ '*'.repeat(props.password.length) }}
+ Password: {{ '*'.repeat(props.password.length) }}
-
+
- {{ generating ? t('deviceConfig.generating') : '🎵 ' + t('deviceConfig.generateAndPlaySoundWave') }}
-
+ {{ generating ? 'Generating...' : '🎵 Generate and play sound wave' }}
+
-
- {{ playing ? t('deviceConfig.playing') : '🔊 ' + t('deviceConfig.playSoundWave') }}
-
+
+ {{ playing ? 'Playing...' : '🔊 Play sound wave' }}
+
-
- ⏹️ {{ t('deviceConfig.stopPlaying') }}
-
+
+ ⏹️ Stop playback
+
-
+
-
- {{ t('deviceConfig.autoLoopPlaySoundWave') }}
-
-
+
+ Auto loop sound wave playback
+
+
-
+
- {{ t('deviceConfig.configAudioFile') }}
+ Network config audio file
- {{ t('deviceConfig.duration') }}: {{ audioLengthText }}
+ Duration: {{ audioLengthText }}
-
+
-
- {{ t('deviceConfig.ultrasonicConfigInstructions') }}
-
-
-
- 1. {{ t('deviceConfig.ensureWifiNetworkSelectedAndPasswordEntered') }}
-
-
- 2. {{ t('deviceConfig.clickGenerateAndPlaySoundWave') }}
-
-
- 3. {{ t('deviceConfig.bringPhoneCloseToXiaozhiDevice') }}
-
-
- 4. {{ t('deviceConfig.duringAudioPlaybackXiaozhiWillReceive') }}
-
-
- 5. {{ t('deviceConfig.afterConfigSuccessDeviceWillConnect') }}
-
-
- {{ t('deviceConfig.usesAfskModulation') }}
-
-
- {{ t('deviceConfig.ensureModeratePhoneVolume') }}
-
-
+
+ Ultrasonic Network Configuration Instructions
+
+
+ • If configuration fails, please check if WiFi password is correct network is selected and password is entered
+
+
+ 2. Click generate and play sound wave, system will encode network config info as audio
+
+
+ 3. Place phone close to device so device can hear the audio signal (distance 1-2 meters)
+
+
+ 4. During audio playback, device will receive and decode network config info
+
+
+ 5. Device will automatically connect to WiFi network after receiving signal
+
+
+ Using AFSK modulation technology, transmitting data through 1800Hz and 1500Hz frequencies
+
+
+ • Please ensure phone volume is set to moderate level, avoiding environmental noise interference
+
+
+
-
diff --git a/main/manager-mobile/src/pages/forgot-password/index.vue b/main/manager-mobile/src/pages/forgot-password/index.vue
index f574d0e91..061572ce2 100644
--- a/main/manager-mobile/src/pages/forgot-password/index.vue
+++ b/main/manager-mobile/src/pages/forgot-password/index.vue
@@ -3,7 +3,7 @@
"layout": "default",
"style": {
"navigationStyle": "custom",
- "navigationBarTitleText": "ForgotPassword"
+ "navigationBarTitleText": "Forgot Password"
}
}
@@ -14,17 +14,17 @@ import { onLoad } from "@dcloudio/uni-app";
import { useConfigStore } from "@/store";
import { getEnvBaseUrl, sm2Encrypt } from "@/utils";
import { toast } from "@/utils/toast";
-// 导入国际化相关功能
+// Import i18n helpers.
import { t, initI18n } from "@/i18n";
-// 导入API接口
+// Import API methods.
import { retrievePassword, sendSmsCode } from "@/api/auth";
-// 获取屏幕边界到安全区域距离
+// Get the safe-area inset from the screen bounds.
let safeAreaInsets;
let systemInfo;
// #ifdef MP-WEIXIN
-// 微信小程序使用新的API
+// WeChat Mini Program uses the newer window API.
systemInfo = uni.getWindowInfo();
safeAreaInsets = systemInfo.safeArea
? {
@@ -37,12 +37,12 @@ safeAreaInsets = systemInfo.safeArea
// #endif
// #ifndef MP-WEIXIN
-// 其他平台继续使用uni API
+// Other platforms continue to use the classic uni API.
systemInfo = uni.getSystemInfoSync();
safeAreaInsets = systemInfo.safeAreaInsets;
// #endif
-// 表单数据
+// Form data model.
interface ForgotPasswordData {
mobile: string;
captcha: string;
@@ -60,21 +60,21 @@ const formData = ref({
mobileCaptcha: "",
newPassword: "",
confirmPassword: "",
- areaCode: "+86",
+ areaCode: "+1",
});
-// 验证码图片
+// Captcha image.
const captchaImage = ref("");
const loading = ref(false);
-// 获取配置store
+// Load public configuration from the store.
const configStore = useConfigStore();
// State for area code action sheet
const showAreaCodeSheet = ref(false);
-const selectedAreaCode = ref("+86");
+const selectedAreaCode = ref("+1");
const areaCodeList = computed(() =>
- (configStore.config.mobileAreaList || []).map((item) => {
+ (configStore.config.mobileAreaList || [{ name: "United States", key: "+1" }]).map((item) => {
return {
value: item.key,
label: `${item.name} (${item.key})`,
@@ -82,39 +82,43 @@ const areaCodeList = computed(() =>
})
);
+function isValidMobileNumber(value: string) {
+ const normalized = value.replace(/\D/g, "");
+ return normalized.length >= 4 && normalized.length <= 15;
+}
+
const canSendMobileCaptcha = computed(() => {
const mobile = formData.value.mobile;
- const phoneRegex = /^1[3-9]\d{9}$/;
- return phoneRegex.test(mobile) && smsCountdown.value === 0;
+ return isValidMobileNumber(mobile) && smsCountdown.value === 0;
});
-// SM2公钥
+// SM2 public key.
const sm2PublicKey = computed(() => {
return configStore.config.sm2PublicKey;
});
-// 短信验证码倒计时
+// SMS verification countdown.
const smsCountdown = ref(0);
const smsLoading = ref(false);
-// 打开区号选择弹窗
+// Open the area-code picker.
function openAreaCodeSheet() {
showAreaCodeSheet.value = true;
}
-// 选择区号
+// Select an area code.
function selectAreaCode(item: { value: string; label: string }) {
selectedAreaCode.value = item.value;
formData.value.areaCode = item.value;
showAreaCodeSheet.value = false;
}
-// 关闭区号选择弹窗
+// Close the area-code picker.
function closeAreaCodeSheet() {
showAreaCodeSheet.value = false;
}
-// 生成UUID
+// Generate a UUID for the captcha request.
function generateUUID() {
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => {
const r = (Math.random() * 16) | 0;
@@ -123,18 +127,17 @@ function generateUUID() {
});
}
-// 获取图形验证码
+// Refresh the image captcha.
async function refreshCaptcha() {
const uuid = generateUUID();
formData.value.captchaId = uuid;
captchaImage.value = `${getEnvBaseUrl()}/user/captcha?uuid=${uuid}&t=${Date.now()}`;
}
-// 发送短信验证码
+// Send the SMS verification code.
async function handleSendSmsCode() {
- // 手机号格式验证
- const phoneRegex = /^1[3-9]\d{9}$/;
- if (!phoneRegex.test(formData.value.mobile)) {
+ // Validate the phone number format.
+ if (!isValidMobileNumber(formData.value.mobile)) {
toast.warning(t("retrievePassword.inputCorrectMobile"));
return;
}
@@ -146,9 +149,9 @@ async function handleSendSmsCode() {
try {
smsLoading.value = true;
- // 将手机号转换为国际格式
+ // Convert the phone number into international format.
const internationalPhone = formData.value.areaCode + formData.value.mobile;
- // 调用发送短信验证码API
+ // Call the SMS code endpoint.
await sendSmsCode({
phone: internationalPhone,
captcha: formData.value.captcha,
@@ -157,7 +160,7 @@ async function handleSendSmsCode() {
toast.success(t("retrievePassword.captchaSendSuccess"));
- // 开始倒计时
+ // Start the countdown timer.
smsCountdown.value = 60;
const timer = setInterval(() => {
smsCountdown.value--;
@@ -166,33 +169,32 @@ async function handleSendSmsCode() {
}
}, 1000);
} catch (error: any) {
- // 处理验证码错误
- if (error.message.includes("请求错误[10067]")) {
+ // Handle captcha validation errors.
+ if (error.message.includes("10067")) {
toast.warning(t("login.captchaError"));
}
- // 发送失败重新获取图形验证码
+ // Refresh the image captcha after a failed send.
refreshCaptcha();
} finally {
smsLoading.value = false;
}
}
-// 重置密码
+// Submit the password reset request.
async function handleResetPassword() {
- // 表单验证
+ // Validate the form.
if (!formData.value.mobile) {
toast.warning(t("retrievePassword.mobileRequired"));
return;
}
- // 手机号格式验证
- const phoneRegex = /^1[3-9]\d{9}$/;
- if (!phoneRegex.test(formData.value.mobile)) {
+ // Validate the phone number format.
+ if (!isValidMobileNumber(formData.value.mobile)) {
toast.warning(t("retrievePassword.inputCorrectMobile"));
return;
}
- // 将手机号转换为国际格式
+ // Convert the phone number into international format.
const internationalPhone = formData.value.areaCode + formData.value.mobile;
if (!formData.value.captcha) {
@@ -223,25 +225,25 @@ async function handleResetPassword() {
try {
loading.value = true;
- // 检查SM2公钥是否配置
+ // Ensure the SM2 public key is configured.
if (!sm2PublicKey.value) {
toast.warning(t("sm2.publicKeyNotConfigured"));
return;
}
- // 加密密码
+ // Encrypt the password before sending it.
let encryptedPassword;
try {
- // 拼接图形验证码和新密码进行加密
+ // Concatenate captcha and new password before encryption.
const captchaAndPassword = formData.value.captcha + formData.value.newPassword;
encryptedPassword = sm2Encrypt(sm2PublicKey.value, captchaAndPassword);
} catch (error) {
- console.error("密码加密失败:", error);
+ console.error("Password encryption failed:", error);
toast.warning(t("sm2.encryptionFailed"));
return;
}
- // 调用重置密码API
+ // Call the password reset API.
await retrievePassword({
phone: internationalPhone,
code: formData.value.mobileCaptcha,
@@ -251,46 +253,46 @@ async function handleResetPassword() {
toast.success(t("retrievePassword.passwordUpdateSuccess"));
- // 跳转到登录页
+ // Redirect back to the login page.
setTimeout(() => {
uni.redirectTo({
url: "/pages/login/index",
});
}, 1000);
} catch (error: any) {
- // 处理验证码错误
- if (error.message.includes("请求错误[10067]")) {
+ // Handle captcha validation errors.
+ if (error.message.includes("10067")) {
toast.warning(t("login.captchaError"));
}
- // 重置失败重新获取验证码
+ // Refresh the captcha after a failed reset.
refreshCaptcha();
} finally {
loading.value = false;
}
}
-// 返回登录
+// Return to the login page.
function goBack() {
uni.redirectTo({
url: "/pages/login/index",
});
}
-// 页面加载时获取验证码
+// Fetch the captcha when the page loads.
onLoad(() => {
refreshCaptcha();
});
-// 组件挂载时确保配置已加载
+// Ensure configuration and i18n are loaded on mount.
onMounted(async () => {
if (!configStore.config.name) {
try {
await configStore.fetchPublicConfig();
} catch (error) {
- console.error("获取配置失败:", error);
+ console.error("Failed to fetch configuration:", error);
}
}
- // 初始化国际化
+ // Initialize i18n for the current locale.
initI18n();
});
@@ -317,7 +319,7 @@ onMounted(async () => {
-
+
@@ -339,7 +341,7 @@ onMounted(async () => {
-
+
{
-
+
{
-
+
{
-
+
{
-
+
{{ loading ? t("common.loading") : t("retrievePassword.resetButton") }}
-
+
{{ t("retrievePassword.goToLogin") }}
@@ -419,7 +421,7 @@ onMounted(async () => {
-
+
{
}
}
-// 区号选择弹窗样式
+// Area code selection sheet styles.
.area-code-sheet {
background: #ffffff;
border-radius: 24rpx 24rpx 0 0;
diff --git a/main/manager-mobile/src/pages/index/index.vue b/main/manager-mobile/src/pages/index/index.vue
index 21aba9ce1..c09638399 100644
--- a/main/manager-mobile/src/pages/index/index.vue
+++ b/main/manager-mobile/src/pages/index/index.vue
@@ -1,35 +1,33 @@
-
+
{
"layout": "tabbar",
"style": {
- // 'custom' 表示开启自定义导航栏,默认 'default'
+ // 'custom' means enable custom navigation bar, default is 'default'
"navigationStyle": "custom",
- "navigationBarTitleText": "首页"
+ "navigationBarTitleText": "Home"
}
}
-
+
- {{ t('home.greeting') }}
+ Hello, XiaoZhi
- {{ t('home.subtitle') }}
- {{ t('home.wonderfulDay') }}
-
+ Let's have a wonderful day!
+
+
+ Hello, Let's have a wonderful day!
-
+
-
+
-
+
@@ -222,10 +214,10 @@ onMounted(() => {
- {{ t('home.languageModel') }}: {{ agent.llmModelName }}
+ Language Model: {{ agent.llmModelName }}
- {{ t('home.voiceModel') }}: {{ agent.ttsModelName }} ({{ agent.ttsVoiceName }})
+ Voice Model: {{ agent.ttsModelName }} ({{ agent.ttsVoiceName }})
@@ -233,18 +225,15 @@ onMounted(() => {
- {{ t('home.deviceManagement') }}({{ agent.deviceCount }})
+ Device Management({{ agent.deviceCount }})
- {{ t('home.lastConversation') }}{{ formatTime(agent.lastConnectedAt) }}
+ Last Conversation: {{ formatTime(agent.lastConnectedAt) }}
-
- {{ agent.tags.map(tag => tag.tagName).join(',') }}
-
@@ -256,7 +245,7 @@ onMounted(() => {
- {{ t('home.delete') }}
+ Delete
@@ -264,23 +253,23 @@ onMounted(() => {
-
+
- {{ t('home.emptyState') }}
+ No agents yet
- {{ t('home.createFirstAgent') }}
+ Click the + button in the bottom right to create your first agent
-
+
-
+
@@ -385,7 +374,7 @@ onMounted(() => {
}
}
-// 内容区域开始标识,创建白色背景过渡
+// Content area start marker, create white background transition
.content-section-header {
background: #ffffff;
border-radius: 32rpx 32rpx 0 0;
@@ -395,7 +384,7 @@ onMounted(() => {
z-index: 1;
}
-// z-paging内容区域样式
+// z-paging content area styles
:deep(.z-paging-content) {
background: #ffffff;
padding: 0 0 40rpx 0;
@@ -435,7 +424,6 @@ onMounted(() => {
.card-main {
flex: 1;
- width: 100%;
}
.agent-title {
@@ -468,9 +456,7 @@ onMounted(() => {
}
.stats-row {
- width: 100%;
display: flex;
- align-items: center;
gap: 12rpx;
flex-wrap: wrap;
diff --git a/main/manager-mobile/src/pages/login/index.vue b/main/manager-mobile/src/pages/login/index.vue
index adaf5fb36..cbfec9a31 100644
--- a/main/manager-mobile/src/pages/login/index.vue
+++ b/main/manager-mobile/src/pages/login/index.vue
@@ -10,22 +10,18 @@
-
-
-
-
-
-
-
-
-
-
-
-
- {{ t('login.privacyPolicy') }}
-
-
-
-
- 更新日期:2026年3月10日
-
-
-
-
- 引言
-
-
-
-
- 欢迎您使用小智后端服务(以下简称"本服务")。本服务的运营方为本服务的实际部署者和管理者(以下简称"运营者"或"我们")。我们深知个人信息对您的重要性,将尽全力保护您的个人信息安全。
-
-
-
-
- 请您在使用本服务前,仔细阅读并充分理解本隐私政策的全部内容。一旦您开始使用本服务,即表示您已阅读并同意本隐私政策。
-
-
-
-
- 本隐私政策适用于您通过智控台(管理后台)、API接口及其他方式使用本服务时,我们对您个人信息的收集、存储、使用、共享、保护等行为。
-
-
-
-
- 一、我们收集的信息
-
-
-
-
- 为向您提供服务,我们可能需要收集以下信息:
-
-
-
-
- 1.1 账号注册信息:当您注册账号时,我们会收集您的手机号码或用户名、密码等信息,用于创建和验证您的账号。
-
-
-
-
- 1.2 设备信息:当您绑定硬件设备时,我们会收集设备的标识信息(如设备编码、MAC地址等)、设备型号、固件版本等,用于设备管理和服务提供。
-
-
-
-
- 1.3 智能体配置信息:当您创建和配置智能体时,我们会收集您设定的角色模板、语言模型选择、语音参数配置等信息,用于提供个性化的AI交互服务。
-
-
-
-
- 1.4 语音交互数据:在您使用语音交互功能时,本服务会通过语音活动检测(VAD)判断您的语音起止状态,并处理您的语音输入数据,将其传输至第三方语音识别(ASR)和语言模型(LLM)服务进行处理,以实现语音交互功能。
-
-
-
-
- 1.5 图像数据:当您使用视觉模型功能时,我们可能会处理您通过设备摄像头采集的图像数据,并将其传输至第三方视觉模型服务进行分析和理解,用于实现图像识别、场景理解等功能。
-
-
-
-
- 1.6 对话记忆数据:当您开启记忆功能时,本服务会存储您与智能体的交互历史摘要,用于在后续对话中提供更连贯、个性化的交互体验。
-
-
-
-
- 1.7 知识库数据:当您使用知识库功能时,我们会收集和存储您上传的文档、文本等知识库内容,用于智能体在对话中进行知识检索和问答。
-
-
-
-
- 1.8 声纹数据:当您使用声纹识别功能时,我们会收集和存储您的声纹特征样本,用于说话人身份验证和个性化服务。
-
-
-
-
- 1.9 聊天历史数据:我们会存储您与智能体的对话历史记录,包括文本对话内容、对话时间、交互上下文等信息,用于提供连续性对话体验和历史查询功能。
-
-
-
-
- 1.10 对话音频数据:在您使用语音交互功能时,我们可能会存储您与智能体交互的音频数据,用于优化语音交互质量和回溯查询。
-
-
-
-
- 1.11 智能体配置数据:当您配置智能体时,我们会收集您设定的标签、插件配置、上下文提供者设置等信息,用于提供智能体定制化服务。
-
-
-
-
- 1.12 设备固件数据:当您使用OTA升级功能时,我们会记录设备固件版本、升级历史等信息,用于设备管理和固件追溯。
-
-
-
-
- 1.13 日志信息:当您使用本服务时,我们会自动收集服务日志信息,包括但不限于访问时间、IP地址、浏览器类型、操作记录等,用于服务运维和安全保障。
-
-
-
-
- 1.14 验证码信息:当您使用手机号登录时,我们会通过短信服务向您发送验证码,用于身份验证。
-
-
-
-
- 二、我们如何使用收集的信息
-
-
-
-
- 我们收集的信息将用于以下目的:
-
-
-
-
- (1)提供、维护和改进本服务,包括账号管理、设备管理、智能体配置等核心功能。
-
-
-
-
- (2)处理您的语音交互请求,通过语音活动检测(VAD)识别语音输入,调用第三方AI模型服务完成语音识别、意图识别、语义理解和语音合成。
-
-
-
-
- (3)处理您的图像数据,调用第三方视觉模型服务完成图像识别和场景理解。
-
-
-
-
- (4)存储和管理您的对话记忆数据,以便在后续交互中提供更连贯的服务体验。
-
-
-
-
- (5)存储和检索您上传的知识库内容,以便智能体在对话中为您提供更准确的知识问答。
-
-
-
-
- (6)保障服务的安全性和稳定性,包括身份验证、安全防护、故障排查等。
-
-
-
-
- (7)遵守适用的法律法规和监管要求。
-
-
-
-
- 我们不会将您的个人信息用于与上述目的无关的其他用途。如需将信息用于本隐私政策未载明的其他目的,我们会事先征得您的同意。
-
-
-
-
- 三、信息的共享与披露
-
-
-
-
- 我们不会向第三方出售您的个人信息。仅在以下情形下,我们可能会共享或披露您的信息:
-
-
-
-
- 3.1 第三方服务调用:为实现语音交互、视觉理解等功能,您的语音数据、图像数据和文本内容可能会被传输至第三方AI服务提供商(如语言模型、语音识别、语音合成、视觉模型服务商)进行处理。我们会选择具备合理安全保障能力的服务商,但请您知悉第三方服务商将按照其自身的隐私政策处理相关数据。
-
-
-
-
- 3.2 法律要求:根据适用的法律法规、法律程序或政府主管部门的要求,我们可能需要披露您的个人信息。
-
-
-
-
- 3.3 安全保障:为保护运营者、其他用户或公众的权益、财产或安全免遭损害,在合理必要的范围内使用或披露个人信息。
-
-
-
-
- 3.4 征得同意:在获得您明确同意的前提下,我们可能会与第三方共享您的个人信息。
-
-
-
-
- 四、信息的存储与保护
-
-
-
-
- 4.1 存储地点:您的个人信息将存储在运营者部署本服务的服务器上,包括但不限于数据库(MySQL/PostgreSQL)和缓存服务(Redis)。
-
-
-
-
- 4.2 存储期限:我们将在为您提供服务所必需的期限内保留您的个人信息。当您注销账号后,我们将在合理时间内删除或匿名化处理您的个人信息,法律法规另有规定的除外。
-
-
-
-
- 4.3 安全措施:我们采取合理的技术和管理措施保护您的个人信息安全,包括但不限于数据加密、访问控制、安全审计等。但请您理解,互联网并非绝对安全的环境,我们无法保证信息传输和存储的绝对安全性。
-
-
-
-
- 4.4 安全事件处理:如发生个人信息安全事件,我们将按照法律法规的要求,及时向您告知安全事件的基本情况、可能的影响、已采取或将要采取的处置措施等。
-
-
-
-
- 4.5 开源项目特别说明:本服务为开源项目,存在两种运营模式:
-
-
-
-
- (1)自行部署:如您自行部署本服务,运营者仅为代码提供方,实际的数据存储和处理由您自行负责。
-
-
-
-
- (2)测试平台:如您使用运营者部署的测试平台,您的数据将由运营人员负责管理和保护。
-
-
-
-
- 4.6 数据跨境传输:本服务在提供智能交互功能时,可能需要调用境外第三方AI服务提供商的接口。
-
-
-
-
- 五、您的权利
-
-
-
-
- 5.1 查询与访问:您可通过智控台查看和管理您的账号信息、设备信息、智能体配置等个人信息。
-
-
-
-
- 5.2 更正与修改:当您发现个人信息有误时,您可通过智控台自行更正,或联系运营者协助处理。
-
-
-
-
- 5.3 删除:在以下情形下,您可请求我们删除您的个人信息:(1)处理目的已实现、无法实现或不再必要;(2)我们违反法律法规或与您的约定收集、使用个人信息;(3)注销账号。
-
-
-
-
- 5.4 账号注销:您可通过智控台的账号设置功能注销账号,或联系运营者进行处理。
-
-
-
-
- 5.5 撤回同意:您可随时撤回您此前向我们作出的同意授权。
-
-
-
-
- 六、未成年人信息保护
-
-
-
-
- 6.1 我们高度重视未成年人个人信息的保护。若您是未满18周岁的未成年人,请在监护人的指导和同意下使用本服务。
-
-
-
-
- 6.2 如果监护人发现未成年人未经其同意向我们提供了个人信息,请联系运营者,我们将尽快删除相关信息。
-
-
-
-
- 6.3 对于经监护人同意使用本服务的未成年人,我们将按照法律法规的规定,给予其个人信息更严格的保护。
-
-
-
-
- 七、第三方服务说明
-
-
-
-
- 7.1 本服务在提供智能交互功能时,需要调用第三方服务,包括但不限于:语音活动检测服务(VAD)、语音识别服务(ASR)、大语言模型服务(LLM)、语音合成服务(TTS)、视觉模型服务、短信验证码服务、MQTT消息代理服务、数据库服务。
-
-
-
-
- 7.2 上述第三方服务提供商将按照其各自的隐私政策对数据进行处理。我们建议您在使用本服务前,了解相关第三方服务商的隐私政策。
-
-
-
-
- 八、Cookie及类似技术的使用
-
-
-
-
- 8.1 本服务可能使用Cookie及类似技术来保存您的登录状态、记录您的偏好设置等,以便为您提供更好的使用体验。
-
-
-
-
- 8.2 您可以通过浏览器设置管理Cookie。但请注意,如果禁用Cookie,可能会影响本服务的部分功能。
-
-
-
-
- 九、隐私政策的变更
-
-
-
-
- 9.1 我们可能会根据业务调整、法律法规变化等原因对本隐私政策进行修订。修订后的隐私政策将通过本平台公告等方式予以发布。
-
-
-
-
- 9.2 如您在隐私政策修订后继续使用本服务,则视为您已接受修订后的隐私政策。
-
-
-
-
- 十、信息安全提示
-
-
-
-
- 10.1 请勿在与AI的语音或文字交互中透露您的财产账户、银行卡号、信用卡号、密码、身份证号等敏感个人信息,否则由此带来的损失由您自行承担。
-
-
-
-
- 10.2 请妥善保管您的账号和密码,不要将账号信息告知他人或与他人共享账号。
-
-
-
-
- 10.3 如您发现个人信息可能被泄露,请及时联系运营者采取措施。
-
-
-
-
- 十一、适用法律
-
-
-
-
- 11.1 本隐私政策的制定、解释、执行及争议解决均适用中华人民共和国法律法规(为本隐私政策之目的,不包括港澳台地区法律)。
-
-
-
-
- 11.2 如本隐私政策的任何条款与中华人民共和国现行法律法规相抵触,以法律法规的规定为准,其余条款仍然有效。
-
-
-
-
-
-
diff --git a/main/manager-mobile/src/pages/login/user-agreement-zh.vue b/main/manager-mobile/src/pages/login/user-agreement-zh.vue
deleted file mode 100644
index e612a1876..000000000
--- a/main/manager-mobile/src/pages/login/user-agreement-zh.vue
+++ /dev/null
@@ -1,542 +0,0 @@
-
-{
- "layout": "default",
- "style": {
- "navigationStyle": "custom",
- "navigationBarTitleText": "用户协议"
- }
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ t('login.userAgreement') }}
-
-
-
-
- 更新日期:2026年3月10日
-
-
-
-
- 提示条款
-
-
-
-
- 欢迎您使用小智后端服务(以下简称"本服务")。本服务旨在为小智AI硬件设备提供后端服务支持,包括但不限于智能语音交互、视觉理解、意图识别、对话记忆、知识库问答、设备管理、智能体管理等功能。本服务的运营方为本服务的实际部署者和管理者(以下简称"运营者"或"我们")。
-
-
-
-
- 在您注册、登录或使用本服务之前,请您务必审慎阅读、充分理解本协议各条款内容,特别是以加粗形式提示您注意的可能与您利益有重大关系的条款,包括但不限于免责声明、责任限制等条款。
-
-
-
-
- 当您按照页面提示完成注册、登录或以其他方式使用本服务时,即表示您已充分阅读、理解并接受本协议的全部内容。如果您不同意本协议或其中任何条款,请立即停止使用本服务。
-
-
-
-
- 本协议可能根据实际情况进行更新和修订,修订后的协议将通过本平台公告等方式予以公示。修订后的协议自公示之日起生效,如您在协议修订后继续使用本服务,则视为您已接受修订后的协议。
-
-
-
-
-
- 一、定义
-
-
-
-
- 小智后端服务:指小智后端服务及其部署运行的后端服务系统,包括但不限于智控台(管理后台)、API接口、WebSocket通信服务等。
-
-
-
-
- 智控台:指本服务提供的Web管理界面,用于设备管理、智能体配置、用户管理等功能。
-
-
-
-
- 用户:指通过注册或其他方式使用本服务的自然人、法人或其他组织,以下简称"您"。
-
-
-
-
- 智能体:指在本服务中创建和配置的AI角色,包含语言模型、语音识别、语音合成、视觉理解、意图识别、对话记忆、知识库等能力的集合。
-
-
-
-
- 设备:指通过本服务进行连接和管理的ESP32等硬件设备。
-
-
-
-
-
- 二、协议范围
-
-
-
-
- 本协议是您与运营者之间关于使用本服务的法律协议。本协议适用于您通过智控台或其他方式使用本服务的全部行为。
-
-
-
-
- 本服务的源代码遵循相应的开源许可证。本协议约束您对本服务的使用行为,不影响开源许可证本身赋予您的权利。
-
-
-
-
-
- 三、账号注册与使用
-
-
-
-
- 3.1 用户资格:您确认,在使用本服务前,您应当具备中华人民共和国法律规定的与您行为相适应的民事行为能力。若您为未成年人,应在法定监护人的陪同和指导下使用本服务。
-
-
-
-
- 3.2 账号注册:您可通过手机号验证码或用户名密码等方式注册和登录本服务。您应当提供真实、准确、完整的注册信息,并及时更新。
-
-
-
-
- 3.3 账号安全:您应妥善保管您的账号和密码,因您的原因导致账号泄露或被他人冒用所产生的一切后果,由您自行承担。如发现账号存在安全隐患,请立即联系运营者。
-
-
-
-
- 3.4 账号使用限制:您的账号仅限您本人使用,未经运营者同意,不得以任何方式将账号转让、出租或借给第三方使用。
-
-
-
-
- 3.5 账号注销:如您需要注销账号,可通过智控台的账号设置功能进行操作,或联系运营者进行处理。账号注销后,相关数据将被删除且无法恢复,请谨慎操作。
-
-
-
-
-
- 四、服务内容
-
-
-
-
- 4.1 服务概述:本服务依托人工智能技术,通过API接口调用第三方生成式人工智能模型,为连接的硬件设备提供智能交互服务,包括但不限于语音活动检测(VAD)、语音识别(ASR)、语义理解(LLM)、语音合成(TTS)、视觉理解(VLLM)、意图识别(Intent)、对话记忆(Memory)、知识库(RAG)等。
-
-
-
-
- 4.2 智能体管理:您可通过智控台创建和配置智能体,包括设定角色模板、选择语言模型、配置语音参数、设置意图识别规则、管理知识库、开启对话记忆、配置智能体插件等。智能体的设定内容不得违反国家法律法规。
-
-
-
-
- 4.3 设备管理:您可通过智控台绑定和管理您的硬件设备,进行设备配置、固件更新、OTA远程升级等操作。您应确保所管理的设备为您合法拥有或已获得授权。
-
-
-
-
- 4.4 视觉理解:本服务支持通过设备摄像头采集图像,调用第三方视觉模型进行图像识别和场景理解。您应确保采集图像的行为符合相关法律法规,不得侵犯他人隐私。
-
-
-
-
- 4.5 意图识别:本服务可通过意图识别功能理解用户指令的意图,并据此触发相应的操作或服务,如控制智能设备、查询信息等。
-
-
-
-
- 4.6 对话记忆:本服务可记录和存储您与智能体的交互历史摘要,以便在后续对话中提供更连贯、个性化的交互体验。您可在智控台管理或清除记忆数据。
-
-
-
-
- 4.7 知识库:本服务支持您上传文档、文本等内容构建知识库,智能体可在对话中检索知识库内容为您提供问答服务。您应确保上传的知识库内容不侵犯第三方知识产权,且不包含违反法律法规的内容。
-
-
-
-
- 4.8 声纹识别:本服务支持声纹识别功能,您可注册声纹样本以实现说话人身份验证和个性化服务。声纹数据将用于身份验证目的。
-
-
-
-
- 4.9 语音克隆:本服务支持语音克隆功能,您可通过提供音频样本克隆自定义音色。克隆音色仅供您本人使用,不得用于仿冒他人或从事违法违规活动。
-
-
-
-
- 4.10 MCP接入点:本服务支持MCP(Model Context Protocol)协议,可作为MCP Server向外部提供工具调用能力,也可作为MCP Client调用外部MCP服务,实现与外部系统的标准化集成。
-
-
-
-
- 4.11 上下文提供者:本服务支持上下文提供者(Context Provider)功能,可从外部数据源获取实时信息,如天气、新闻、股票等,为智能体提供更丰富的知识来源。
-
-
-
-
- 4.12 MQTT协议:本服务支持MQTT(Message Queuing Telemetry Transport)协议,用于与物联网设备之间的消息通信。您可通过MQTT协议实现设备控制指令下发、设备状态监控等功能。
-
-
-
-
- 4.13 服务说明:本服务所依赖的第三方AI模型生成的对话、答复内容仅供参考,不构成任何专业建议。您不得将输出内容作为医疗、法律、金融等领域的专业建议。您根据输出内容所作的任何判断或决策,由您自行承担全部责任。
-
-
-
-
- 4.14 服务费用:本服务为免费开源项目,不向用户收取任何使用费用,仅提供调用第三方服务的平台能力,不涉及任何付费功能或增值服务。
-
-
-
-
- 本服务支持多种AI服务提供商,不同提供商的收费模式如下:
-
-
-
-
- (1)免费服务:部分服务商提供免费额度或完全免费的服务,如智谱AI(glm-4-flash等免费模型)、微软EdgeTTS语音合成等。
-
-
-
-
- (2)按量付费服务:部分服务商按API调用量计费,如OpenAI、阿里云智能语音、百度文心、讯飞等。您需要自行向第三方服务商支付相应费用,该等费用与本服务无关。
-
-
-
-
- (3)本地部署方案:本服务支持完全本地部署的AI方案,如FunASR语音识别、FishSpeech语音合成、Ollama本地大模型等。本地部署无需网络费用和API调用费用,但需要本地具备足够的计算资源。
-
-
-
-
- 4.15 服务变更:运营者保留根据实际情况对服务内容进行调整、升级或终止的权利,并将尽可能提前予以通知。
-
-
-
-
-
- 五、用户行为规范
-
-
-
-
- 5.1 合法使用:您在使用本服务时,应遵守中华人民共和国的法律法规及相关国际条约,不得利用本服务从事任何违法违规活动。
-
-
-
-
- 5.2 禁止行为:您承诺在使用本服务时不得实施以下行为:
-
-
-
-
- (1)发布、传输、存储危害国家安全、社会稳定的内容,包括但不限于涉及颠覆国家政权、损害国家荣誉和利益、煽动民族仇恨等内容。
-
-
-
-
- (2)发布、传输、存储侵犯他人合法权益的内容,包括但不限于侵犯知识产权、隐私权、名誉权等。
-
-
-
-
- (3)发布、传输、存储淫秽、色情、暴力、恐怖或教唆犯罪的内容。
-
-
-
-
- (4)发布虚假信息、散布谣言或从事欺诈行为。
-
-
-
-
- (5)以任何方式干扰本服务的正常运行,包括但不限于攻击服务器、传播恶意程序、恶意消耗系统资源等。
-
-
-
-
- (6)未经授权对本服务进行反向工程、反编译或其他试图获取系统源代码的行为(本条不限制您依据开源许可证对开源代码的合法使用)。
-
-
-
-
- (7)利用本服务进行自动化批量操作,恶意消耗API调用配额或其他系统资源。
-
-
-
-
- (8)在智能体设定中输入违反法律法规或社会公序良俗的内容。
-
-
-
-
- (9)利用本服务伤害或企图伤害未成年人。
-
-
-
-
- (10)其他违反法律法规、本协议约定或可能损害运营者及第三方合法权益的行为。
-
-
-
-
- 5.3 违规处理:如您违反上述行为规范,运营者有权视情节严重程度采取警告、限制功能、暂停服务、封禁账号等措施,并保留追究法律责任的权利。
-
-
-
-
-
- 六、知识产权
-
-
-
-
- 6.1 开源许可:本服务为开源项目,其源代码遵循相应的开源许可证。您可以在遵守该许可证条款的前提下使用相关源代码。
-
-
-
-
- 6.2 服务内容权属:除开源代码外,本服务中的界面设计、图标、文案及其他运营者独立创作的内容,其知识产权归运营者所有。
-
-
-
-
- 6.3 用户内容:您通过本服务输入、上传或生成的内容,其知识产权归属依照相关法律法规确定。您授予运营者为维护和改进服务之目的,对您输入内容进行存储和必要处理的权利。
-
-
-
-
- 6.4 第三方权益:您在使用本服务时,应尊重第三方的知识产权及其他合法权益。因您侵犯第三方权益而引发的纠纷,由您自行承担全部责任。
-
-
-
-
-
- 七、隐私保护
-
-
-
-
- 7.1 信息收集:为提供本服务,运营者可能会收集您的注册信息(如手机号、用户名)、设备信息、使用日志等。具体的个人信息收集和使用规则请参阅《隐私政策》。
-
-
-
-
- 7.2 信息保护:运营者将采取合理的技术和管理措施保护您的个人信息安全。但由于互联网的开放性,运营者不能绝对保证信息安全,请您注意保护个人敏感信息。
-
-
-
-
- 7.3 信息安全提示:请勿在使用本服务过程中向AI透露您的财产账户、银行卡、密码等敏感个人信息,否则由此带来的损失由您自行承担。
-
-
-
-
-
- 八、免责声明
-
-
-
-
- 8.1 AI生成内容:本服务依赖第三方AI模型提供智能交互能力,AI生成的内容可能存在不准确、不完整或不恰当之处。运营者不对AI生成内容的真实性、准确性、完整性作任何保证。
-
-
-
-
- 8.2 服务中断:因以下原因导致服务中断或异常,运营者不承担责任:
-
-
-
-
- (1)不可抗力因素,如自然灾害、疫情、战争等。
-
-
-
-
- (2)电力供应故障、通信网络故障等公共服务因素。
-
-
-
-
- (3)第三方AI模型服务商的服务故障或政策调整。
-
-
-
-
- (4)系统维护、升级导致的临时性服务中断。
-
-
-
-
- (5)黑客攻击、计算机病毒等网络安全事件。
-
-
-
-
- (6)法律法规或政府管制导致的服务调整。
-
-
-
-
- (7)其他非运营者过错导致的情形。
-
-
-
-
- 8.3 第三方服务:本服务可能涉及第三方提供的语言模型、语音识别、语音合成、视觉模型、意图识别等服务。您在使用时应同时遵守第三方的服务条款。因第三方服务引发的问题,请直接与第三方联系。
-
-
-
-
- 8.4 开源声明:本服务为开源项目,按"现状"提供。在法律允许的最大范围内,运营者不就本服务的适销性、特定用途适用性或不侵权性作任何明示或暗示的保证。
-
-
-
-
- 8.5 开源软件特别声明:本项目为开源软件,本服务与对接的任何第三方API服务商(包括但不限于语音识别、大模型、语音合成等平台)均不存在商业合作关系,不为其服务质量及资金安全提供任何形式的担保。本软件不托管任何账户密钥、不参与资金流转、不承担充值资金损失风险。
-
-
-
-
- 8.6 安全警告:本项目功能未完善,且未通过网络安全测评,请勿在生产环境中使用。如果您在公网环境中部署学习本项目,请务必做好必要的防护措施,包括但不限于设置强密码、限制访问权限、启用HTTPS加密传输等。
-
-
-
-
-
- 九、未成年人保护
-
-
-
-
- 9.1 若您是未满18周岁的未成年人,应在监护人的指导和同意下使用本服务。
-
-
-
-
- 9.2 监护人应加强对未成年人使用本服务的监督,引导未成年人合理使用,避免过度依赖。
-
-
-
-
- 9.3 未成年人在使用本服务时应注意个人信息保护,避免上传或透露个人敏感信息。
-
-
-
-
-
- 十、协议终止
-
-
-
-
- 10.1 用户终止:您有权随时停止使用本服务并注销账号。
-
-
-
-
- 10.2 运营者终止:出现以下情形时,运营者有权终止向您提供服务:
-
-
-
-
- (1)您违反本协议的约定。
-
-
-
-
- (2)您利用本服务从事违法违规活动。
-
-
-
-
- (3)根据法律法规或政策要求。
-
-
-
-
- (4)运营者决定停止运营本服务。
-
-
-
-
- 10.3 终止后处理:协议终止后,运营者无义务保留您的账号信息及相关数据。运营者仍有权依据本协议追究您在协议有效期内的违约责任。
-
-
-
-
-
- 十一、法律适用与争议解决
-
-
-
-
- 11.1 本协议的订立、生效、解释、修订、终止及争议解决均适用中华人民共和国法律。
-
-
-
-
- 11.2 因本协议或本服务引发的争议,双方应友好协商解决;协商不成的,任何一方有权向运营者所在地有管辖权的人民法院提起诉讼。
-
-
-
-
- 11.3 本协议的任何条款被认定为无效或不可执行,不影响其余条款的效力。
-
-
-
-
-
- 十二、其他
-
-
-
-
- 12.1 本协议构成您与运营者之间关于使用本服务的完整协议。
-
-
-
-
- 12.2 运营者未行使或延迟行使本协议项下的任何权利,不构成对该权利的放弃。
-
-
-
-
-
-
-
-
diff --git a/main/manager-mobile/src/pages/register/index.vue b/main/manager-mobile/src/pages/register/index.vue
index 5004b5d82..e3bf41bbe 100644
--- a/main/manager-mobile/src/pages/register/index.vue
+++ b/main/manager-mobile/src/pages/register/index.vue
@@ -3,28 +3,24 @@
"layout": "default",
"style": {
"navigationStyle": "custom",
- "navigationBarTitleText": "注册"
+ "navigationBarTitleText": "Register"
}
}
@@ -334,18 +290,18 @@ onMounted(async () => {
- {{ t('register.pageTitle') }}
+ Welcome to Register
- {{ t('register.createAccount') }}
+ Create Your New Account
-
-
+
+
@@ -359,7 +315,7 @@ onMounted(async () => {
v-model="formData.mobile"
custom-class="styled-input"
no-border
- :placeholder="t('register.enterPhone')"
+ placeholder="Please enter mobile number"
type="number"
:maxlength="11"
/>
@@ -368,7 +324,7 @@ onMounted(async () => {
-
+
@@ -376,7 +332,7 @@ onMounted(async () => {
v-model="formData.username"
custom-class="styled-input"
no-border
- :placeholder="t('register.enterUsername')"
+ placeholder="Please enter username"
/>
@@ -385,63 +341,63 @@ onMounted(async () => {
-
+ v-model="formData.password"
+ custom-class="styled-input"
+ no-border
+ placeholder="Please enter password"
+ show-password
+ :maxlength="20"
+ />
+
-
+ v-model="formData.confirmPassword"
+ custom-class="styled-input"
+ no-border
+ placeholder="Please confirm password"
+ show-password
+ :maxlength="20"
+ />
+
-
-
-
+ v-model="formData.captcha"
+ custom-class="styled-input"
+ no-border
+ placeholder="Please enter verification code"
+ :maxlength="6"
+ />
+
+
+
-
-
+
+
-
- {{ smsCountdown > 0 ? `${smsCountdown}s` : t('register.getCode') }}
-
+ v-model="formData.mobileCaptcha"
+ custom-class="styled-input"
+ no-border
+ placeholder="Please enter SMS verification code"
+ type="number"
+ :maxlength="6"
+ />
+
+ {{ smsCountdown > 0 ? `${smsCountdown}s` : 'Get Verification Code' }}
+
@@ -451,25 +407,44 @@ onMounted(async () => {
:loading="loading"
@click="handleRegister"
>
- {{ loading ? t('register.registering') : t('register.registerButton') }}
+ {{ loading ? 'Registering...' : 'Register' }}
- {{ t('register.haveAccount') }}
+ Already have an account?
- {{ t('register.loginNow') }}
+ Login Now
+
+
+
+
+
+
+
+
+
+
+
-
+
@@ -503,13 +478,11 @@ onMounted(async () => {
custom-class="confirm-btn"
@click="closeAreaCodeSheet"
>
- {{ t('register.confirm') }}
+ Confirm
-
-
@@ -642,7 +615,7 @@ onMounted(async () => {
&.captcha-wrapper {
.captcha-image {
margin-left: 20rpx;
- width: 150rpx;
+ width: 120rpx;
height: 60rpx;
border-radius: 8rpx;
overflow: hidden;
@@ -833,7 +806,7 @@ onMounted(async () => {
}
}
-// 区号选择弹窗样式
+// Area code selection popup styles
.area-code-sheet {
background: #ffffff;
border-radius: 24rpx 24rpx 0 0;
diff --git a/main/manager-mobile/src/pages/settings/index.vue b/main/manager-mobile/src/pages/settings/index.vue
index 9aa52927d..61a117e5b 100644
--- a/main/manager-mobile/src/pages/settings/index.vue
+++ b/main/manager-mobile/src/pages/settings/index.vue
@@ -1,21 +1,16 @@
-
-{
+{
"layout": "default",
"style": {
- "navigationBarTitleText": "设置",
+ "navigationBarTitleText": "Settings",
"navigationStyle": "custom"
}
-}
-
+}
-
+
-
+
- {{ t('settings.networkSettings') }}
+ Network Settings
-
+
- {{ t('settings.serverApiUrl') }}
+ Server API Address
- {{ t('settings.modifyWillClearCache') }}
+ Cache will be cleared and app restarted after modification
-
-
+
+
{{ urlError }}
@@ -327,47 +272,40 @@ onMounted(async () => {
-
- {{ t('settings.saveSettings') }}
+ @click="saveServerBaseUrl">
+ Save Settings
-
- {{ t('settings.resetDefault') }}
+ @click="resetServerBaseUrl">
+ Reset Default
-
+
- {{ t('settings.cacheManagement') }}
+ Cache Management
-
+
-
+
+ class="flex items-center justify-between border border-[#eeeeee] rounded-[16rpx] bg-[#f5f7fb] p-[24rpx] transition-all active:bg-[#eef3ff]">
- {{ t('settings.totalCacheSize') }}
+ Total Cache Size
- {{ t('settings.appDataSize') }}
+ Total application data size
@@ -375,51 +313,46 @@ onMounted(async () => {
-
+
+ class="flex items-center justify-between border border-[#eeeeee] rounded-[16rpx] bg-[#f5f7fb] p-[24rpx]">
- {{ t('settings.cacheClear') }}
+ Cache Cleanup
- {{ t('settings.clearAllCache') }}
+ Clear all cache data
- {{ t('settings.clearCache') }}
+ @click="clearCache">
+ Clear Cache
-
+
- {{ t('settings.appInfo') }}
+ Application Information
-
+
+ @click="showAbout">
- {{ t('settings.aboutUs') }}
+ About Us
- {{ t('settings.appVersion') }}
+ Application version and team information
@@ -427,89 +360,12 @@ onMounted(async () => {
-
-
-
-
- {{ t('settings.languageSettings') }}
-
-
-
-
-
-
-
- {{ t('settings.language') }}
-
-
- {{ t('settings.selectLanguage') }}
-
-
-
-
- {{ supportedLanguages.find(lang => lang.code === currentLanguage)?.name }}
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ lang.name }}
-
-
-
-
-
-
-
-
+
+
+// Keep consistent style with edit.vue, styles mainly controlled by class names
diff --git a/main/manager-mobile/src/pages/voiceprint/index.vue b/main/manager-mobile/src/pages/voiceprint/index.vue
index e6ba2ccc3..c9b1eb51e 100644
--- a/main/manager-mobile/src/pages/voiceprint/index.vue
+++ b/main/manager-mobile/src/pages/voiceprint/index.vue
@@ -3,26 +3,22 @@ import type { ChatHistory, CreateSpeakerData, VoicePrint } from '@/api/voiceprin
import { computed, onMounted, ref } from 'vue'
import { useMessage } from 'wot-design-uni'
import { useToast } from 'wot-design-uni/components/wd-toast'
-import { createVoicePrint, deleteVoicePrint, getAudioDownloadId, getChatHistory, getVoicePrintList, updateVoicePrint } from '@/api/voiceprint'
-import { t } from '@/i18n'
-import { getEnvBaseUrl } from '@/utils'
+import { createVoicePrint, deleteVoicePrint, getChatHistory, getVoicePrintList, updateVoicePrint } from '@/api/voiceprint'
defineOptions({
name: 'VoicePrintManage',
})
-const props = withDefaults(defineProps(), {
- agentId: 'default',
-})
-
-const emits = defineEmits(['update-refresher-enabled'])
-
-// 接收props
+// Receive props
interface Props {
agentId?: string
}
-// 获取屏幕边界到安全区域距离
+const props = withDefaults(defineProps(), {
+ agentId: 'default'
+})
+
+// Get screen boundary to safe area distance
let safeAreaInsets: any
let systemInfo: any
@@ -46,25 +42,21 @@ safeAreaInsets = systemInfo.safeAreaInsets
const message = useMessage()
const toast = useToast()
-// 页面数据
+// Page data
const voicePrintList = ref([])
const chatHistoryList = ref([])
const chatHistoryActions = ref([])
const swipeStates = ref>({})
const loading = ref(false)
-// 音频播放相关
-const audioRef = ref(null)
-const playingAudioId = ref('')
-
-// 使用传入的智能体ID
+// Use passed agent ID
const currentAgentId = computed(() => {
return props.agentId
})
-// 智能体选择相关功能已移除
+// Agent selection related functions have been removed
-// 弹窗相关
+// Dialog related
const showAddDialog = ref(false)
const showEditDialog = ref(false)
const showChatHistoryDialog = ref(false)
@@ -82,14 +74,14 @@ const editForm = ref({
createDate: '',
})
-// 获取声纹列表
+// Get voiceprint list
async function loadVoicePrintList() {
try {
- console.log('获取声纹列表')
+ console.log('Get voiceprint list')
- // 检查是否有当前选中的智能体
+ // Check if there is currently selected agent
if (!currentAgentId.value) {
- console.warn(t('voiceprint.noSelectedAgent'))
+ console.warn('No selected agent')
voicePrintList.value = []
return
}
@@ -97,7 +89,7 @@ async function loadVoicePrintList() {
loading.value = true
const data = await getVoicePrintList(currentAgentId.value)
- // 初始化滑动状态
+ // Initialize swipe status
const list = data || []
list.forEach((item) => {
if (!swipeStates.value[item.id]) {
@@ -108,7 +100,7 @@ async function loadVoicePrintList() {
voicePrintList.value = list
}
catch (error) {
- console.error('获取声纹列表失败:', error)
+ console.error('Failed to get voiceprint list:', error)
voicePrintList.value = []
}
finally {
@@ -116,90 +108,66 @@ async function loadVoicePrintList() {
}
}
-// 暴露给父组件的刷新方法
+// Refresh method exposed to parent component
async function refresh() {
await loadVoicePrintList()
}
-// 获取语音对话记录
+// Get voice conversation records
async function loadChatHistory() {
try {
if (!currentAgentId.value) {
- toast.error(t('voiceprint.pleaseSelectAgent'))
+ toast.error('Please select an agent first')
return
}
const data = await getChatHistory(currentAgentId.value)
chatHistoryList.value = data || []
- // 转换为ActionSheet格式
+ // Convert to ActionSheet format
chatHistoryActions.value = chatHistoryList.value.map((item, index) => ({
name: item.content,
audioId: item.audioId,
index,
}))
+ showChatHistoryDialog.value = true
}
catch (error) {
- console.error('获取对话记录失败:', error)
- toast.error(t('voiceprint.fetchHistoryFailed'))
+ console.error('Failed to get conversation records:', error)
+ toast.error('Failed to get conversation records')
}
}
-// 打开添加弹窗
+// Open add dialog
function openAddDialog() {
if (!currentAgentId.value) {
- toast.error(t('voiceprint.pleaseSelectAgent'))
+ toast.error('Please select an agent first')
return
}
- // 检查声纹接口是否配置(通过尝试获取声纹列表来检测)
- const checkVoicePrintConfig = async () => {
- try {
- await getVoicePrintList(currentAgentId.value)
- // 接口正常,继续打开添加弹窗
- addForm.value = {
- agentId: currentAgentId.value,
- audioId: '',
- sourceName: '',
- introduce: '',
- }
- showAddDialog.value = true
- }
- catch (error: any) {
- // 捕捉声纹接口未配置错误
- if (error.message && error.message.includes('请求错误[10054]')) {
- toast.error(t('voiceprint.voiceprintInterfaceNotConfigured'))
- }
- else {
- // 其他错误,继续打开弹窗
- addForm.value = {
- agentId: currentAgentId.value,
- audioId: '',
- sourceName: '',
- introduce: '',
- }
- showAddDialog.value = true
- }
- }
+ addForm.value = {
+ agentId: currentAgentId.value,
+ audioId: '',
+ sourceName: '',
+ introduce: '',
}
-
- checkVoicePrintConfig()
+ showAddDialog.value = true
}
-// 打开编辑弹窗
+// Open edit dialog
function openEditDialog(item: VoicePrint) {
editForm.value = { ...item }
showEditDialog.value = true
}
-// 获取选中音频的显示内容
+// Get selected audio display content
function getSelectedAudioContent(audioId: string) {
if (!audioId)
- return t('voiceprint.clickToSelectVector')
+ return 'Click to select voiceprint vector'
const chatItem = chatHistoryList.value.find(item => item.audioId === audioId)
- return chatItem ? chatItem.content : `已选择: ${audioId.substring(0, 8)}...`
+ return chatItem ? chatItem.content : `Selected: ${audioId.substring(0, 8)}...`
}
-// 选择声纹向量
+// Select voiceprint vector
function selectAudioId({ item }: { item: any }) {
if (showAddDialog.value) {
addForm.value.audioId = item.audioId
@@ -210,42 +178,37 @@ function selectAudioId({ item }: { item: any }) {
showChatHistoryDialog.value = false
}
-// 点击选择
-function handleItemClick(item: any) {
- selectAudioId({ item })
-}
-
-// 提交添加说话人
+// Submit add speaker
async function submitAdd() {
if (!addForm.value.sourceName.trim()) {
- toast.error(t('voiceprint.pleaseInputName'))
+ toast.error('Please enter name')
return
}
if (!addForm.value.audioId) {
- toast.error(t('voiceprint.pleaseSelectVector'))
+ toast.error('Please select voiceprint vector')
return
}
try {
await createVoicePrint(addForm.value)
- toast.success(t('voiceprint.addSuccess'))
+ toast.success('Added successfully')
showAddDialog.value = false
await loadVoicePrintList()
}
catch (error) {
- console.error('添加说话人失败:', error)
- toast.error(t('voiceprint.addFailed'))
+ console.error('Failed to add speaker:', error)
+ toast.error('Failed to add speaker')
}
}
-// 提交编辑说话人
+// Submit edit speaker
async function submitEdit() {
if (!editForm.value.sourceName.trim()) {
- toast.error(t('voiceprint.pleaseInputName'))
+ toast.error('Please enter name')
return
}
if (!editForm.value.audioId) {
- toast.error(t('voiceprint.pleaseSelectVector'))
+ toast.error('Please select voiceprint vector')
return
}
@@ -257,140 +220,61 @@ async function submitEdit() {
introduce: editForm.value.introduce,
createDate: editForm.value.createDate,
})
- toast.success(t('voiceprint.editSuccess'))
+ toast.success('Edited successfully')
showEditDialog.value = false
await loadVoicePrintList()
}
catch (error) {
- console.error('编辑说话人失败:', error)
- toast.error(t('voiceprint.editFailed'))
+ console.error('Failed to edit speaker:', error)
+ toast.error('Failed to edit speaker')
}
}
-// 处理编辑操作
+// Handle edit operation
function handleEdit(item: VoicePrint) {
openEditDialog(item)
swipeStates.value[item.id] = 'close'
}
-// 删除声纹
+// Delete voiceprint
async function handleDelete(id: string) {
message.confirm({
- msg: t('voiceprint.deleteConfirmMsg'),
- title: t('voiceprint.deleteConfirmTitle'),
+ msg: 'Are you sure you want to delete this speaker?',
+ title: 'Confirm Delete',
}).then(async () => {
await deleteVoicePrint(id)
- toast.success(t('voiceprint.deleteSuccess'))
+ toast.success('Delete successful')
await loadVoicePrintList()
}).catch(() => {
- console.log('点击了取消按钮')
+ console.log('Clicked cancel button')
})
}
-// 播放音频
-async function playAudio(audioId: string, event: Event) {
- event.stopPropagation() // 阻止事件冒泡,防止关闭下拉框
-
- if (!audioId) {
- toast.warning(t('voiceprint.audioNotExist'))
- return
- }
-
- // 如果正在播放同一个音频,则停止
- if (playingAudioId.value === audioId) {
- stopAudio()
- return
- }
-
- // 停止之前的音频
- stopAudio()
-
- try {
- // 先获取音频下载ID
- playingAudioId.value = audioId
- const downloadId = await getAudioDownloadId(audioId)
-
- if (!downloadId) {
- toast.error(t('voiceprint.getAudioFailed'))
- playingAudioId.value = ''
- return
- }
-
- // 获取baseURL
- const baseURL = getEnvBaseUrl()
- const audioUrl = `${baseURL}/agent/play/${downloadId}`
-
- // 创建新的音频实例
- audioRef.value = uni.createInnerAudioContext()
- audioRef.value.src = audioUrl
- audioRef.value.autoplay = true
-
- // 监听播放结束
- audioRef.value.onEnded(() => {
- playingAudioId.value = ''
- })
-
- // 监听播放错误
- audioRef.value.onError((error) => {
- console.error('音频播放错误:', error)
- toast.error(t('voiceprint.audioPlayFailed'))
- playingAudioId.value = ''
- })
- }
- catch (error) {
- console.error('播放音频失败:', error)
- toast.error(t('voiceprint.audioPlayFailed'))
- playingAudioId.value = ''
- }
-}
-
-// 停止音频
-function stopAudio() {
- if (audioRef.value) {
- audioRef.value.stop()
- audioRef.value.destroy()
- audioRef.value = null
- }
- playingAudioId.value = ''
-}
-
-watch(() => [showAddDialog.value, showEditDialog.value], (newValues) => {
- if (newValues.some((value: boolean) => value)) {
- emits('update-refresher-enabled', false)
- }
- else {
- emits('update-refresher-enabled', true)
- }
-})
-
onMounted(async () => {
- // 智能体已简化为默认
+ // Agent simplified to default
loadVoicePrintList()
- loadChatHistory()
})
-// 暴露方法给父组件
+// Expose methods to parent component
defineExpose({
- showAddDialog,
- showEditDialog,
refresh,
})
-
+
- {{ t('voiceprint.loading') }}
+ Loading...
-
+
-
+
- {{ item.introduce || '暂无描述' }}
+ {{ item.introduce || 'No description' }}
{{ item.createDate }}
@@ -418,7 +302,7 @@ defineExpose({
@click="handleDelete(item.id)"
>
- {{ t('voiceprint.delete') }}
+ Delete
@@ -427,48 +311,49 @@ defineExpose({
-
+
-
- {{ t('voiceprint.emptyTitle') }}
+
+ No voiceprint data
- {{ t('voiceprint.emptyDesc') }}
+ Click the + button in the bottom right corner to add your first speaker
-
-
+
+
-
+
-
+
+
+
+ Add Speaker
+
+
+
-
+
-
- *
-
- {{ t('voiceprint.voiceVector') }}
+ * Voiceprint Vector
-
+
-
- *
-
- {{ t('voiceprint.name') }}
+ * Name
-
+
-
- *
-
- {{ t('voiceprint.description') }}
+ * Description
@@ -515,39 +394,36 @@ defineExpose({
- {{ t('voiceprint.cancel') }}
+ Cancel
- {{ t('voiceprint.save') }}
+ Save
-
+
-
+
- {{ t('voiceprint.editSpeaker') }}
+ Edit Speaker
-
+
-
- *
-
- {{ t('voiceprint.voiceVector') }}
+ * Voiceprint Vector
-
+
-
- *
-
- {{ t('voiceprint.name') }}
+ * Name
-
+
-
- *
-
- {{ t('voiceprint.description') }}
+ * Description
@@ -594,42 +464,23 @@ defineExpose({
- {{ t('voiceprint.cancel') }}
+ Cancel
- {{ t('voiceprint.save') }}
+ Save
-
-
+
+
-
diff --git a/main/manager-mobile/src/router/interceptor.ts b/main/manager-mobile/src/router/interceptor.ts
index 74905a640..aa7d0eaef 100644
--- a/main/manager-mobile/src/router/interceptor.ts
+++ b/main/manager-mobile/src/router/interceptor.ts
@@ -1,8 +1,8 @@
/**
- * by 菲鸽 on 2024-03-06
- * 路由拦截,通常也是登录拦截
- * 可以设置路由白名单,或者黑名单,看业务需要选哪一个
- * 我这里应为大部分都可以随便进入,所以使用黑名单
+ * by Feige on 2024-03-06
+ * Route interception, usually also login interception
+ * Can set route whitelist or blacklist, choose based on business needs
+ * Here most pages can be accessed freely, so using blacklist
*/
import { useUserStore } from '@/store'
import { needLoginPages as _needLoginPages, getLastPage, getNeedLoginPages } from '@/utils'
@@ -17,16 +17,16 @@ function isLogined() {
const isDev = import.meta.env.DEV
-// 黑名单登录拦截器 - (适用于大部分页面不需要登录,少部分页面需要登录)
+// Blacklist login interceptor - (suitable for most pages not requiring login, few pages requiring login)
const navigateToInterceptor = {
- // 注意,这里的url是 '/' 开头的,如 '/pages/index/index',跟 'pages.json' 里面的 path 不同
- // 增加对相对路径的处理,BY 网友 @ideal
+ // Note, the url here starts with '/', like '/pages/index/index', different from path in 'pages.json'
+ // Add handling for relative paths, BY netizen @ideal
invoke({ url }: { url: string }) {
// console.log(url) // /pages/route-interceptor/index?name=feige&age=30
let path = url.split('?')[0]
- console.log('页面变动')
+ console.log('Page change')
- // 处理相对路径
+ // Handle relative paths
if (!path.startsWith('/')) {
const currentPath = getLastPage().route
const normalizedCurrentPath = currentPath.startsWith('/') ? currentPath : `/${currentPath}`
@@ -35,7 +35,7 @@ const navigateToInterceptor = {
}
let needLoginPages: string[] = []
- // 为了防止开发时出现BUG,这里每次都获取一下。生产环境可以移到函数外,性能更好
+ // To prevent bugs during development, get it every time here. In production environment, it can be moved outside the function for better performance
if (isDev) {
needLoginPages = getNeedLoginPages()
}
diff --git a/main/manager-mobile/src/static/logo.svg b/main/manager-mobile/src/static/logo.svg
index eaee6698e..7fdccbb04 100644
--- a/main/manager-mobile/src/static/logo.svg
+++ b/main/manager-mobile/src/static/logo.svg
@@ -1,5 +1,5 @@
-