From b50d9dba1d386bc097d8a061dfa2af33aaaced44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=88=90?= Date: Tue, 2 Sep 2025 10:40:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=20=E7=AC=AC=E4=B8=80?= =?UTF-8?q?=E6=AC=A1=E8=BF=9B=E5=85=A5=20=E4=B9=9F=E4=BC=9A=E7=9B=B4?= =?UTF-8?q?=E6=8E=A5=E8=B7=B3=E8=BD=AC=E5=88=97=E8=A1=A8=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app.config.ts | 11 +++++++---- src/components/GuideBar/index.tsx | 2 +- src/pages/login/index/index.tsx | 10 +++++++++- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/app.config.ts b/src/app.config.ts index 6f8e083..bcf9ce2 100644 --- a/src/app.config.ts +++ b/src/app.config.ts @@ -3,17 +3,20 @@ export default defineAppConfig({ 'pages/login/index/index', 'pages/login/verification/index', 'pages/login/terms/index', - 'pages/publishBall/index', + 'pages/list/index', // 列表页 'pages/search/index', // 搜索页 'pages/searchResult/index', // 搜索结果页面 - 'pages/userInfo/myself/index', - - // 'pages/mapDisplay/index', + 'pages/publishBall/index', 'pages/detail/index', 'pages/message/index', 'pages/personal/index', 'pages/orderCheck/index', + + 'pages/userInfo/myself/index', // 个人中心 + + // 'pages/mapDisplay/index', + ], window: { backgroundTextStyle: 'light', diff --git a/src/components/GuideBar/index.tsx b/src/components/GuideBar/index.tsx index f7a4b6d..a40271f 100644 --- a/src/components/GuideBar/index.tsx +++ b/src/components/GuideBar/index.tsx @@ -37,7 +37,7 @@ const GuideBar = (props) => { let url = `/pages/${code}/index` if (code === 'personal') { - url = 'pages/userInfo/myself/index' + url = '/pages/userInfo/myself/index' } Taro.navigateTo({ url: url, diff --git a/src/pages/login/index/index.tsx b/src/pages/login/index/index.tsx index ea98c8a..16702df 100644 --- a/src/pages/login/index/index.tsx +++ b/src/pages/login/index/index.tsx @@ -1,7 +1,7 @@ import React, { useState } from 'react'; import { View, Text, Button, Image } from '@tarojs/components'; import Taro from '@tarojs/taro'; -import { wechat_auth_login, save_login_state } from '../../../services/loginService'; +import { wechat_auth_login, save_login_state, check_login_status } from '../../../services/loginService'; import './index.scss'; const LoginPage: React.FC = () => { @@ -9,6 +9,14 @@ const LoginPage: React.FC = () => { const [agree_terms, set_agree_terms] = useState(false); const [show_terms_layer, set_show_terms_layer] = useState(false); + let is_login = check_login_status() + + if (is_login) { + Taro.redirectTo({ + url: '/pages/login/index' + }) + } + // 微信授权登录 const handle_wechat_login = async (e: any) => { if (!agree_terms) {