diff --git a/web/client/src/sections/quanju/containers/footer/conserve/right/right-center.js b/web/client/src/sections/quanju/containers/footer/conserve/right/right-center.js index 64147c84..5aad0bdd 100644 --- a/web/client/src/sections/quanju/containers/footer/conserve/right/right-center.js +++ b/web/client/src/sections/quanju/containers/footer/conserve/right/right-center.js @@ -14,7 +14,8 @@ const RightCenter = (props) => { const style = { height: "31%", marginTop: "3%" } const textStyle = { fontSize: 14, color: '#E9F7FF' } const numStyle = { color: '#fff', fontSize: 21, fontFamily: 'YouSheBiaoTiHei', textShadow: '0px 0px 8px #1C60FE', marginTop: 8 } - const list = highwaysData?.slice(4, 8).map((h,index)=>{ + let list = highwaysData?.sort((a, b) => a.id - b.id) + list = highwaysData?.slice(4, 8).map((h,index)=>{ return { id:h.id, name:h.name, diff --git a/web/client/src/sections/quanju/containers/footer/conserve/right/right-top.js b/web/client/src/sections/quanju/containers/footer/conserve/right/right-top.js index e264b79d..11ed88f3 100644 --- a/web/client/src/sections/quanju/containers/footer/conserve/right/right-top.js +++ b/web/client/src/sections/quanju/containers/footer/conserve/right/right-top.js @@ -16,13 +16,14 @@ const RightTop = (props) => { const style = { height: "31%", marginTop: "3%" } const textStyle = { fontSize: 14, color: '#E9F7FF' } const numStyle = { color: '#fff', fontSize: 21, fontFamily: 'YouSheBiaoTiHei', textShadow: '0px 0px 8px #1C60FE', marginTop: 8 } - const list = highwaysData?.slice(0, 4).map((h,index)=>{ + let list = highwaysData?.sort((a, b) => a.id - b.id) + list = highwaysData?.slice(0, 4).map((h, index) => { return { - id:h.id, - name:h.name, - count:h.count, - unit:unit[index], - icon:iconSrc[index] + id: h.id, + name: h.name, + count: h.count, + unit: unit[index], + icon: iconSrc[index] } }) diff --git a/web/client/src/sections/quanju/containers/heand/index.js b/web/client/src/sections/quanju/containers/heand/index.js index 92f01e00..e2c4a82a 100644 --- a/web/client/src/sections/quanju/containers/heand/index.js +++ b/web/client/src/sections/quanju/containers/heand/index.js @@ -21,7 +21,7 @@ const Header = (props) => {