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
65dcd03f
Commit
65dcd03f
authored
Feb 24, 2021
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: update
parent
a60fd817
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
8 deletions
+5
-8
index.tsx
src/pages/lxMall/commodity/index.tsx
+0
-3
index.tsx
src/pages/lxMall/components/Information/index.tsx
+5
-5
No files found.
src/pages/lxMall/commodity/index.tsx
View file @
65dcd03f
...
...
@@ -13,9 +13,6 @@ import { store } from '@/store'
import
{
PublicApi
}
from
'@/services/api'
import
{
LAYOUT_TYPE
}
from
'@/constants'
import
{
PostSearchShopEnterpriseGetCommodityListResponseDetail
}
from
'@/services/SearchApi'
// import bannerImg from '@/assets/imgs/banner_2.png'
import
arrowDownIcon
from
'@/assets/imgs/arrow_down.png'
import
arrowDownActiveIcon
from
'@/assets/imgs/arrow_down_active.png'
import
styles
from
'./index.less'
interface
CommodityPropsType
{
...
...
src/pages/lxMall/components/Information/index.tsx
View file @
65dcd03f
...
...
@@ -27,7 +27,7 @@ const Information: React.FC<InformationPropsType> = (props) => {
/**
* 获取所有栏目
*/
const
fetchAllColumn
=
(
state
:
boolean
=
false
)
=>
{
const
fetchAllColumn
=
()
=>
{
PublicApi
.
getManageContentColumnAll
().
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setAllColumn
(
res
.
data
)
...
...
@@ -37,8 +37,8 @@ const Information: React.FC<InformationPropsType> = (props) => {
const
initLeadNewData
=
(
leadNewsList
)
=>
{
if
(
leadNewsList
.
length
>=
2
)
{
le
t
leftList
=
leadNewsList
.
slice
(
0
,
Math
.
round
(
leadNewsList
.
length
/
2
))
le
t
rightList
=
leadNewsList
.
slice
(
Math
.
round
(
leadNewsList
.
length
/
2
),
leadNewsList
.
length
)
cons
t
leftList
=
leadNewsList
.
slice
(
0
,
Math
.
round
(
leadNewsList
.
length
/
2
))
cons
t
rightList
=
leadNewsList
.
slice
(
Math
.
round
(
leadNewsList
.
length
/
2
),
leadNewsList
.
length
)
setLeadLeftNews
(
leftList
)
setLeadRightNews
(
rightList
)
}
else
{
...
...
@@ -52,7 +52,7 @@ const Information: React.FC<InformationPropsType> = (props) => {
*/
const
fetchLeadNews
=
async
()
=>
{
try
{
le
t
data
:
any
=
await
fetchNewByLabel
(
1
)
cons
t
data
:
any
=
await
fetchNewByLabel
(
1
)
data
&&
initLeadNewData
(
data
)
}
catch
(
error
)
{
console
.
log
(
error
)
...
...
@@ -62,7 +62,7 @@ const Information: React.FC<InformationPropsType> = (props) => {
const
renderColumns
=
()
=>
{
if
(
allColumn
&&
allColumn
.
length
>
0
)
{
let
labelList
=
allColumn
.
map
(
item
=>
item
.
name
)
le
t
showCount
=
4
cons
t
showCount
=
4
if
(
labelList
.
length
<=
showCount
)
{
return
labelList
.
join
(
' | '
)
}
else
{
...
...
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