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) {