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
af03fe01
Commit
af03fe01
authored
Jun 14, 2022
by
吴婷
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wuting-jinfa-0518' into 'jinfa-0518'
fix: 修改公司图片更多按钮的显示判断 See merge request project/jinfa-mall!6
parents
7ec9ec92
3b00d175
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
51 deletions
+49
-51
index.tsx
apps/b2b/web/page/shop/components/album/index.tsx
+3
-1
index.tsx
.../srm/web/page/shopIndex/components/CompanyAlbum/index.tsx
+46
-50
No files found.
apps/b2b/web/page/shop/components/album/index.tsx
View file @
af03fe01
...
...
@@ -38,7 +38,9 @@ const Album: React.FC<AlbumProps> = (props) => {
</
div
>
)
}
<
div
className=
{
styles
.
more_img
}
onClick=
{
()
=>
history
.
push
(
moreImgLink
)
}
>
{
getMessage
(
'shop.album.morePhoto'
)
}
</
div
>
{
workshopPics
.
length
>
3
&&
<
div
className=
{
styles
.
more_img
}
onClick=
{
()
=>
history
.
push
(
moreImgLink
)
}
>
{
getMessage
(
'shop.album.morePhoto'
)
}
</
div
>
}
</
div
>
</
div
>
</
div
>
...
...
apps/srm/web/page/shopIndex/components/CompanyAlbum/index.tsx
View file @
af03fe01
import
React
,
{
useState
}
from
'react'
import
styles
from
'./index.less'
import
bannerImg
from
'./1.png'
import
{
useMessageIntl
}
from
'@linkseeks/lingxi-utils'
import
React
,
{
useState
}
from
"react"
;
import
styles
from
"./index.less"
;
import
bannerImg
from
"./1.png"
;
import
{
useMessageIntl
}
from
"@linkseeks/lingxi-utils"
;
interface
Props
{
companyImgList
?:
Array
<
any
>
,
shopMessageId
?:
string
companyImgList
?:
Array
<
any
>
;
shopMessageId
?:
string
;
}
function
CompanyAlbum
(
props
:
Props
)
{
const
{
companyImgList
=
[
bannerImg
,
bannerImg
],
shopMessageId
}
=
props
const
{
getMessage
}
=
useMessageIntl
()
return
(
<
div
className=
{
styles
[
'img-warp'
]
}
>
<
div
className=
{
styles
[
'title'
]
}
>
{
getMessage
(
'locales.gongsixiangce'
,
'公司相册'
)
}
</
div
>
<
ul
className=
{
styles
[
'box-warp'
]
}
>
<
li
className=
{
styles
[
'img-left'
]
}
>
<
img
src=
{
companyImgList
[
0
]
}
alt=
""
/>
</
li
>
<
li
className=
{
styles
[
'img-right'
]
}
>
{
companyImgList
[
1
]
&&
<
div
className=
{
styles
[
'img-rifht-top'
]
}
><
img
src=
{
companyImgList
[
1
]
}
alt=
""
/></
div
>
}
{
companyImgList
.
length
>=
2
&&
<
li
className=
{
styles
[
'box-warp'
]
}
>
{
companyImgList
.
map
((
url
:
string
,
index
:
number
)
=>
{
if
(
index
<
2
){
return
;
}
if
(
index
==
4
){
return
<
div
className=
{
`${styles['box-left']} ${styles['show-more']}`
}
>
{
getMessage
(
'locales.gengduozhaopian'
,
'更多照片'
)
}
<
a
href=
{
`/aboutUs/${shopMessageId}`
}
className=
'all-jump'
></
a
>
</
div
>
}
if
(
index
>
2
){
return
;
}
return
<
div
key=
{
index
+
'img'
}
className=
{
styles
[
'box-left'
]
}
><
img
src=
{
url
}
alt=
""
/></
div
>
})
}
</
li
>
}
</
li
>
</
ul
>
</
div
>
)
const
{
companyImgList
=
[
bannerImg
,
bannerImg
],
shopMessageId
}
=
props
;
const
{
getMessage
}
=
useMessageIntl
();
return
(
<
div
className=
{
styles
[
"img-warp"
]
}
>
<
div
className=
{
styles
[
"title"
]
}
>
{
getMessage
(
"locales.gongsixiangce"
,
"公司相册"
)
}
</
div
>
<
ul
className=
{
styles
[
"box-warp"
]
}
>
<
li
className=
{
styles
[
"img-left"
]
}
>
<
img
src=
{
companyImgList
[
0
]
}
alt=
""
/>
</
li
>
<
li
className=
{
styles
[
"img-right"
]
}
>
{
companyImgList
[
1
]
&&
(
<
div
className=
{
styles
[
"img-rifht-top"
]
}
>
<
img
src=
{
companyImgList
[
1
]
}
alt=
""
/>
</
div
>
)
}
{
companyImgList
.
length
>
2
&&
(
<
li
className=
{
styles
[
"box-warp"
]
}
>
<
div
className=
{
styles
[
"box-left"
]
}
>
<
img
src=
{
companyImgList
[
2
]
}
alt=
""
/>
</
div
>
{
companyImgList
.
length
>
3
&&
(
<
div
className=
{
`${styles["box-left"]} ${styles["show-more"]}`
}
>
{
getMessage
(
"locales.gengduozhaopian"
,
"更多照片"
)
}
<
a
href=
{
`/aboutUs/${shopMessageId}`
}
className=
"all-jump"
></
a
>
</
div
>
)
}
</
li
>
)
}
</
li
>
</
ul
>
</
div
>
);
}
export
default
CompanyAlbum
export
default
CompanyAlbum
;
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