From 3d696aaa64ad255becbe6bcfade0f967abe20fa4 Mon Sep 17 00:00:00 2001 From: Junsen <951434130@qq.com> Date: Mon, 11 Aug 2025 16:39:53 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0.gitignore=E4=BB=A5?= =?UTF-8?q?=E5=85=81=E8=AE=B8=E8=B7=9F=E8=B8=AAmanager-mobile=E4=B8=AD?= =?UTF-8?q?=E7=9A=84env=E5=92=8Cjson=E6=96=87=E4=BB=B6=EF=BC=9B=E4=BF=AE?= =?UTF-8?q?=E6=94=B9LICENSE=E7=89=88=E6=9D=83=E4=BF=A1=E6=81=AF=EF=BC=9B?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=8E=AF=E5=A2=83=E9=85=8D=E7=BD=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6=EF=BC=9B=E6=96=B0=E5=A2=9Emanifest.json=E5=92=8Cpages?= =?UTF-8?q?.json=E4=BB=A5=E6=94=AF=E6=8C=81=E7=A7=BB=E5=8A=A8=E5=BA=94?= =?UTF-8?q?=E7=94=A8=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 7 +- main/manager-mobile/LICENSE | 2 +- main/manager-mobile/env/.env | 19 +++ main/manager-mobile/env/.env.development | 6 + main/manager-mobile/env/.env.production | 6 + main/manager-mobile/env/.env.test | 4 + main/manager-mobile/pnpm-lock.yaml | 5 - main/manager-mobile/src/manifest.json | 124 ++++++++++++++++++ main/manager-mobile/src/pages.json | 158 +++++++++++++++++++++++ 9 files changed, 324 insertions(+), 7 deletions(-) create mode 100644 main/manager-mobile/env/.env create mode 100644 main/manager-mobile/env/.env.development create mode 100644 main/manager-mobile/env/.env.production create mode 100644 main/manager-mobile/env/.env.test create mode 100644 main/manager-mobile/src/manifest.json create mode 100644 main/manager-mobile/src/pages.json diff --git a/.gitignore b/.gitignore index e9579e4f..6cc16b40 100644 --- a/.gitignore +++ b/.gitignore @@ -177,4 +177,9 @@ uploadfile .cursor !package.json -!**/package.json \ No newline at end of file +!**/package.json + +# Do not ignore env and json files inside manager-mobile +!main/manager-mobile/**/env/ +!main/manager-mobile/**/.env* +!main/manager-mobile/**/*.json \ No newline at end of file diff --git a/main/manager-mobile/LICENSE b/main/manager-mobile/LICENSE index 9e91d10b..8738d3b5 100644 --- a/main/manager-mobile/LICENSE +++ b/main/manager-mobile/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2025 菲鸽 +Copyright (c) 2025 Junsen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/main/manager-mobile/env/.env b/main/manager-mobile/env/.env new file mode 100644 index 00000000..e0f4eea6 --- /dev/null +++ b/main/manager-mobile/env/.env @@ -0,0 +1,19 @@ +VITE_APP_TITLE = '小智' +VITE_APP_PORT = 9000 + +VITE_UNI_APPID = '__UNI__36A515E' +VITE_WX_APPID = 'wxa2abb91f64032a2b' + +# h5部署网站的base,配置到 manifest.config.ts 里的 h5.router.base +VITE_APP_PUBLIC_BASE=/ + +# 登录页面 +VITE_LOGIN_URL = '/pages/login/index' +# 第一个请求地址 +VITE_SERVER_BASEURL = 'https://2662r3426b.vicp.fun/xiaozhi' + +VITE_UPLOAD_BASEURL = '/otaMag/upload' + +# h5是否需要配置代理 +VITE_APP_PROXY=true +VITE_APP_PROXY_PREFIX = '/xiaozhi' \ No newline at end of file diff --git a/main/manager-mobile/env/.env.development b/main/manager-mobile/env/.env.development new file mode 100644 index 00000000..04fa2739 --- /dev/null +++ b/main/manager-mobile/env/.env.development @@ -0,0 +1,6 @@ +# 变量必须以 VITE_ 为前缀才能暴露给外部读取 +NODE_ENV = 'development' +# 是否去除console 和 debugger +VITE_DELETE_CONSOLE = false +# 是否开启sourcemap +VITE_SHOW_SOURCEMAP = true diff --git a/main/manager-mobile/env/.env.production b/main/manager-mobile/env/.env.production new file mode 100644 index 00000000..8a1b50ca --- /dev/null +++ b/main/manager-mobile/env/.env.production @@ -0,0 +1,6 @@ +# 变量必须以 VITE_ 为前缀才能暴露给外部读取 +NODE_ENV = 'development' +# 是否去除console 和 debugger +VITE_DELETE_CONSOLE = true +# 是否开启sourcemap +VITE_SHOW_SOURCEMAP = false diff --git a/main/manager-mobile/env/.env.test b/main/manager-mobile/env/.env.test new file mode 100644 index 00000000..e22f765a --- /dev/null +++ b/main/manager-mobile/env/.env.test @@ -0,0 +1,4 @@ +# 变量必须以 VITE_ 为前缀才能暴露给外部读取 +NODE_ENV = 'development' +# 是否去除console 和 debugger +VITE_DELETE_CONSOLE = false diff --git a/main/manager-mobile/pnpm-lock.yaml b/main/manager-mobile/pnpm-lock.yaml index c18c0131..9faf80cd 100644 --- a/main/manager-mobile/pnpm-lock.yaml +++ b/main/manager-mobile/pnpm-lock.yaml @@ -240,8 +240,6 @@ importers: specifier: ^2.2.10 version: 2.2.10(typescript@5.7.2) - src/uni_modules/uni-wifi: {} - packages: '@alova/adapter-uniapp@2.0.14': @@ -1298,7 +1296,6 @@ packages: '@esbuild/darwin-arm64@0.20.2': resolution: {integrity: sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==} engines: {node: '>=12'} - cpu: [arm64] os: [darwin] '@esbuild/darwin-arm64@0.24.2': @@ -1316,7 +1313,6 @@ packages: '@esbuild/darwin-x64@0.20.2': resolution: {integrity: sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==} engines: {node: '>=12'} - cpu: [x64] os: [darwin] '@esbuild/darwin-x64@0.24.2': @@ -2207,7 +2203,6 @@ packages: '@rollup/rollup-darwin-x64@4.41.1': resolution: {integrity: sha512-egpJACny8QOdHNNMZKf8xY0Is6gIMz+tuqXlusxquWu3F833DcMwmGM7WlvCO9sB3OsPjdC4U0wHw5FabzCGZg==} - cpu: [x64] os: [darwin] '@rollup/rollup-freebsd-arm64@4.41.1': diff --git a/main/manager-mobile/src/manifest.json b/main/manager-mobile/src/manifest.json new file mode 100644 index 00000000..67225dc8 --- /dev/null +++ b/main/manager-mobile/src/manifest.json @@ -0,0 +1,124 @@ +{ + "name": "小智", + "appid": "__UNI__36A515E", + "description": "", + "versionName": "1.0.0", + "versionCode": "100", + "transformPx": false, + "app-plus": { + "usingComponents": true, + "nvueStyleCompiler": "uni-app", + "compilerVersion": 3, + "splashscreen": { + "alwaysShowBeforeRender": true, + "waiting": true, + "autoclose": true, + "delay": 0 + }, + "modules": {}, + "distribute": { + "android": { + "permissions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "minSdkVersion": 30, + "targetSdkVersion": 30, + "abiFilters": [ + "armeabi-v7a", + "arm64-v8a" + ] + }, + "ios": {}, + "sdkConfigs": {}, + "icons": { + "android": { + "hdpi": "unpackage/res/icons/72x72.png", + "xhdpi": "unpackage/res/icons/96x96.png", + "xxhdpi": "unpackage/res/icons/144x144.png", + "xxxhdpi": "unpackage/res/icons/192x192.png" + }, + "ios": { + "appstore": "unpackage/res/icons/1024x1024.png", + "ipad": { + "app": "unpackage/res/icons/76x76.png", + "app@2x": "unpackage/res/icons/152x152.png", + "notification": "unpackage/res/icons/20x20.png", + "notification@2x": "unpackage/res/icons/40x40.png", + "proapp@2x": "unpackage/res/icons/167x167.png", + "settings": "unpackage/res/icons/29x29.png", + "settings@2x": "unpackage/res/icons/58x58.png", + "spotlight": "unpackage/res/icons/40x40.png", + "spotlight@2x": "unpackage/res/icons/80x80.png" + }, + "iphone": { + "app@2x": "unpackage/res/icons/120x120.png", + "app@3x": "unpackage/res/icons/180x180.png", + "notification@2x": "unpackage/res/icons/40x40.png", + "notification@3x": "unpackage/res/icons/60x60.png", + "settings@2x": "unpackage/res/icons/58x58.png", + "settings@3x": "unpackage/res/icons/87x87.png", + "spotlight@2x": "unpackage/res/icons/80x80.png", + "spotlight@3x": "unpackage/res/icons/120x120.png" + } + } + } + }, + "compatible": { + "ignoreVersion": true + } + }, + "quickapp": {}, + "mp-weixin": { + "appid": "wxa2abb91f64032a2b", + "setting": { + "urlCheck": false, + "es6": true, + "minified": true + }, + "usingComponents": true, + "optimization": { + "subPackages": true + }, + "permission": { + "scope.userLocation": { + "desc": "WiFi配网功能需要获取位置权限" + } + }, + "requiredPrivateInfos": [ + "getLocation" + ] + }, + "mp-alipay": { + "usingComponents": true, + "styleIsolation": "shared" + }, + "mp-baidu": { + "usingComponents": true + }, + "mp-toutiao": { + "usingComponents": true + }, + "uniStatistics": { + "enable": false + }, + "vueVersion": "3", + "h5": { + "router": {} + } +} \ No newline at end of file diff --git a/main/manager-mobile/src/pages.json b/main/manager-mobile/src/pages.json new file mode 100644 index 00000000..5ddd6f53 --- /dev/null +++ b/main/manager-mobile/src/pages.json @@ -0,0 +1,158 @@ +{ + "globalStyle": { + "navigationStyle": "default", + "navigationBarTitleText": "小智", + "navigationBarBackgroundColor": "#f8f8f8", + "navigationBarTextStyle": "black", + "backgroundColor": "#FFFFFF" + }, + "easycom": { + "autoscan": true, + "custom": { + "^fg-(.*)": "@/components/fg-$1/fg-$1.vue", + "^wd-(.*)": "wot-design-uni/components/wd-$1/wd-$1.vue", + "^(?!z-paging-refresh|z-paging-load-more)z-paging(.*)": "z-paging/components/z-paging$1/z-paging$1.vue" + } + }, + "tabBar": { + "custom": false, + "color": "#e6e6e6", + "selectedColor": "#667dea", + "backgroundColor": "#fff", + "borderStyle": "black", + "height": "50px", + "fontSize": "10px", + "iconWidth": "24px", + "spacing": "3px", + "list": [ + { + "iconPath": "static/tabbar/robot.png", + "selectedIconPath": "static/tabbar/robot_activate.png", + "pagePath": "pages/index/index", + "text": "首页", + "icon": "home", + "iconType": "uiLib" + }, + { + "iconPath": "static/tabbar/network.png", + "selectedIconPath": "static/tabbar/network_activate.png", + "pagePath": "pages/device-config/index", + "text": "配网", + "icon": "i-carbon-network-3", + "iconType": "uiLib" + }, + { + "iconPath": "static/tabbar/system.png", + "selectedIconPath": "static/tabbar/system_activate.png", + "pagePath": "pages/settings/index", + "text": "系统", + "icon": "i-carbon-settings", + "iconType": "uiLib" + } + ] + }, + "pages": [ + { + "path": "pages/index/index", + "type": "home", + "layout": "tabbar", + "style": { + "navigationStyle": "custom", + "navigationBarTitleText": "首页" + } + }, + { + "path": "pages/agent/edit", + "type": "page" + }, + { + "path": "pages/agent/index", + "type": "page", + "layout": "default", + "style": { + "navigationBarTitleText": "智能体", + "navigationStyle": "custom" + } + }, + { + "path": "pages/agent/tools", + "type": "page", + "layout": "default", + "style": { + "navigationBarTitleText": "编辑功能", + "navigationStyle": "custom" + } + }, + { + "path": "pages/chat-history/detail", + "type": "page", + "layout": "default", + "style": { + "navigationStyle": "custom", + "navigationBarTitleText": "聊天详情" + } + }, + { + "path": "pages/chat-history/index", + "type": "page" + }, + { + "path": "pages/device/index", + "type": "page" + }, + { + "path": "pages/device-config/index", + "type": "page", + "style": { + "navigationBarTitleText": "设备配网", + "navigationStyle": "custom" + } + }, + { + "path": "pages/login/index", + "type": "page", + "layout": "default", + "style": { + "navigationStyle": "custom", + "navigationBarTitleText": "登陆" + } + }, + { + "path": "pages/register/index", + "type": "page", + "layout": "default", + "style": { + "navigationStyle": "custom", + "navigationBarTitleText": "注册" + } + }, + { + "path": "pages/settings/index", + "type": "page", + "layout": "default", + "style": { + "navigationBarTitleText": "设置", + "navigationStyle": "custom" + } + }, + { + "path": "pages/voiceprint/index", + "type": "page" + } + ], + "subPackages": [ + { + "root": "pages-sub", + "pages": [ + { + "path": "demo/index", + "type": "page", + "layout": "default", + "style": { + "navigationBarTitleText": "分包页面" + } + } + ] + } + ] +}