From dc856f9aa92b1aeb90e53009a090ed3d1f7d491b Mon Sep 17 00:00:00 2001
From: Theo <971366405@qq.com>
Date: Fri, 29 Nov 2024 16:38:07 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20:sparkles:=20=E6=96=B0=E5=A2=9E?=
=?UTF-8?q?=E7=94=A8=E6=88=B7=E5=8D=8F=E8=AE=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
新增用户协议
---
src/pages.json | 6 ++
src/pages/login/index.vue | 30 ++++++++
src/pages/mine/index.vue | 20 ++++-
src/pages/mine/network-test/index.vue | 12 ++-
src/pages/mine/user-agreement/index.vue | 98 +++++++++++++++++++++++++
5 files changed, 161 insertions(+), 5 deletions(-)
create mode 100644 src/pages/mine/user-agreement/index.vue
diff --git a/src/pages.json b/src/pages.json
index 7e4b9af..ff9fb4a 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -32,6 +32,12 @@
"navigationBarTitleText": "关于我们"
}
},
+ {
+ "path": "pages/mine/user-agreement/index",
+ "style": {
+ "navigationBarTitleText": "用户协议"
+ }
+ },
{
"path": "pages/mine/privacy/index",
"style": {
diff --git a/src/pages/login/index.vue b/src/pages/login/index.vue
index c2cc2d4..51f2a71 100644
--- a/src/pages/login/index.vue
+++ b/src/pages/login/index.vue
@@ -29,6 +29,12 @@
+
+ 登录即同意
+ 《用户协议》
+ 和
+ 《隐私政策》
+
@@ -72,6 +78,16 @@ const handleLogin = () => {
}
});
};
+const goToUserAgreement = () => {
+ uni.navigateTo({
+ url: "/pages/mine/user-agreement/index",
+ });
+};
+const goToPrivacy = () => {
+ uni.navigateTo({
+ url: "/pages/mine/privacy/index",
+ });
+};
diff --git a/src/pages/mine/index.vue b/src/pages/mine/index.vue
index 7369c1c..33be127 100644
--- a/src/pages/mine/index.vue
+++ b/src/pages/mine/index.vue
@@ -42,6 +42,9 @@
+
+
+
@@ -78,32 +81,40 @@
import { useUserStore } from "@/store/modules/user";
const userStore = useUserStore();
-
const userInfo = computed(() => userStore.userInfo);
-
const isLogin = computed(() => !!userInfo.value);
-
const defaultAvatar = "/static/images/default-avatar.png";
+// 登录
const goToLoginPage = () => {
uni.navigateTo({ url: "/pages/login/index" });
};
-
+// 个人信息
const goToProfile = () => {
uni.navigateTo({ url: "/pages/mine/profile/index" });
};
+
+// 用户协议
+const goToUserAgreement = () => {
+ uni.navigateTo({ url: "/pages/mine/user-agreement/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/mine/about/index" });
};
+// 应用设置
const goToSettings = () => {
uni.showToast({
title: "建设中...",
@@ -111,6 +122,7 @@ const goToSettings = () => {
});
//uni.navigateTo({ url: "/pages/settings/index" });
};
+// 退出登录
const handleLogout = () => {
userStore.logout().then(() => {
uni.showToast({ title: "已退出登录", icon: "success" });
diff --git a/src/pages/mine/network-test/index.vue b/src/pages/mine/network-test/index.vue
index 4842367..075ba79 100644
--- a/src/pages/mine/network-test/index.vue
+++ b/src/pages/mine/network-test/index.vue
@@ -47,6 +47,8 @@
+
+