Commit 0518726e authored by liyang's avatar liyang

fix:门户网站加载科学计划与国际合作提示需要登录

parent 77854c74
......@@ -3,27 +3,39 @@ import request from '@/utils/request'
export function getAboutInfo() {
return request({
url: '/portal/about/info',
method: 'get'
method: 'get',
headers: {
isToken: false
}
})
}
export function getOrganization() {
return request({
url: '/portal/about/organization',
method: 'get'
method: 'get',
headers: {
isToken: false
}
})
}
export function getHistory() {
return request({
url: '/portal/about/history',
method: 'get'
method: 'get',
headers: {
isToken: false
}
})
}
export function getAboutSts() {
return request({
url: '/portal/aboutSts',
method: 'get'
method: 'get',
headers: {
isToken: false
}
})
}
......@@ -4,7 +4,10 @@ export function getAchievementList(params) {
return request({
url: '/portal/achievement/list',
method: 'get',
params: params
params: params,
headers: {
isToken: false
}
})
}
......@@ -12,28 +15,40 @@ export function getPaperList(params) {
return request({
url: '/portal/achievement/papers',
method: 'get',
params: params
params: params,
headers: {
isToken: false
}
})
}
export function getPatentList() {
return request({
url: '/portal/achievement/patents',
method: 'get'
method: 'get',
headers: {
isToken: false
}
})
}
export function getAwardList() {
return request({
url: '/portal/achievement/awards',
method: 'get'
method: 'get',
headers: {
isToken: false
}
})
}
export function getAchievementStats() {
return request({
url: '/portal/achievement/stats',
method: 'get'
method: 'get',
headers: {
isToken: false
}
})
}
......@@ -41,20 +56,29 @@ export function getSdgsat1AchievementList(params) {
return request({
url: '/portal/achievement/sdgsat1',
method: 'get',
params: params
params: params,
headers: {
isToken: false
}
})
}
export function getAchievementDetail(id) {
return request({
url: `/portal/achievement/${id}`,
method: 'get'
method: 'get',
headers: {
isToken: false
}
})
}
export function getAchievementOverview() {
return request({
url: '/achievement/overview/1',
method: 'get'
method: 'get',
headers: {
isToken: false
}
})
}
import request from '@/utils/request'
// 获取SDG应用案例列表(来自管理后台应用案例管理)
export function getApplicationList(query) {
return request({
url: '/portal/application/list',
method: 'get',
params: query
params: query,
headers: {
isToken: false
}
})
}
// 获取区域示范列表
export function getDemoList(query) {
return request({
url: '/portal/application/demos',
method: 'get',
params: query
params: query,
headers: {
isToken: false
}
})
}
export function getImpactList() {
return request({
url: '/portal/application/impact',
method: 'get'
method: 'get',
headers: {
isToken: false
}
})
}
export function getApplicationStats() {
return request({
url: '/portal/application/stats',
method: 'get'
method: 'get',
headers: {
isToken: false
}
})
}
......@@ -3,14 +3,20 @@ import request from '@/utils/request'
export function getHomeData() {
return request({
url: '/portal/home/data',
method: 'get'
method: 'get',
headers: {
isToken: false
}
})
}
export function getBannerList() {
return request({
url: '/portal/home/banner',
method: 'get'
method: 'get',
headers: {
isToken: false
}
})
}
......@@ -18,6 +24,9 @@ export function getNewsList(params) {
return request({
url: '/portal/home/news',
method: 'get',
params: params
params: params,
headers: {
isToken: false
}
})
}
......@@ -3,35 +3,49 @@ import request from '@/utils/request'
export function getProgressList() {
return request({
url: '/portal/progress/list',
method: 'get'
method: 'get',
headers: {
isToken: false
}
})
}
export function getProjectList() {
return request({
url: '/portal/progress/projects',
method: 'get'
method: 'get',
headers: {
isToken: false
}
})
}
export function getMilestoneList() {
return request({
url: '/portal/progress/milestones',
method: 'get'
method: 'get',
headers: {
isToken: false
}
})
}
export function getProgressStats() {
return request({
url: '/portal/progress/stats',
method: 'get'
method: 'get',
headers: {
isToken: false
}
})
}
// 获取项目实施进展(来自管理后台进展情况管理/项目实施进展)
export function getImplementationProgress() {
return request({
url: '/portal/progress/implementation',
method: 'get'
method: 'get',
headers: {
isToken: false
}
})
}
......@@ -3,6 +3,9 @@ import request from '@/utils/request'
export function getSciencePlanList() {
return request({
url: '/portal/science-plan/list',
method: 'get'
method: 'get',
headers: {
isToken: false
}
})
}
......@@ -3,62 +3,89 @@ import request from '@/utils/request'
export function getSDGSAT1Info() {
return request({
url: '/portal/sdgsat1/info',
method: 'get'
method: 'get',
headers: {
isToken: false
}
})
}
export function getSDGSAT1Specs() {
return request({
url: '/portal/sdgsat1/specs',
method: 'get'
method: 'get',
headers: {
isToken: false
}
})
}
export function getInstrumentList() {
return request({
url: '/portal/sdgsat1/instruments',
method: 'get'
method: 'get',
headers: {
isToken: false
}
})
}
export function getApplicationAreaList() {
return request({
url: '/portal/sdgsat1/applications',
method: 'get'
method: 'get',
headers: {
isToken: false
}
})
}
export function getDataServiceInfo() {
return request({
url: '/portal/sdgsat1/data-service',
method: 'get'
method: 'get',
headers: {
isToken: false
}
})
}
export function getAchievementList() {
return request({
url: '/portal/sdgsat1/achievements',
method: 'get'
method: 'get',
headers: {
isToken: false
}
})
}
export function getIntroduction() {
return request({
url: '/sdgsat1/introduction',
method: 'get'
method: 'get',
headers: {
isToken: false
}
})
}
export function getCaseList() {
return request({
url: '/sdgsat1/case/list',
method: 'get'
method: 'get',
headers: {
isToken: false
}
})
}
export function getCaseDetail(id) {
return request({
url: `/sdgsat1/case/${id}`,
method: 'get'
method: 'get',
headers: {
isToken: false
}
})
}
<template>
<div class="home-page">
<BannerCarousel />
<section class="intro-section">
<div class="intro-content" v-loading="loading">
<div class="intro-left" v-if="overview">
<div class="media-container">
<img v-if="overview.image" :src="overview.image" alt="概况图片" />
<video v-if="overview.video" :src="overview.video" controls></video>
</div>
</div>
<div class="intro-right" v-if="overview">
<span class="title">{{ overview.title }}</span>
<span class="summary">{{ overview.summary }}</span>
<section class="intro-section">
<div class="intro-content" v-loading="loading">
<div class="intro-left" v-if="overview">
<div class="media-container">
<img v-if="overview.image" :src="overview.image" alt="概况图片" />
<video v-if="overview.video" :src="overview.video" controls></video>
</div>
</div>
</section>
<section class="data-section">
<div class="data-section-body">
<div class="data-content" v-loading="loading">
<div class="data-left" v-if="introduction">
<div class="intro-text">
<div class="title"></div>
<span class="summary">{{ introduction.summary }}</span>
</div>
<div class="intro-right" v-if="overview">
<span class="title">{{ overview.title }}</span>
<span class="summary">{{ overview.summary }}</span>
</div>
</div>
</section>
<section class="data-section">
<div class="data-section-body">
<div class="data-content" v-loading="loading">
<div class="data-left" v-if="introduction">
<div class="intro-text">
<div class="title"></div>
<span class="summary">{{ introduction.summary }}</span>
</div>
<div class="data-right" v-if="introduction && introduction.images">
<div class="image-grid">
<div class="top-image" v-if="introduction.images.split(',').length > 0">
<img :src="introduction.images.split(',')[0]" alt="图片1" />
</div>
<div class="bottom-images">
<div class="image-item" v-for="(img, index) in introduction.images.split(',').slice(1, 4)" :key="index">
<img :src="img" :alt="'图片' + (index + 2)" />
</div>
</div>
<div class="data-right" v-if="introduction && introduction.images">
<div class="image-grid">
<div
class="top-image"
v-if="introduction.images.split(',').length > 0"
>
<img :src="introduction.images.split(',')[0]" alt="图片1" />
</div>
<div class="bottom-images">
<div
class="image-item"
v-for="(img, index) in introduction.images
.split(',')
.slice(1, 4)"
:key="index"
>
<img :src="img" :alt="'图片' + (index + 2)" />
</div>
</div>
</div>
</div>
</div>
</section>
<section class="news-section">
<div class="section-header">
<div class="divider"></div>
</div>
<div class="news-content" v-loading="loading">
<div class="news-card" v-for="(item, index) in valueList"
:key="index" :class="'card-' + (index + 1)">
<div class="card-bg" :style="{ backgroundImage: 'url(' + item.image + ')' }"></div>
<div class="card-content">
<span class="title" v-if="index === 0 || index === 1">{{ item.title }}</span>
<span class="title" v-if="index === 2">{{ item.title }}</span>
<span class="summary" v-if="index === 0">{{ item.summary }}</span>
</div>
</div>
</section>
<section class="news-section">
<div class="section-header">
<div class="divider"></div>
</div>
<div class="news-content" v-loading="loading">
<div
class="news-card"
v-for="(item, index) in valueList"
:key="index"
:class="'card-' + (index + 1)"
>
<div
class="card-bg"
:style="{ backgroundImage: 'url(' + item.image + ')' }"
></div>
<div class="card-content">
<span class="title" v-if="index === 0 || index === 1">{{
item.title
}}</span>
<span class="title" v-if="index === 2">{{ item.title }}</span>
<span class="summary">{{ item.summary }}</span>
</div>
</div>
</section>
</div>
</section>
</div>
</template>
<script>
import BannerCarousel from '@/components/portal/BannerCarousel'
import { getHomeData } from '@/api/portal/home'
import BannerCarousel from "@/components/portal/BannerCarousel";
import { getHomeData } from "@/api/portal/home";
export default {
name: 'Home',
name: "Home",
components: {
BannerCarousel
BannerCarousel,
},
data() {
return {
......@@ -76,42 +94,64 @@ export default {
introduction: null,
valueList: [],
dataCards: [
{ number: '100+', label: '合作机构' },
{ number: '500+', label: '科研项目' },
{ number: '1000+', label: '科研人员' },
{ number: '50+', label: '国家地区' }
{ number: "100+", label: "合作机构" },
{ number: "500+", label: "科研项目" },
{ number: "1000+", label: "科研人员" },
{ number: "50+", label: "国家地区" },
],
newsList: [
{ day: '15', month: '01', title: '国际大科学计划取得重大突破', summary: '在可持续发展目标监测方面取得重要进展' },
{ day: '12', month: '01', title: '新增国际合作项目签约', summary: '与多个国际科研机构签署合作协议' },
{ day: '08', month: '01', title: '科研成果荣获国际奖项', summary: '相关研究成果获得国际科学界认可' },
{ day: '05', month: '01', title: '举办国际学术研讨会', summary: '汇聚全球专家学者共话未来发展' }
]
}
{
day: "15",
month: "01",
title: "国际大科学计划取得重大突破",
summary: "在可持续发展目标监测方面取得重要进展",
},
{
day: "12",
month: "01",
title: "新增国际合作项目签约",
summary: "与多个国际科研机构签署合作协议",
},
{
day: "08",
month: "01",
title: "科研成果荣获国际奖项",
summary: "相关研究成果获得国际科学界认可",
},
{
day: "05",
month: "01",
title: "举办国际学术研讨会",
summary: "汇聚全球专家学者共话未来发展",
},
],
};
},
created() {
this.loadHomeData()
this.loadHomeData();
},
methods: {
loadHomeData() {
this.loading = true
getHomeData().then(response => {
if (response.data && response.data.overview) {
this.overview = response.data.overview
}
if (response.data && response.data.introduction) {
this.introduction = response.data.introduction
}
if (response.data && response.data.valueList) {
this.valueList = response.data.valueList
}
this.loading = false
}).catch(() => {
this.loading = false
})
}
}
}
this.loading = true;
getHomeData()
.then((response) => {
if (response.data && response.data.overview) {
this.overview = response.data.overview;
}
if (response.data && response.data.introduction) {
this.introduction = response.data.introduction;
}
if (response.data && response.data.valueList) {
this.valueList = response.data.valueList;
}
this.loading = false;
})
.catch(() => {
this.loading = false;
});
},
},
};
</script>
<style lang="scss" scoped>
......@@ -152,7 +192,7 @@ section {
gap: 54px;
background-image: url("../../assets/images/intro-content-bg.png");
background-size: cover;
padding-top:44px ;
padding-top: 44px;
padding-left: 201px;
}
......@@ -189,26 +229,25 @@ section {
padding-top: 47px;
flex-direction: column;
.title {
font-family: Microsoft YaHei, Microsoft YaHei;
font-weight: bold;
font-size: 26px;
color: #090909;
line-height: 28px;
text-align: left;
font-style: normal;
text-transform: none;
font-family: Microsoft YaHei, Microsoft YaHei;
font-weight: bold;
font-size: 26px;
color: #090909;
line-height: 28px;
text-align: left;
font-style: normal;
text-transform: none;
}
.summary {
font-family: Microsoft YaHei, Microsoft YaHei;
font-weight: 400;
font-size: 18px;
color: #090909;
line-height: 28px;
text-align: left;
font-style: normal;
text-transform: none;
font-family: Microsoft YaHei, Microsoft YaHei;
font-weight: 400;
font-size: 18px;
color: #090909;
line-height: 28px;
text-align: left;
font-style: normal;
text-transform: none;
}
}
}
......@@ -219,15 +258,13 @@ text-transform: none;
height: 723px;
background-color: #519737;
padding-top: 75px ;
padding-top: 75px;
padding-left: 290px;
padding-right: 187px;
.data-section-body
{
.data-section-body {
width: 100%;
height: 100%;
background-image: url("../../assets/images/data-section-bg.png");
background-image: url("../../assets/images/data-section-bg.png");
background-size: cover;
}
......@@ -255,16 +292,15 @@ text-transform: none;
background-size: cover;
}
.summary{
font-family: Microsoft YaHei, Microsoft YaHei;
font-weight: 400;
font-size: 18px;
color: #FFFFFF;
line-height: 30px;
text-align: left;
font-style: normal;
text-transform: none;
.summary {
font-family: Microsoft YaHei, Microsoft YaHei;
font-weight: 400;
font-size: 18px;
color: #ffffff;
line-height: 30px;
text-align: left;
font-style: normal;
text-transform: none;
}
}
}
......@@ -350,16 +386,20 @@ text-transform: none;
flex-direction: column;
justify-content: space-between;
// padding: 25px;
background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.6) 100%);
background: linear-gradient(
to bottom,
rgba(0, 0, 0, 0) 0%,
rgba(0, 0, 0, 0.6) 100%
);
.title {
text-align: center;
font-family: Microsoft YaHei, Microsoft YaHei;
font-weight: bold;
font-size: 22px;
color: #FFFFFF;
color: #ffffff;
line-height: 40px;
text-shadow: 0px 3px 12px rgba(0,0,0,0.68);
text-shadow: 0px 3px 12px rgba(0, 0, 0, 0.68);
font-style: normal;
text-transform: none;
}
......@@ -370,9 +410,9 @@ text-transform: none;
font-family: Microsoft YaHei, Microsoft YaHei;
font-weight: 400;
font-size: 16px;
color: #FFFFFF;
color: #ffffff;
line-height: 28px;
text-shadow: 0px 3px 12px rgba(0,0,0,0.68);
text-shadow: 0px 3px 12px rgba(0, 0, 0, 0.68);
text-align: left;
font-style: normal;
text-transform: none;
......@@ -383,7 +423,7 @@ text-transform: none;
.card-content {
justify-content: flex-start;
padding-top: 51px;
.summary{
.summary {
margin-top: 28px;
}
}
......@@ -392,13 +432,16 @@ text-transform: none;
&.card-2 {
.card-content {
justify-content: flex-start;
.title{
display: flex;
align-items: center;
height: 100px;
// line-height: 100px;
padding: 0 25px;
background-color: #FEB614;
.title {
display: flex;
align-items: center;
height: 100px;
// line-height: 100px;
padding: 0 25px;
background-color: #feb614;
}
.summary {
margin-top: 28px;
}
}
}
......@@ -406,13 +449,22 @@ text-transform: none;
&.card-3 {
.card-content {
justify-content: flex-end;
.title{
display: flex;
align-items: center;
height: 100px;
// line-height: 100px;
padding: 0 25px;
background-color: #1EA8C5;
.title {
display: flex;
align-items: center;
height: 100px;
// line-height: 100px;
padding: 0 25px;
background-color: #1ea8c5;
position: absolute;
bottom: 0;
right: 0;
}
.summary {
position: absolute;
top: 50%;
transform: translateY(-50%);
left: 0;
}
}
}
......
package com.ruoyi.web.controller.portal;
import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import org.springframework.web.bind.annotation.*;
......@@ -7,6 +8,7 @@ import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.Map;
@Anonymous
@RestController
@RequestMapping("/portal/about")
public class PortalAboutController extends BaseController {
......
......@@ -13,6 +13,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Anonymous
@RestController
@RequestMapping("/portal/achievement")
public class PortalAchievementController extends BaseController {
......
package com.ruoyi.web.controller.portal;
import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
......@@ -12,6 +13,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Anonymous
@RestController
@RequestMapping("/portal/application")
public class PortalApplicationController extends BaseController {
......
......@@ -20,6 +20,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Anonymous
@RestController
@RequestMapping("/portal/progress")
public class PortalProgressController extends BaseController {
......
package com.ruoyi.web.controller.portal;
import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain.SysSdgsat1Introduction;
......@@ -13,6 +14,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Anonymous
@RestController
@RequestMapping("/portal/sdgsat1")
public class PortalSDGSAT1Controller extends BaseController {
......
package com.ruoyi.web.controller.portal;
import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain.SysSciencePlan;
......@@ -11,6 +12,7 @@ import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@Anonymous
@RestController
@RequestMapping("/portal/science-plan")
public class PortalSciencePlanController extends BaseController {
......
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