diff --git a/src/views/myHome/size1440/index.vue b/src/views/myHome/size1440/index.vue index 826e430..f903375 100644 --- a/src/views/myHome/size1440/index.vue +++ b/src/views/myHome/size1440/index.vue @@ -235,9 +235,9 @@ const getPressReleasesDisplay = () => { pageSize: 10, display: 2, // 1: 不展示在首页 2: 展示在首页 } - console.log(params) + // console.log(params) axios.post(url, params).then((res) => { - console.log(res) + // console.log(res) if (res.status === 200) { if (res.data.status === 0) { res.data.data?.data?.forEach((item) => { diff --git a/src/views/myHome/size1920/index.vue b/src/views/myHome/size1920/index.vue index 305cc6d..7eff923 100644 --- a/src/views/myHome/size1920/index.vue +++ b/src/views/myHome/size1920/index.vue @@ -221,9 +221,9 @@ const getPressReleasesDisplay = () => { pageSize: 10, display: 2, // 1: 不展示在首页 2: 展示在首页 } - console.log(params) + // console.log(params) axios.post(url, params).then((res) => { - console.log(res) + // console.log(res) if (res.status === 200) { if (res.data.status === 0) { res.data.data?.data?.forEach((item) => { diff --git a/src/views/myHome/size375/index.vue b/src/views/myHome/size375/index.vue index f2127ba..8564967 100644 --- a/src/views/myHome/size375/index.vue +++ b/src/views/myHome/size375/index.vue @@ -233,9 +233,9 @@ const getPressReleasesDisplay = () => { pageSize: 10, display: 2, // 1: 不展示在首页 2: 展示在首页 } - console.log(params) + // console.log(params) axios.post(url, params).then((res) => { - console.log(res) + // console.log(res) if (res.status === 200) { if (res.data.status === 0) { res.data.data?.data?.forEach((item) => { diff --git a/src/views/myHome/size768/index.vue b/src/views/myHome/size768/index.vue index 2c8e440..bec8f40 100644 --- a/src/views/myHome/size768/index.vue +++ b/src/views/myHome/size768/index.vue @@ -262,9 +262,9 @@ const getPressReleasesDisplay = () => { pageSize: 10, display: 2, // 1: 不展示在首页 2: 展示在首页 } - console.log(params) + // console.log(params) axios.post(url, params).then((res) => { - console.log(res) + // console.log(res) if (res.status === 200) { if (res.data.status === 0) { res.data.data?.data?.forEach((item) => { diff --git a/src/views/news/size1440/index.vue b/src/views/news/size1440/index.vue index e1c5de8..38e0dab 100644 --- a/src/views/news/size1440/index.vue +++ b/src/views/news/size1440/index.vue @@ -1,339 +1,6 @@ @@ -345,15 +12,31 @@ import { useI18n } from "vue-i18n"; const { t } = useI18n(); import { useRoute } from "vue-router"; const route = useRoute(); +import axios from 'axios' const state = reactive({ - date: "", + id: "", // 新闻id }); onMounted(() => { - if (route.query.date) { - state.date = route.query.date; + if (route.query.id) { + state.id = route.query.id; } + getPressReleasesInfo(); }); + +//获取新闻信息 +const getPressReleasesInfo = () => { + let url = 'http://172.16.100.93:9020/api/fiee/pressreleases?id=' + state.id + axios.get(url).then((res) => { + // console.log(res) + if (res.status === 200) { + if (res.data.status === 0) { + const myRichText = document.getElementById('my-richText') + myRichText.innerHTML = res.data.data.content + } + } + }) +}