- 在AppHeader.vue中,调整了logo的显示逻辑,增加了对`phone_info-id`路由的支持,优化了移动端菜单的交互效果。 - 在aboutUs.vue中,增加了Swiper容器的最小高度,提升了页面的视觉效果。 - 在phone_index.vue中,修改了动画配置,确保更好的用户体验。 - 在phone_proServices.vue中,调整了专业技术服务的样式,提升了页面的整体美观性。
78 lines
2.2 KiB
Vue
78 lines
2.2 KiB
Vue
<template>
|
||
<div style="width: 100%;">
|
||
<div style="height:90px;background-color: #ffffff;"></div>
|
||
<div style="background-color: #F8F8F8;">
|
||
<div class="content_class" style="">
|
||
<div style="font-size: 20px;font-weight: 700;color: #323232;">{{ info.title }}</div>
|
||
<div style="font-size: 14px;font-weight: 400;margin-top: 30px;color: #768597;">
|
||
<div>发布人:{{ info.author }}</div>
|
||
<div>发布时间:{{ info.release_time_text }} </div>
|
||
</div>
|
||
<div style="width: 100%;margin:20px 0px 0px 0px;height: 1px;background-color: #EEEEEE;"></div>
|
||
<div class="info_content" v-html="info.content"></div>
|
||
<div style="width: 100%;margin: 20px auto;height: 1px;background-color: #EEEEEE;"></div>
|
||
<div style="display: flex;justify-content: space-between;align-items: center;">
|
||
<div style="width: 100%;">
|
||
<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>
|
||
</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('/phone_info/' + info.value.prev.id, '_self');
|
||
}
|
||
if (type == 2 && info.value.next != null) {
|
||
window.open('/phone_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.scss";
|
||
|
||
.info_content img {
|
||
width: 100% !important;
|
||
margin: 0 auto;
|
||
margin-bottom: 10px;
|
||
}
|
||
|
||
.info_content {
|
||
line-height: 28px;
|
||
}
|
||
|
||
.content_class {
|
||
width: 100%;
|
||
min-height: 500px;
|
||
margin: 0 auto;
|
||
background-color: #ffffff;
|
||
padding: 30px;
|
||
}
|
||
</style>
|