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

fix: 修改登录首页

parent 6e7c9a6d
......@@ -12,6 +12,10 @@ const router = [
component: '@/wrappers/getSiteConfig',
routes: [
{
path: '/',
redirect: '/memberCenter/home'
},
{
path: '/user',
component: '@/layouts/UserLayouts',
routes: [
......@@ -62,7 +66,7 @@ const router = [
component: '@/pages/lxMall/information/mobileDetail',
},
memberCenterRoute,
...mallRoute,
// ...mallRoute,
{
component: '@/pages/404',
},
......
......@@ -90,7 +90,7 @@ const mallLists = [
// 路由白名单
const whiteLists = [
...userLoginLists,
...mallLists,
// ...mallLists,
// '/memberCenter',
'/memberCenter/noAuth',
'/403',
......@@ -180,9 +180,9 @@ export function onRouteChange({ routes, matchedRoutes, location, action }) {
recent.put(breadCrumb, location.pathname + location.search);
}
if (isDev) {
return;
}
// if (isDev) {
// return;
// }
if (whiteLists.includes(location.pathname)) {
return
......
......@@ -14,7 +14,7 @@ export interface UserHeaderProps {
* 登录、注册等用户头部
*/
const UserHeader: React.FC<UserHeaderProps> = (props) => {
const { pathname } = props.location
const { pathname } = props?.location || {}
const [title, setTitle] = useState<string>()
useEffect(() => {
......@@ -56,4 +56,4 @@ const UserHeader: React.FC<UserHeaderProps> = (props) => {
)
}
export default UserHeader
\ No newline at end of file
export default UserHeader
......@@ -11,11 +11,6 @@ function isArray(arr: any) {
return Array.isArray(arr)
}
export const getTopDomainByHost = (url: string): string => {
if (!url) return ''
return url.split('.').slice(-2).join('.')
}
export function isObject(obj: any) {
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