Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-admin
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-admin
Commits
318ced22
Commit
318ced22
authored
Aug 26, 2021
by
卢均锐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 装修导航设置兼容b端
parent
fc863f1a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
9 deletions
+46
-9
index.tsx
...propsSettings/components/bottomNavigationClient/index.tsx
+46
-9
No files found.
src/pages/pageCustomized/mobileSettingPanel/propsSettings/components/bottomNavigationClient/index.tsx
View file @
318ced22
...
...
@@ -19,10 +19,12 @@ interface BottomNavigationClientProps {
/** 类型:1-首页 2-分类 3-进货单 4-工作台 5-我的 6-找现货 7-找供应 8-求购 9-换积分 10-找店铺 */
type
?:
any
,
// 当前选中组件的key
selectedKey
?:
any
selectedKey
?:
any
,
// 1.B端 2.C端 3.SRM
property
?:
1
|
2
|
3
}
const
RedirectTypeList
=
[
const
RedirectTypeList
_B
=
[
{
value
:
1
,
label
:
'首页'
,
...
...
@@ -37,7 +39,7 @@ const RedirectTypeList = [
},
{
value
:
4
,
label
:
'
工作台
'
,
label
:
'
消息
'
,
},
{
value
:
5
,
...
...
@@ -53,20 +55,47 @@ const RedirectTypeList = [
},
{
value
:
8
,
label
:
'
求购
'
,
label
:
'
换积分
'
,
},
{
value
:
9
,
label
:
'
换积分
'
,
label
:
'
找店铺
'
,
},
];
const
RedirectTypeList_C
=
[
{
value
:
10
,
label
:
'找店铺'
,
value
:
1
,
label
:
'首页'
,
},
{
value
:
2
,
label
:
'分类'
,
},
{
value
:
3
,
label
:
'购物车'
,
},
{
value
:
4
,
label
:
'我的'
,
},
{
value
:
5
,
label
:
'消息'
,
},
{
value
:
6
,
label
:
'积分兑换'
,
},
{
value
:
7
,
label
:
'在线客服'
,
},
];
const
BottomNavigationClient
:
React
.
FC
<
BottomNavigationClientProps
>
=
(
props
:
BottomNavigationClientProps
)
=>
{
const
{
defaultIcon
,
selectIcon
,
name
,
type
,
selectedKey
}
=
props
;
const
{
defaultIcon
,
selectIcon
,
name
,
type
,
property
=
2
,
selectedKey
}
=
props
;
const
_isNull
=
(
list
)
=>
{
let
_number
=
0
;
...
...
@@ -104,6 +133,14 @@ const BottomNavigationClient: React.FC<BottomNavigationClientProps> = (props: Bo
});
}
const
RedirectTypeList
=
useMemo
(()
=>
{
if
(
property
===
1
){
return
RedirectTypeList_B
}
else
if
(
property
===
2
){
return
RedirectTypeList_C
}
},
[
property
])
return
(
<
div
className=
{
styles
[
'bottomNavigationClient'
]
}
>
<
div
className=
{
styles
[
'bottomNavigationClient-box'
]
}
>
...
...
@@ -114,7 +151,7 @@ const BottomNavigationClient: React.FC<BottomNavigationClientProps> = (props: Bo
<
div
className=
{
styles
[
'bottomNavigationClient-box-label'
]
}
>
链接
</
div
>
<
Select
key=
{
`${selectedKey}-type`
}
defaultValue=
{
type
}
onChange=
{
_onChangeType
}
style=
{
{
width
:
'100%'
}
}
>
{
RedirectTypeList
.
map
(
selectItem
=>
<
Select
.
Option
value=
{
selectItem
.
value
}
key=
{
`redirect_type_${selectItem.value}`
}
>
{
selectItem
.
label
}
</
Select
.
Option
>)
RedirectTypeList
?
.
map
(
selectItem
=>
<
Select
.
Option
value=
{
selectItem
.
value
}
key=
{
`redirect_type_${selectItem.value}`
}
>
{
selectItem
.
label
}
</
Select
.
Option
>)
}
</
Select
>
</
div
>
...
...
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