From 89f64b5418132763d342ea0e7ed609c8e1d4c48f Mon Sep 17 00:00:00 2001
From: sjeam <359824901@qq.com>
Date: Fri, 1 Aug 2025 15:03:50 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BF=A1=E6=81=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages.json | 15 ++++++
src/pages/common/login/index.vue | 68 +++++++++++++++++--------
src/pages/common/login/user_about.vue | 54 ++++++++++++++++++++
src/pages/common/login/user_privacy.vue | 54 ++++++++++++++++++++
4 files changed, 170 insertions(+), 21 deletions(-)
create mode 100644 src/pages/common/login/user_about.vue
create mode 100644 src/pages/common/login/user_privacy.vue
diff --git a/src/pages.json b/src/pages.json
index b36de7b..70b7846 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -44,6 +44,21 @@
"navigationStyle": "custom"
}
},
+ {
+ "path": "login/user_privacy",
+ "style": {
+ "navigationBarTitleText": "用户协议",
+ "navigationStyle": "custom"
+ }
+ },
+ {
+ "path": "login/user_about",
+ "style": {
+ "navigationBarTitleText": "隐私政策",
+ "navigationStyle": "custom"
+ }
+ },
+
{
"path": "webview/index",
"style": {
diff --git a/src/pages/common/login/index.vue b/src/pages/common/login/index.vue
index fd843d6..567e911 100644
--- a/src/pages/common/login/index.vue
+++ b/src/pages/common/login/index.vue
@@ -54,9 +54,10 @@
登录代表同意
-
- 用户协议、隐私政策,
+
+ 用户协议、隐私政策,
+
并授权使用您的账号信息(如昵称、头像、收获地址)以便您统一管理
@@ -79,20 +80,20 @@ isWechat.value = true;
const loginType = ref(0);
-const account = ref('18181941463');
-const code = ref('1234');
-const password = ref('123456');
+const account = ref('');
+const code = ref('');
+const password = ref('');
-const tips = ref();
+const tips = ref('');
const uCodeRef = ref | null>(null);
let redirect = HOME_PATH;
const inputStyle = computed(() => {
const style = {} as CSSProperties;
- if (account.value && code.value) {
+ // if (account.value && code.value) {
style.color = '#fff';
style.backgroundColor = uni.$u.color.success;
- }
+ // }
return style;
});
@@ -123,7 +124,19 @@ function getCode () {
}
+ //点击详情
+ function userAbount (type ) {
+ if(type===0){
+ uni.navigateTo({
+ url: `/pages/common/login/user_privacy`
+ });
+ }else{
+ uni.navigateTo({
+ url: `/pages/common/login/user_about`
+ });
+ }
+ }
async function wechatLogin () {
if (isWechat.value === true) {
if (!uni.$u.test.mobile(Number(account.value))) {
@@ -167,8 +180,21 @@ async function wechatLogin () {
}
});
}
+ if (isLogin()) {
+ // await userStore.info()
+ setTimeout(() => {
+ uni.$u.route({
+ type: isTabBarPath(redirect) ? 'switchTab' : 'redirectTo',
+ url: redirect,
+ });
+ }, 800);
+ } else {
+ uni.$u.toast('登录失败,请重新登录 ');
+ setToken('');
+ }
+
} else {
- console.log('222微信登录');
+
uni.login({
provider: 'weixin',
// onlyAuthorize: true,// 微信登录仅请求授权认证
@@ -193,6 +219,18 @@ async function wechatLogin () {
// setToken(token.token_type+' '+token.token);
// }
uni.$u.toast('登录成功');
+ if (isLogin()) {
+ // await userStore.info()
+ setTimeout(() => {
+ uni.$u.route({
+ type: isTabBarPath(redirect) ? 'switchTab' : 'redirectTo',
+ url: redirect,
+ });
+ }, 800);
+ } else {
+ uni.$u.toast(`登录失败,${res.msg}`);
+ setToken('');
+ }
}
else {
uni.$u.toast(`登录失败,${res.msg}`);
@@ -208,18 +246,6 @@ async function wechatLogin () {
}
- if (isLogin()) {
- // await userStore.info()
- setTimeout(() => {
- uni.$u.route({
- type: isTabBarPath(redirect) ? 'switchTab' : 'redirectTo',
- url: redirect,
- });
- }, 800);
- } else {
- uni.$u.toast('登录失败,请重新登录 ');
- setToken('');
- }
// setToken('1234567890');
diff --git a/src/pages/common/login/user_about.vue b/src/pages/common/login/user_about.vue
new file mode 100644
index 0000000..069af14
--- /dev/null
+++ b/src/pages/common/login/user_about.vue
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/common/login/user_privacy.vue b/src/pages/common/login/user_privacy.vue
new file mode 100644
index 0000000..7f73273
--- /dev/null
+++ b/src/pages/common/login/user_privacy.vue
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+
\ No newline at end of file