Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
shenshaokai
jinfa-platform
Commits
b967f7b2
Commit
b967f7b2
authored
Jun 23, 2021
by
前端-许佳敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改登录首页
parent
6e7c9a6d
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
11 deletions
+10
-11
router.ts
config/router.ts
+5
-1
app.tsx
src/app.tsx
+4
-4
UserHeader.tsx
src/layouts/components/UserHeader.tsx
+1
-1
index.tsx
src/utils/index.tsx
+0
-5
No files found.
config/router.ts
View file @
b967f7b2
...
@@ -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'
,
},
},
...
...
src/app.tsx
View file @
b967f7b2
...
@@ -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
...
...
src/layouts/components/UserHeader.tsx
View file @
b967f7b2
...
@@ -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
(()
=>
{
...
...
src/utils/index.tsx
View file @
b967f7b2
...
@@ -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]'
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment