榆钱落尽槿花稀 2b3ecd7164 - 优化首页、关于我们、产品服务、社会责任等页面的布局和样式
- 添加视频播放功能,支持在页面中嵌入并播放视频
- 更新新闻动态模块,支持动态加载和展示新闻内容
- 修复部分页面样式问题,提升用户体验
2025-05-15 18:35:29 +08:00

73 lines
2.3 KiB
Vue
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<div style="width: 100%;">
<div style="height:71px;background-color: #ffffff;"></div>
<div style="background-color: #F8F8F8;padding: 30px;">
<div style="width: 60%;min-height: 500px;margin: 0 auto;background-color: #ffffff;padding: 30px;">
<div style="font-size: 32px;font-weight: 700;color: #323232;">{{ info.title }}</div>
<div style="font-size: 14px;font-weight: 400;margin-top: 30px;color: #768597;">
<span>发布人{{ info.author }}</span>
<span style="margin-left: 150px;">发布时间{{ info.release_time_text }} </span>
</div>
<div style="width: 98%;margin: 20px auto;height: 1px;background-color: #EEEEEE;"></div>
<div class="info_content" v-html="info.content"></div>
<div style="width: 98%;margin: 20px auto;height: 1px;background-color: #EEEEEE;"></div>
<div style="display: flex;justify-content: space-between;align-items: center;">
<div>
<div @click="openNews(1)" style="cursor: pointer;">上一篇{{info.prev!=null?info.prev.title:'暂无'}}</div>
<div @click="openNews(2)" style="margin-top: 20px;cursor: pointer;">下一篇{{info.next!=null?info.next.title:'暂无'}}</div>
</div>
<div @click="delWeb">
<div
style="color: #999999;;cursor: pointer;;border: 1px solid #999999;width: 108px;height: 40px;line-height: 40px;text-align: center;">
返回列表</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script lang="ts" setup>
import { nextTick, ref } from 'vue'
const route = useRoute()
import $api from '@/service/webRequest'
import { Item } from 'ant-design-vue/es/menu'
const id = ref(route.params.id)
const openNews = (type) => {
if (type == 1 && info.value.prev != null) {
window.open('/info/' + info.value.prev.id, '_self');
}
if (type == 2 && info.value.next != null) {
window.open('/info/' + info.value.next.id, '_self');
}
}
// 新闻数据
onMounted(() => {
getInfo();
})
const info = ref({});
const getInfo = async () => {
const res = await $api.get('/api/home.news/detail?id=' + id.value)
console.log(res);
info.value = res.data.data;
}
const delWeb = () => {
window.close();
}
</script>
<style lang="scss">
@import "@/assets/animate/animate.min.css";
@import "@/assets/index.css";
.info_content img {
width: 80% !important;
margin: 0 auto;
margin-bottom: 10px;
}
.info_content {
line-height: 35px;
}
</style>