更新门户顶部新闻

master
JayChou 2 weeks ago
parent 6e19138507
commit 3ded921828
  1. 1
      jeecgboot-vue3/src/assets/icons/jigou.svg
  2. 1
      jeecgboot-vue3/src/assets/icons/quan.svg
  3. 1
      jeecgboot-vue3/src/assets/icons/yiqi.svg
  4. 80
      jeecgboot-vue3/src/views/demo/main-home/components/homePage/index.vue
  5. 6
      jeecgboot-vue3/src/views/demo/main-home/components/newsInfo/index.vue

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1731117507634" class="icon" viewBox="0 0 1088 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6962" xmlns:xlink="http://www.w3.org/1999/xlink" width="212.5" height="200"><path d="M1020.138667 955.84c11.093333 0 21.397333-0.042667 31.68 0 21.226667 0.128 36.202667 14.229333 36.181333 34.048 0 19.669333-15.274667 34.090667-36.266667 34.090667H36.352c-18.986667 0-33.472-11.456-35.925333-28.266667-2.645333-17.984 7.253333-33.92 24.362666-38.613333 3.776-1.024 7.872-1.152 11.84-1.216 10.069333-0.149333 20.138667-0.042667 31.36-0.042667v-10.069333V104.213333C67.989333 54.570667 99.498667 13.802667 146.773333 2.730667c8.149333-1.92 16.746667-2.602667 25.130667-2.602667C329.173333-0.021333 486.4-0.021333 643.648 0.042667c60.138667 0.042667 104.341333 44.693333 104.341333 105.301333 0.042667 280.042667 0.021333 560.085333 0.021334 840.128v9.770667h203.754666c0.128-2.346667 0.362667-4.842667 0.362667-7.338667V447.509333c0-24.064-13.717333-37.888-37.482667-37.930666-21.610667 0-43.242667 0.213333-64.853333-0.085334-17.877333-0.256-31.616-13.184-33.685333-30.976-1.856-16.042667 9.237333-31.914667 25.450666-36.053333 3.370667-0.853333 6.976-0.981333 10.474667-1.002667 21.632-0.085333 43.242667-0.085333 64.874667-0.042666 58.261333 0.149333 103.146667 45.034667 103.189333 103.658666 0.106667 167.04 0.042667 334.08 0.042667 501.098667v9.664z m-884.266667-0.448h543.914667c0.106667-2.730667 0.298667-5.013333 0.298666-7.317333V105.792c0-23.573333-13.824-37.525333-37.162666-37.525333-156.778667 0-313.557333 0-470.336 0.042666-3.712 0-7.573333 0.192-11.157334 1.109334-16.704 4.266667-25.578667 17.408-25.578666 37.418666V955.392z m271.744-545.813333c-33.6 0-67.2 0.149333-100.8-0.064-22.762667-0.128-38.314667-19.072-34.133333-41.066667 2.858667-15.146667 16.192-26.88 31.893333-26.922667 68.842667-0.170667 137.685333-0.213333 206.528 0 18.517333 0.064 32.64 15.210667 32.661333 33.813334a33.6 33.6 0 0 1-33.92 34.154666c-34.090667 0.256-68.16 0.085333-102.229333 0.085334z m-0.213333 273.173333c34.517333 0 69.077333-0.341333 103.616 0.128 24.746667 0.32 40.426667 26.581333 29.44 48.725333-6.613333 13.290667-17.856 19.306667-32.64 19.285334-66.496-0.064-132.992-0.021333-199.466667-0.021334l-2.837333-0.021333a34.197333 34.197333 0 0 1-33.706667-33.92 33.706667 33.706667 0 0 1 33.365333-34.112c34.069333-0.277333 68.138667-0.085333 102.208-0.064z m0.32-102.613333c-33.6 0-67.2 0.213333-100.8-0.085334-25.237333-0.213333-41.664-23.530667-32.661334-46.229333 5.589333-14.144 16.618667-21.802667 31.616-21.866667 67.904-0.256 135.808-0.277333 203.690667-0.021333 19.968 0.064 34.410667 15.296 34.197333 34.666667-0.213333 18.986667-14.656 33.301333-34.56 33.450666-33.813333 0.256-67.626667 0.064-101.482666 0.064z" fill="#002E97" p-id="6963"></path></svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1731117532645" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9173" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M430.20729 956.914497c-22.705863 0-44.035612-8.944734-59.86091-25.286074l-68.117588-70.181757c-12.213002-12.729044-12.040988-32.854695 0.688056-45.239711 14.277171-13.933143 22.18982-32.510667 22.533848-52.464304 0.172014-19.953637-7.396607-38.703175-21.32975-52.980346-27.866286-28.554342-77.062322-29.070385-105.44465-1.376113-6.020494 6.020494-15.309256 9.116748-22.705863 9.116748-8.428691-0.172014-16.685369-3.612296-22.533848-9.804804l-67.945574-70.009743c-15.48127-15.825298-24.081975-36.983034-23.737947-59.344868 0.172014-22.361834 9.288762-43.347556 25.286074-59.00084L530.147489 86.179069c32.166639-31.306568 87.211154-30.618512 118.345708 1.376113l68.117588 70.181757c12.213002 12.729044 12.040988 32.854695-0.688056 45.239711-14.277171 13.933143-22.18982 32.682681-22.533848 52.464304s7.396607 38.703175 21.157736 52.980346c27.866286 28.554342 77.062322 29.070385 105.616664 1.204099 6.020494-6.020494 14.621199-8.428691 22.705863-9.116748 8.428691 0.172014 16.685369 3.612296 22.533848 9.804804l67.945574 70.181757c15.48127 15.653284 24.081975 36.81102 23.737947 59.172854-0.172014 22.361834-9.116748 43.347556-25.11406 59.00084L488.692088 933.004536C472.86679 948.485805 452.053082 956.914497 430.20729 956.914497zM367.766168 837.192676l48.335965 49.884092c7.224593 7.396607 20.297665 7.568621 27.866286 0.172014l443.452377-434.507643c3.78431-3.78431 5.84848-8.600706 6.020494-13.933143 0-5.160423-1.892155-10.148833-5.676466-13.761129l-48.335965-49.884092c-21.32975 12.901058-45.755753 19.609609-71.213842 19.609609-37.67109 0-72.933983-14.793214-99.252142-41.799429-25.802117-26.490173-39.907274-61.409037-39.391231-98.392071 0.344028-26.146145 7.740635-51.088191 21.501764-72.589955l-48.335965-49.884092c-7.224593-7.396607-20.297665-7.568621-27.866286-0.172014L131.41878 566.442466c-3.78431 3.78431-5.84848 8.600706-6.020494 13.933143 0 5.332437 1.892155 10.148833 5.676466 13.933143l48.335965 49.884092c21.32975-12.901058 45.755753-19.609609 71.213842-19.609609 37.67109 0 72.933983 14.793214 99.252142 41.799429 25.802117 26.490173 39.907274 61.409037 39.391231 98.392071C388.923904 790.748866 381.527297 815.690912 367.766168 837.192676z" fill="#002E97" p-id="9174"></path><path d="M354.177054 583.127835c-8.256677 0-16.341341-3.096254-22.705863-9.460776-12.55703-12.55703-12.55703-32.682681 0-45.239711l178.722661-178.722661c12.55703-12.55703 32.682681-12.55703 45.239711 0 12.55703 12.55703 12.55703 32.682681 0 45.239711L376.882916 573.839073C370.518394 580.031581 362.433731 583.127835 354.177054 583.127835z" fill="#002E97" p-id="9175"></path><path d="M449.816899 678.76768c-8.256677 0-16.341341-3.096254-22.705863-9.460776-12.55703-12.55703-12.55703-32.682681 0-45.239711L605.833697 445.516546c12.55703-12.55703 32.682681-12.55703 45.239711 0 12.55703 12.55703 12.55703 32.682681 0 45.239711L472.350748 669.478918C466.15824 675.671426 457.901562 678.76768 449.816899 678.76768z" fill="#002E97" p-id="9176"></path></svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1731117383742" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4646" data-spm-anchor-id="a313x.search_index.0.i6.75613a81BwdBMm" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M149.333333 853.333333h725.333334v85.333334H149.333333v-85.333334z" fill="#002E97" p-id="4647" data-spm-anchor-id="a313x.search_index.0.i11.75613a81BwdBMm" class=""></path><path d="M768 672c0-102.144-78.357333-181.333333-170.666667-181.333333v-85.333334c143.317333 0 256 121.386667 256 266.666667S740.650667 938.666667 597.333333 938.666667v-85.333334c92.309333 0 170.666667-79.189333 170.666667-181.333333z" fill="#002E97" p-id="4648" data-spm-anchor-id="a313x.search_index.0.i7.75613a81BwdBMm" class=""></path><path d="M457.28 214.848a149.333333 149.333333 0 1 1 211.2 211.2l-196.117333 196.096a42.666667 42.666667 0 0 1-60.330667 0l-150.848-150.848a42.666667 42.666667 0 0 1 0-60.330667l196.096-196.117333z m150.848 60.352a64 64 0 0 0-90.517333 0l-165.930667 165.930667 90.517333 90.496 165.930667-165.930667a64 64 0 0 0 0-90.496z" fill="#002E97" p-id="4649" data-spm-anchor-id="a313x.search_index.0.i8.75613a81BwdBMm" class=""></path><path d="M758.976 184.682667l-120.682667 120.682666-60.330666-60.352 120.682666-120.682666 60.330667 60.352z" fill="#002E97" p-id="4650" data-spm-anchor-id="a313x.search_index.0.i9.75613a81BwdBMm" class=""></path><path d="M683.541333 79.082667l120.682667 120.682666-60.330667 60.352-120.682666-120.682666 60.330666-60.352z" fill="#002E97" p-id="4651" data-spm-anchor-id="a313x.search_index.0.i12.75613a81BwdBMm" class=""></path><path d="M230.997333 380.8a42.666667 42.666667 0 0 1 60.330667 0l211.2 211.178667a42.666667 42.666667 0 0 1 0 60.330666l-90.517333 90.517334a42.666667 42.666667 0 0 1-60.330667 0l-211.2-211.2a42.666667 42.666667 0 0 1 0-60.330667l90.517333-90.517333z m30.165334 90.496l-30.165334 30.165333 150.848 150.848 30.165334-30.165333-150.826667-150.848z" fill="#002E97" p-id="4652" data-spm-anchor-id="a313x.search_index.0.i10.75613a81BwdBMm" class=""></path><path d="M682.666667 448a85.333333 85.333333 0 1 1-170.666667 0 85.333333 85.333333 0 0 1 170.666667 0z" fill="#FFFFFF" p-id="4653"></path><path d="M597.333333 405.333333a42.666667 42.666667 0 1 0 0 85.333334 42.666667 42.666667 0 0 0 0-85.333334z m-128 42.666667a128 128 0 1 1 256 0 128 128 0 0 1-256 0z" fill="#002E97" p-id="4654" data-spm-anchor-id="a313x.search_index.0.i4.75613a81BwdBMm" class=""></path></svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

