Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-mall
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-mall
Commits
2f74c539
Commit
2f74c539
authored
Mar 03, 2022
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: srm针对单个采购门户的链接处理
parent
bccabccf
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
60 additions
and
57 deletions
+60
-57
index.tsx
apps/srm/web/components/SelectMall/index.tsx
+1
-2
index.tsx
apps/srm/web/components/ShopTop/index.tsx
+46
-42
index.tsx
apps/srm/web/components/TopBar/index.tsx
+10
-10
mallLayout.tsx
apps/srm/web/layout/mallLayout.tsx
+1
-1
shopLayout.tsx
apps/srm/web/layout/shopLayout.tsx
+2
-2
No files found.
apps/srm/web/components/SelectMall/index.tsx
View file @
2f74c539
...
...
@@ -51,7 +51,7 @@ const SelectMall: React.FC<SelectMallProps> = (props) => {
// className={styles.selectLangBox}
// >
<
Space
style=
{
{
cursor
:
'pointer'
}
}
size=
{
5
}
>
<
a
href=
{
PLATFORM_DOMAIN
}
>
{
getMessage
(
'locales.huanyinglaidaoguoneizhan'
,
'欢迎来到国内站'
)
}
</
a
>
<
span
>
{
getMessage
(
'locales.huanyinglaidaoguoneizhan'
,
'欢迎来到国内站'
)
}
</
span
>
{
/* <CaretDownOutlined translate={0} /> */
}
</
Space
>
// </Dropdown>
...
...
@@ -59,4 +59,3 @@ const SelectMall: React.FC<SelectMallProps> = (props) => {
}
export
default
observer
(
SelectMall
)
apps/srm/web/components/ShopTop/index.tsx
View file @
2f74c539
import
React
,
{
useState
,
useEffect
}
from
'react'
import
styles
from
'./index.less'
import
quality
from
'./quality.png'
import
{
CaretDownOutlined
}
from
'@ant-design/icons'
import
React
,
{
useState
,
useEffect
}
from
"react"
;
import
styles
from
"./index.less"
;
import
quality
from
"./quality.png"
;
import
{
CaretDownOutlined
}
from
"@ant-design/icons"
;
import
envConfig
from
"../../../env.config"
;
interface
Props
{
shopMessage
:
any
,
shopId
:
any
logo
?:
string
shopMessage
:
any
;
shopId
:
any
;
logo
?:
string
;
}
function
ShopTop
(
props
:
Props
)
{
const
{
shopMessage
,
logo
}
=
props
;
const
[
shopMessageNew
,
setShopMessageNew
]
=
useState
({});
console
.
log
(
shopMessage
,
'这里是shopMessage的啦啦啦'
);
useEffect
(()
=>
{
console
.
log
(
shopMessage
);
if
(
shopMessage
){
setShopMessageNew
({...
shopMessage
});
}
},
[
shopMessage
])
return
(
<
div
className=
{
styles
[
'company-man'
]
}
>
<
div
style=
{
{
position
:
'relative'
}
}
>
<
img
src=
{
logo
}
alt=
""
className=
{
styles
[
'logn-img'
]
}
/>
<
a
href=
"/"
className=
"all-jump"
></
a
>
</
div
>
<
div
className=
{
styles
[
'company-logo'
]
}
>
<
img
src=
{
shopMessageNew
?.
logo
}
alt=
""
className=
{
styles
[
'company-logo'
]
}
/>
<
a
href=
{
`/shopIndex/${shopMessageNew?.id}`
}
className=
"all-jump"
></
a
>
</
div
>
<
ul
>
<
li
className=
{
styles
[
'company-title'
]
}
>
{
shopMessageNew
?
shopMessageNew
.
memberName
:
''
}
<
CaretDownOutlined
className=
{
styles
[
'company-icon'
]
}
translate=
{
0
}
/>
</
li
>
<
li
>
function
ShopTop
(
props
:
Props
)
{
const
{
shopMessage
,
logo
}
=
props
;
const
[
shopMessageNew
,
setShopMessageNew
]
=
useState
<
any
>
({});
<
img
src=
{
quality
}
alt=
""
/>
<
span
className=
{
styles
[
'quality-tips'
]
}
>
{
shopMessageNew
?
shopMessageNew
.
creditPoint
:
'-'
}
</
span
>
</
li
>
</
ul
>
</
div
>
)
useEffect
(()
=>
{
if
(
shopMessage
)
{
setShopMessageNew
({
...
shopMessage
});
}
},
[
shopMessage
]);
return
(
<
div
className=
{
styles
[
"company-man"
]
}
>
<
div
style=
{
{
position
:
"relative"
}
}
>
<
img
src=
{
logo
}
alt=
""
className=
{
styles
[
"logn-img"
]
}
/>
<
a
href=
{
envConfig
.
SINGLE_SRM
!==
'undefined'
?
`/shopIndex/${shopMessageNew?.id}`
:
'/'
}
className=
"all-jump"
></
a
>
</
div
>
<
div
className=
{
styles
[
"company-logo"
]
}
>
<
img
src=
{
shopMessageNew
?.
logo
}
alt=
""
className=
{
styles
[
"company-logo"
]
}
/>
<
a
href=
{
`/shopIndex/${shopMessageNew?.id}`
}
className=
"all-jump"
></
a
>
</
div
>
<
ul
>
<
li
className=
{
styles
[
"company-title"
]
}
>
{
shopMessageNew
?
shopMessageNew
.
memberName
:
""
}
<
CaretDownOutlined
className=
{
styles
[
"company-icon"
]
}
translate=
{
0
}
/>
</
li
>
<
li
>
<
img
src=
{
quality
}
alt=
""
/>
<
span
className=
{
styles
[
"quality-tips"
]
}
>
{
shopMessageNew
?
shopMessageNew
.
creditPoint
:
"-"
}
</
span
>
</
li
>
</
ul
>
</
div
>
);
}
export
default
ShopTop
export
default
ShopTop
;
apps/srm/web/components/TopBar/index.tsx
View file @
2f74c539
...
...
@@ -23,7 +23,8 @@ import styles from './index.less'
import
{
GlobalConfig
}
from
'@/global/config'
interface
FilterTopPropsType
{
userInfo
?:
UserInfoType
,
mallInfo
:
MallInfoType
mallInfo
:
MallInfoType
,
mallHomePath
:
string
,
}
type
WsMessage
=
{
...
...
@@ -45,7 +46,7 @@ type WsMessage = {
const
FilterTop
:
SFC
<
FilterTopPropsType
>
=
(
props
)
=>
{
// const { langComponent, name, type, shopUrlParam } = props
const
{
userInfo
,
mallInfo
}
=
props
const
{
userInfo
,
mallInfo
,
mallHomePath
}
=
props
const
SiteStore
:
SiteStoreModal
=
useLocalStore
(()
=>
new
store
().
SiteStore
)
const
{
siteUrl
}
=
SiteStore
const
{
getMessage
}
=
useMessageIntl
()
...
...
@@ -60,12 +61,12 @@ const FilterTop: SFC<FilterTopPropsType> = (props) => {
}
/**
* 跳转IM
*/
const
fnToChatRoom
=
()
=>
{
if
(
userInfo
)
{
toChatRoom
(
userInfo
.
memberId
+
''
,
Number
(
mallInfo
.
type
))
}
* 跳转IM
*/
const
fnToChatRoom
=
()
=>
{
if
(
userInfo
)
{
toChatRoom
(
userInfo
.
memberId
+
''
,
Number
(
mallInfo
.
type
))
}
}
const
ws
=
useRef
<
WebSocket
|
null
>
(
null
);
...
...
@@ -101,7 +102,6 @@ const FilterTop: SFC<FilterTopPropsType> = (props) => {
};
},
[
ws
,
webSocketInit
,
userInfo
]);
return
(
<
div
className=
{
styles
.
topbar
}
>
<
div
className=
{
styles
.
topbar_container
}
>
...
...
@@ -118,7 +118,7 @@ const FilterTop: SFC<FilterTopPropsType> = (props) => {
{
userInfo
?
(
<
li
className=
{
cx
(
styles
.
topbar_menu_item
,
styles
.
username
)
}
>
<
a
className=
{
styles
.
username
}
href=
'/'
>
{
userInfo
.
name
}
</
a
>
<
a
className=
{
styles
.
username
}
href=
{
mallHomePath
}
>
{
userInfo
.
name
}
</
a
>
<
CaretDownOutlined
className=
{
styles
.
arrow_icon
}
translate=
{
0
}
/>
<
div
className=
{
styles
.
userInfo_card_split
}
></
div
>
<
div
className=
{
styles
.
userInfo_card
}
>
...
...
apps/srm/web/layout/mallLayout.tsx
View file @
2f74c539
...
...
@@ -36,7 +36,7 @@ const MallLayout: SFC<LayoutProps> = (props: LayoutProps): JSX.Element | null =>
return
(
<>
<
TopBar
mallInfo=
{
mallInfo
}
userInfo=
{
userInfo
}
/>
<
TopBar
mallInfo=
{
mallInfo
}
userInfo=
{
userInfo
}
mallHomePath=
'/'
/>
<
Header
logo=
{
mallInfo
?.
logoUrl
||
''
}
/>
<
MainNav
/>
<
div
className=
{
styles
.
container
}
>
...
...
apps/srm/web/layout/shopLayout.tsx
View file @
2f74c539
...
...
@@ -36,7 +36,7 @@ const MallLayout: SFC<LayoutProps> = (
* 查询采购商户信息
*/
const
getMemberPurchaseMain
=
(
id
:
any
)
=>
{
let
par
=
{
let
par
:
any
=
{
id
:
urlParam
?.
id
,
memberId
:
""
,
roleId
:
""
...
...
@@ -86,7 +86,7 @@ const MallLayout: SFC<LayoutProps> = (
return
(
<
div
>
<
TopBar
mallInfo=
{
mallInfo
}
userInfo=
{
userInfo
}
/>
<
TopBar
mallInfo=
{
mallInfo
}
userInfo=
{
userInfo
}
mallHomePath=
{
envConfig
.
SINGLE_SRM
!==
'undefined'
?
`${SRM_CENTER_URL}/shopIndex/${urlParam?.id}`
:
''
}
/>
<
ShopTop
shopMessage=
{
{
...
shopMessage
}
}
logo=
{
mallInfo
?.
logoUrl
}
...
...
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