Commit b967f7b2 authored by 前端-许佳敏's avatar 前端-许佳敏

fix: 修改登录首页

parent 6e7c9a6d
...@@ -12,6 +12,10 @@ const router = [ ...@@ -12,6 +12,10 @@ const router = [
component: '@/wrappers/getSiteConfig', component: '@/wrappers/getSiteConfig',
routes: [ routes: [
{ {
path: '/',
redirect: '/memberCenter/home'
},
{
path: '/user', path: '/user',
component: '@/layouts/UserLayouts', component: '@/layouts/UserLayouts',
routes: [ routes: [
...@@ -62,7 +66,7 @@ const router = [ ...@@ -62,7 +66,7 @@ const router = [
component: '@/pages/lxMall/information/mobileDetail', component: '@/pages/lxMall/information/mobileDetail',
}, },
memberCenterRoute, memberCenterRoute,
...mallRoute, // ...mallRoute,
{ {
component: '@/pages/404', component: '@/pages/404',
}, },
......
...@@ -90,7 +90,7 @@ const mallLists = [ ...@@ -90,7 +90,7 @@ const mallLists = [
// 路由白名单 // 路由白名单
const whiteLists = [ const whiteLists = [
...userLoginLists, ...userLoginLists,
...mallLists, // ...mallLists,
// '/memberCenter', // '/memberCenter',
'/memberCenter/noAuth', '/memberCenter/noAuth',
'/403', '/403',
...@@ -180,9 +180,9 @@ export function onRouteChange({ routes, matchedRoutes, location, action }) { ...@@ -180,9 +180,9 @@ export function onRouteChange({ routes, matchedRoutes, location, action }) {
recent.put(breadCrumb, location.pathname + location.search); recent.put(breadCrumb, location.pathname + location.search);
} }
if (isDev) { // if (isDev) {
return; // return;
} // }
if (whiteLists.includes(location.pathname)) { if (whiteLists.includes(location.pathname)) {
return return
......
...@@ -14,7 +14,7 @@ export interface UserHeaderProps { ...@@ -14,7 +14,7 @@ export interface UserHeaderProps {
* 登录、注册等用户头部 * 登录、注册等用户头部
*/ */
const UserHeader: React.FC<UserHeaderProps> = (props) => { const UserHeader: React.FC<UserHeaderProps> = (props) => {
const { pathname } = props.location const { pathname } = props?.location || {}
const [title, setTitle] = useState<string>() const [title, setTitle] = useState<string>()
useEffect(() => { useEffect(() => {
......
...@@ -11,11 +11,6 @@ function isArray(arr: any) { ...@@ -11,11 +11,6 @@ function isArray(arr: any) {
return Array.isArray(arr) return Array.isArray(arr)
} }
export const getTopDomainByHost = (url: string): string => {
if (!url) return ''
return url.split('.').slice(-2).join('.')
}
export function isObject(obj: any) { export function isObject(obj: any) {
return Object.prototype.toString.call(obj) === '[object Object]' return Object.prototype.toString.call(obj) === '[object Object]'
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment