diff --git a/src/pages.json b/src/pages.json
index e7afde2..7e4b9af 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -26,6 +26,24 @@
"navigationBarTitleText": "我的"
}
},
+ {
+ "path": "pages/mine/about/index",
+ "style": {
+ "navigationBarTitleText": "关于我们"
+ }
+ },
+ {
+ "path": "pages/mine/privacy/index",
+ "style": {
+ "navigationBarTitleText": "隐私政策"
+ }
+ },
+ {
+ "path": "pages/mine/network-test/index",
+ "style": {
+ "navigationBarTitleText": "网络测试"
+ }
+ },
{
"path": "pages/login/index",
"style": {
diff --git a/src/pages/mine/about/index.vue b/src/pages/mine/about/index.vue
new file mode 100644
index 0000000..c812206
--- /dev/null
+++ b/src/pages/mine/about/index.vue
@@ -0,0 +1,200 @@
+
+
+
+
+
+ vue-uniapp-template
+ 版本 1.0.0
+
+
+
+
+ 有来开源组织
+
+ 专注于快速构建和高效开发的应用解决方案
+
+
+
+
+
+
+
+ vue-uniapp-template
+
+ 基于 uni-app + Vue 3 + TypeScript 的项目,集成了 ESLint、Prettier、Stylelint、Husky 和
+ Commitlint 等工具,确保代码规范与质量。
+
+
+
+
+
+ vue3-element-admin
+
+ 基于 Vue3 + Vite5+ TypeScript5 + Element-Plus + Pinia
+ 等主流技术栈构建的免费开源的中后台管理的前端模板
+
+
+
+
+
+
+ youlai-boot
+
+ 基于 JDK 17、Spring Boot 3、Spring Security 6、JWT、Redis、Mybatis-Plus、Knife4j、Vue
+ 3、Element-Plus 构建的前后端分离单体权限管理系统
+
+
+
+
+
+
+
+ Copyright © {{ getYear() }} 有来开源组织
+ All Rights Reserved
+
+
+
+
+
+
+
diff --git a/src/pages/mine/index.vue b/src/pages/mine/index.vue
index f0b9401..7369c1c 100644
--- a/src/pages/mine/index.vue
+++ b/src/pages/mine/index.vue
@@ -10,14 +10,18 @@
{{ userInfo!.nickname }}
- 您还未登录,请先 登录
+ 您还未登录,请先
+
+ 登录
+
+
- 个人信息
+ 个人信息
+
@@ -32,25 +36,41 @@
-
-
-
-
+
+
+
+
+
+
+
+
-
+
+
+
+
+ 正在清理...
+
+
@@ -72,24 +92,113 @@ const goToLoginPage = () => {
const goToProfile = () => {
uni.navigateTo({ url: "/pages/mine/profile/index" });
};
-const goToEditProfile = () => {
- uni.navigateTo({ url: "/pages/edit-profile/index" });
+const goToPrivacy = () => {
+ uni.navigateTo({ url: "/pages/mine/privacy/index" });
+};
+const goToNetworkTest = () => {
+ uni.navigateTo({ url: "/pages/mine/network-test/index" });
};
const goToFAQ = () => {
uni.navigateTo({ url: "/pages/faq/index" });
};
const goToAbout = () => {
- uni.navigateTo({ url: "/pages/about/index" });
+ uni.navigateTo({ url: "/pages/mine/about/index" });
};
const goToSettings = () => {
- uni.navigateTo({ url: "/pages/settings/index" });
+ uni.showToast({
+ title: "建设中...",
+ icon: "none",
+ });
+ //uni.navigateTo({ url: "/pages/settings/index" });
};
-
const handleLogout = () => {
userStore.logout().then(() => {
uni.showToast({ title: "已退出登录", icon: "success" });
});
};
+// 是否正在清理
+const clearing = ref(false);
+// 缓存大小
+const cacheSize = ref("计算中...");
+// 获取缓存大小
+const getCacheSize = async () => {
+ try {
+ // #ifdef MP-WEIXIN
+ const res = await uni.getStorageInfo();
+ cacheSize.value = formatSize(res.currentSize);
+ // #endif
+ // #ifdef H5
+ cacheSize.value = formatSize(
+ Object.keys(localStorage).reduce((size, key) => size + localStorage[key].length, 0)
+ );
+ // #endif
+ if (!cacheSize.value) {
+ cacheSize.value = "0B";
+ }
+ } catch (error) {
+ console.error("获取缓存大小失败:", error);
+ cacheSize.value = "获取失败";
+ }
+};
+
+// 格式化存储大小
+const formatSize = (size: number) => {
+ if (size < 1024) {
+ return size + "B";
+ } else if (size < 1024 * 1024) {
+ return (size / 1024).toFixed(2) + "KB";
+ } else {
+ return (size / 1024 / 1024).toFixed(2) + "MB";
+ }
+};
+
+// 处理清除缓存
+const handleClearCache = async () => {
+ if (cacheSize.value === "获取失败") {
+ uni.showToast({
+ title: "获取缓存信息失败,请稍后重试",
+ icon: "none",
+ duration: 2000,
+ });
+ return;
+ }
+ if (cacheSize.value === "0B") {
+ uni.showToast({
+ title: "暂无缓存需要清理",
+ icon: "none",
+ duration: 2000,
+ });
+ return;
+ }
+ if (clearing.value) {
+ return;
+ }
+
+ try {
+ clearing.value = true;
+ // 模拟清理过程
+ await new Promise((resolve) => setTimeout(resolve, 1500));
+ // 清除缓存
+ await uni.clearStorage();
+ // 更新缓存大小显示
+ await getCacheSize();
+ // 提示清理成功
+ uni.showToast({
+ title: "清理成功",
+ icon: "success",
+ });
+ } catch (error) {
+ uni.showToast({
+ title: "清理失败",
+ icon: "error",
+ });
+ } finally {
+ clearing.value = false;
+ }
+};
+onShow(() => {
+ getCacheSize();
+});
diff --git a/src/pages/mine/network-test/index.vue b/src/pages/mine/network-test/index.vue
new file mode 100644
index 0000000..4842367
--- /dev/null
+++ b/src/pages/mine/network-test/index.vue
@@ -0,0 +1,316 @@
+
+
+
+
+
+
+
+ 网络类型:
+ {{ networkType || "未知" }}
+
+
+ 网络强度:
+ {{ signalStrength }}
+
+
+
+
+
+
+
+
+
+
+ 延迟:
+ {{ pingResult.delay }}ms
+ {{ pingResult.status }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/mine/privacy/index.vue b/src/pages/mine/privacy/index.vue
new file mode 100644
index 0000000..4751861
--- /dev/null
+++ b/src/pages/mine/privacy/index.vue
@@ -0,0 +1,110 @@
+
+
+
+
+
+
+ {{ section.title }}
+ {{ section.content }}
+
+
+
+
+
+
+
+
diff --git a/src/pages/work/config/index.vue b/src/pages/work/config/index.vue
index fc0da07..fdd8bf6 100644
--- a/src/pages/work/config/index.vue
+++ b/src/pages/work/config/index.vue
@@ -59,7 +59,9 @@
- ···
+
+ 操作
+
diff --git a/src/pages/work/notice/index.vue b/src/pages/work/notice/index.vue
index e57039c..3603532 100644
--- a/src/pages/work/notice/index.vue
+++ b/src/pages/work/notice/index.vue
@@ -76,7 +76,7 @@
- ···
+ 操作
diff --git a/src/static/images/youlaiorg.png b/src/static/images/youlaiorg.png
new file mode 100644
index 0000000..2c45027
Binary files /dev/null and b/src/static/images/youlaiorg.png differ