@ -7,14 +7,12 @@
</div>
<div class="fr">
<ul>
<li> 向着航天强国目标勇毅前进以习近平通知为核心的党中央关心引领探月工程纪实 </li>
<li> 在第七个中国农民丰收节到来之际习近平向全国广大农民和工作在三农战线上的同志们致以节日... </li>
<li>李强会见马来西亚最高元首易卜拉欣</li>
<li v-for="item in topNewList" :key="item.id" @click="goToNewInfo(item)"> {{ item.title }}</li>
</ul>
</div>
</div>
<div class="more">
<p>更多</p>
<p @click="goToNewList">更多</p>
</div>
</div>
<div class="box2">
@ -95,7 +93,22 @@
</div>
</div>
<div class="box5">
<img src="../../../../../assets/images/image3.png" alt="" style="width: 100%" />
<div class="item">
<SvgIcon name="yiqi" size="40px" />
<div class="sum">10584</div>
<div class="text">仪器数量</div>
</div>
<div class="item">
<SvgIcon name="jigou" size="40px" />
<div class="sum">801</div>
<div class="text">加盟机构</div>
</div>
<div class="item">
<SvgIcon name="quan" size="40px" />
<div class="sum">437</div>
<div class="text">科研平台数量</div>
</div>
</div>
<div class="box6">
<div class="share1">
@ -136,7 +149,11 @@
<script setup>
import { ref, reactive } from 'vue';
import { vue3ScrollSeamless } from 'vue3-scroll-seamless';
import {getindexnews} from '/@/api/mainHome';
import { getindexnews } from '/@/api/mainHome';
import { useRoute, useRouter } from 'vue-router';
import SvgIcon from '/@/components/Icon/src/SvgIcon.vue';
const route = useRoute();
const router = useRouter();
let list = reactive([1, 2, 3, 4, 5, 6]);
const classOptions = {
limitMoveNum: 2,
@ -146,12 +163,24 @@
'https://ts1.cn.mm.bing.net/th/id/R-C.987f582c510be58755c4933cda68d525?rik=C0D21hJDYvXosw&riu=http%3a%2f%2fimg.pconline.com.cn%2fimages%2fupload%2fupc%2ftx%2fwallpaper%2f1305%2f16%2fc4%2f20990657_1368686545122.jpg&ehk=netN2qzcCVS4ALUQfDOwxAwFcy41oxC%2b0xTFvOYy5ds%3d&risl=&pid=ImgRaw&r=0',
'https://tse1-mm.cn.bing.net/th/id/OIP-C.DOOxGtkUiW8QevWtAxsRtAHaEK?rs=1&pid=ImgDetMain',
]);
const topNewList = ref([]);
const getlist = async () => {
const res = await getindexnews();
console.log(res);
}
getlist()
topNewList.value = res.records;
};
getlist();
const goToNewList = () => {
router.push('/main-home/newsList');
};
const goToNewInfo = (item) => {
router.push({
path: '/main-home/newsInfo',
query: {
id: item.id,
},
});
};
</script>
<style scoped lang="less">
@ -175,33 +204,40 @@
.paper {
height: 100%;
display: flex;
}
.paper .fl {
width: 110px;
float: left;
// float: left;
margin-left: 30px;
padding-top: 28px;
}
.paper .fr {
float: right;
// float: right;
padding: 38px 170px 0 0;
margin-left: 30px;
}
.fr ul li {
list-style: disc;
font-size: 20px;
padding-bottom: 12px;
cursor: pointer;
}
.fr ul li::marker {
color: #1b4290;
}
.fr ul li:hover {
color: #1b4290;
}
.box1 .more {
position: absolute;
right: 50px;
bottom: 5px;
color: #1b4290;
cursor: pointer;
}
.box2 {
@ -284,6 +320,28 @@
.box5 {
height: 134px;
display: flex;
align-items: center;
justify-content: space-around;
background-color: #F2F7FB;
.item {
display: flex;
align-items: center;
.sum {
font-size: 30px;
font-weight: 700;
color: #ff0000;
line-height: 40px;
}
.text{
color: #333333;
font-size: 14px;
span{
vertical-align: bottom;
}
}
}
}
.box6 {
padding: 20px 0;

@ -1,7 +1,7 @@
<template>
<div class="container">
<div class="news-list">
<div>新闻列表>新闻详情</div>
<div style="display: flex; cursor: pointer;"><div @click="$router.push('/main-home/NewsList')">新闻列表</div>><div>新闻详情</div></div>
<div class="item">
<div class="right">
<div class="title">{{ info.title }}</div>
@ -26,10 +26,10 @@
<script setup>
import {getindexarticleitem} from '@/api/mainHome'
import { useRoute } from 'vue-router';
import { useRoute,useRouter } from 'vue-router';
import { ref } from 'vue';
const route = useRoute()
const router = useRouter()
const id = route.query.id
const info = ref({
title: '',

Loading…
Cancel
Save