Commit 65dcd03f authored by GuanHua's avatar GuanHua

fix: update

parent a60fd817
......@@ -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 {
......
......@@ -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) {
let leftList = leadNewsList.slice(0, Math.round(leadNewsList.length / 2))
let rightList = leadNewsList.slice(Math.round(leadNewsList.length / 2), leadNewsList.length)
const leftList = leadNewsList.slice(0, Math.round(leadNewsList.length / 2))
const 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 {
let data: any = await fetchNewByLabel(1)
const 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)
let showCount = 4
const showCount = 4
if (labelList.length <= showCount) {
return labelList.join(' | ')
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment