Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gaohuaxue-mobile-app
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
前端-苏志权
gaohuaxue-mobile-app
Commits
e2760265
Commit
e2760265
authored
Apr 21, 2023
by
赵振东
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 首页列表,增加关联NC且是集团供应商/采购商的判断
parent
0814c0d5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
index.tsx
src/views/Home/index.tsx
+10
-2
No files found.
src/views/Home/index.tsx
View file @
e2760265
...
...
@@ -22,6 +22,7 @@ import { getMemberMobileLoginReget } from '../../services/MemberV2Api';
import
{
getAsyncStorage
}
from
'../../utils/storage'
;
import
{
USER_INFO
}
from
'../../constants'
;
import
i18n
from
'../../locales'
;
import
{
useCurrentRole
}
from
'../../hooks/useCurrentRole'
;
type
HomeNavigationProp
=
CompositeScreenProps
<
RootTabScreenProps
<
'Home'
>
,
...
...
@@ -59,6 +60,7 @@ const Home: React.FC<HomeNavigationProp> = ({ navigation, route }) => {
const
{
t
}
=
useLocale
(
'home'
);
const
[
userInfo
,
setUerInfo
]
=
useState
({});
const
[
initColumn
,
setInitColumn
]
=
useState
([]);
const
{
role
:
currentRole
}
=
useCurrentRole
();
const
column
=
[
{
label
:
t
(
'home.OrderList.1'
),
icon
:
order
,
route
:
'OrderList'
},
...
...
@@ -111,8 +113,8 @@ const Home: React.FC<HomeNavigationProp> = ({ navigation, route }) => {
useEffect
(()
=>
{
const
_roleType
=
getCurrentRole
()?.
roleType
;
// 会员角色类型,1-服务提供者,2-服务消费者
if
(
_roleType
===
roleType
.
provider
)
{
const
_column
=
[...
column
];
if
(
_roleType
===
roleType
.
provider
)
{
_column
.
splice
(
3
,
1
,
{
label
:
t
(
'home.CheckQuotationOrder'
),
icon
:
verify
,
...
...
@@ -123,10 +125,16 @@ const Home: React.FC<HomeNavigationProp> = ({ navigation, route }) => {
icon
:
offer
,
route
:
'CheckRequireOrder'
,
});
if
(
userInfo
.
businessProcessingSystem
===
1
&&
(
currentRole
?.
roleName
===
'集团供应商'
||
currentRole
?.
roleName
===
'集团采购商'
))
{
_column
.
splice
(
1
,
1
)
}
setInitColumn
(
_column
);
return
;
}
setInitColumn
(
column
);
if
(
userInfo
.
businessProcessingSystem
===
1
&&
(
currentRole
?.
roleName
===
'集团供应商'
||
currentRole
?.
roleName
===
'集团采购商'
))
{
_column
.
splice
(
1
,
1
)
}
setInitColumn
(
_column
);
},
[
userInfo
?.
memberRoleId
]);
const
jumpSetting
=
()
=>
{
...
...
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