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
前端-黄佳鑫
jinfa-platform
Commits
8722d315
Commit
8722d315
authored
Apr 01, 2021
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改获取权限路由的方式
parent
5d804078
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
21 additions
and
13 deletions
+21
-13
MenuSlider.tsx
src/layouts/components/MenuSlider.tsx
+4
-4
OuterSide.tsx
src/layouts/components/OuterSide.tsx
+1
-1
index.tsx
...ileSettingPanel/propsSettings/components/banner/index.tsx
+1
-0
index.tsx
...nel/propsSettings/components/recommendCommodity/index.tsx
+3
-1
index.tsx
src/pages/mobileTemplate/channelTemplateEdit/index.tsx
+2
-2
index.tsx
src/pages/mobileTemplate/shopTemplateEdit/index.tsx
+3
-2
auth.ts
src/utils/auth.ts
+7
-3
No files found.
src/layouts/components/MenuSlider.tsx
View file @
8722d315
...
...
@@ -28,11 +28,11 @@ const MenuSlider: React.FC<MenuSliderProps> = (props) => {
let
menuItemsCache
=
null
const
getMenuRouter
=
(
routes
:
any
,
pathname
:
any
)
=>
{
le
t
list
=
routes
.
filter
((
item
:
any
)
=>
pathname
.
indexOf
(
item
.
key
)
>
-
1
)
cons
t
list
=
routes
.
filter
((
item
:
any
)
=>
pathname
.
indexOf
(
item
.
key
)
>
-
1
)
return
list
[
0
]
}
const
getMenus
=
(
menuArray
:
any
,
hasChildren
:
boolean
=
false
)
=>
{
const
getMenus
=
(
menuArray
:
any
,
hasChildren
=
false
)
=>
{
if
(
!!
menuArray
&&
menuArray
.
length
>
0
)
{
return
menuArray
.
map
((
item
:
any
)
=>
{
// 不存在路由表内或者 需要隐藏
...
...
@@ -83,8 +83,8 @@ const MenuSlider: React.FC<MenuSliderProps> = (props) => {
}
const
clearHeightSearchParams
=
()
=>
{
le
t
currentState
=
JSON
.
parse
(
sessionStorage
.
getItem
(
"currentState"
))
le
t
result
=
{...
currentState
,
queryParams
:
{},
current
:
1
}
cons
t
currentState
=
JSON
.
parse
(
sessionStorage
.
getItem
(
"currentState"
))
cons
t
result
=
{...
currentState
,
queryParams
:
{},
current
:
1
}
sessionStorage
.
setItem
(
"currentState"
,
JSON
.
stringify
(
result
))
}
...
...
src/layouts/components/OuterSide.tsx
View file @
8722d315
...
...
@@ -19,7 +19,7 @@ export interface OuterSiderProps {
const
OuterSider
:
React
.
FC
<
OuterSiderProps
>
=
observer
((
props
)
=>
{
const
{
menuData
,
pathname
=
"/"
}
=
props
const
authRouters
=
getRouters
()
let
defaultSelectedKeys
:
string
=
""
let
defaultSelectedKeys
=
""
const
isAuthPath
=
(
path
)
=>
{
if
(
isDev
)
{
...
...
src/pages/editor/mobileSettingPanel/propsSettings/components/banner/index.tsx
View file @
8722d315
...
...
@@ -75,6 +75,7 @@ const Banner: React.FC<BannerPropsType> = (props) => {
const
[
productRowSelection
,
productRowCtl
]
=
useRowSelectionTable
({
type
:
'radio'
})
useEffect
(()
=>
{
console
.
log
(
storeId
,
"storeId"
)
initDataList
()
},
[
dataList
])
...
...
src/pages/editor/mobileSettingPanel/propsSettings/components/recommendCommodity/index.tsx
View file @
8722d315
...
...
@@ -40,7 +40,7 @@ interface BannerPropsType {
const
RecommendCommodity
:
React
.
FC
<
BannerPropsType
>
=
(
props
)
=>
{
const
{
title
,
storeId
,
productIdList
,
dataList
}
=
props
const
{
title
,
storeId
,
productIdList
=
[]
,
dataList
}
=
props
const
[
expandState
,
setExpandState
]
=
useState
<
boolean
>
(
true
)
const
[
list
,
setList
]
=
useState
<
DataItemType
[]
>
([])
const
[
modalVisible
,
setModalVisible
]
=
useState
<
boolean
>
(
false
)
...
...
@@ -193,8 +193,10 @@ const RecommendCommodity: React.FC<BannerPropsType> = (props) => {
message
.
info
(
"请选择"
)
return
null
}
selectedRowKeys
=
[...
productIdList
,
...
selectedRowKeys
]
const
commodityList
=
await
fetchCategoryByCommodityId
(
selectedRowKeys
)
changeProps
({
props
:
Object
.
assign
({
...
props
},
{
productIdList
:
selectedRowKeys
,
...
...
src/pages/mobileTemplate/channelTemplateEdit/index.tsx
View file @
8722d315
...
...
@@ -192,9 +192,9 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
mobileChannelHeaderNav
[
mobileChannelHeaderNav
.
key
].
props
.
styleTheme
=
appConfig
?.
topBO
.
style
mobileChannelHeaderNav
[
mobileChannelHeaderNav
.
key
].
props
.
dataList
=
appConfig
?.
topBO
.
topDetailsBOList
}
if
(
appConfig
?.
advertBO
)
{
mobileBanner
[
mobileBanner
.
key
].
props
.
channelMemberId
=
channelInfo
.
memberId
if
(
appConfig
?.
advertBO
)
{
mobileBanner
[
mobileBanner
.
key
].
props
.
dataList
=
appConfig
?.
advertBO
.
advertDetailsBOList
}
...
...
src/pages/mobileTemplate/shopTemplateEdit/index.tsx
View file @
8722d315
...
...
@@ -161,9 +161,9 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
if
(
appConfig
?.
backdropBO
)
{
mobileShopHeaderNav
[
mobileShopHeaderNav
.
key
].
props
.
backdrop
=
appConfig
?.
backdropBO
.
backdrop
}
if
(
appConfig
?.
advertBO
)
{
mobileBanner
[
mobileBanner
.
key
].
props
.
storeId
=
shopInfo
.
id
if
(
appConfig
?.
advertBO
)
{
mobileBanner
[
mobileBanner
.
key
].
props
.
dataList
=
appConfig
?.
advertBO
.
advertDetailsBOList
}
...
...
@@ -182,6 +182,7 @@ const mobileShopTempleteEdit: React.FC<ShopPreviewPropsType> = (props) => {
}
else
{
mobileShopCommodityList
[
mobileShopCommodityList
.
key
].
props
.
storeId
=
shopInfo
.
id
mobileShopCommodityList
[
mobileShopCommodityList
.
key
].
props
.
title
=
'热销商品'
mobileShopCommodityList
[
mobileShopCommodityList
.
key
].
props
.
productIdList
=
[]
}
const
config
=
{
...
...
src/utils/auth.ts
View file @
8722d315
...
...
@@ -4,7 +4,7 @@ export interface AuthInfo {
userId
:
number
,
memberId
:
number
,
name
:
string
,
token
:
string
token
:
string
,
}
export
const
setAuth
=
(
info
:
AuthInfo
)
=>
{
...
...
@@ -26,8 +26,12 @@ export const setRouters = (routers: any[]) => {
export
const
getRouters
=
():
string
[]
=>
{
try
{
const
sessionRt
=
window
.
sessionStorage
.
getItem
(
'rt'
)
return
sessionRt
?
JSON
.
parse
(
sessionRt
)
:
[]
const
localAuth
=
window
.
localStorage
.
getItem
(
'auth'
)
if
(
localAuth
)
{
const
userInfo
=
JSON
.
parse
(
localAuth
)
return
userInfo
.
urls
?
userInfo
.
urls
:
[]
}
return
[]
}
catch
(
error
)
{
return
[]
}
...
...
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