daikins/.svn/pristine/d8/d88f1e8c7311d52da15d3c81092...

146 lines
3.4 KiB
Plaintext

<!-- 外部情报 > 情报详情 -->
<script setup lang="ts">
import AppBlock from '@/components/AppBlock.vue'
import AppNewsBox from '@/components/AppNewsBox.vue'
import DetailNews from './DetailNew.vue'
import { externalInfo } from '@/api/daikin/base'
import HomeHead from '@/views/home/components/HomeHead.vue'
import { useDate } from '@/views/home/hooks/useDate'
const { push } = useRouter()
const route = useRoute()
const { day, week } = useDate()
console.log(route);
// const { subtitle, detailcontent } = route.params;
let subtitle = sessionStorage.getItem("title"),
detailcontent = sessionStorage.getItem("content");
console.log(subtitle, detailcontent);
let title = ref("");
let content = ref("");
title.value = subtitle;
content.value = detailcontent;
// const state = ref<any>({})
// async function getData() {
// const { id } = route.params
// if (!id) return
// const { data } = await externalInfo(id as string)
// console.log()
// data.tagColor = data.tag === '紧急' ? '#e60e0e' : '#2cba06'
// data.content = unescapeHTML(data.content)
// state.value = data
// }
// function unescapeHTML(html: string) {
// const doc = new DOMParser().parseFromString(html, 'text/html');
// return doc.documentElement.textContent;
// }
// getData()
</script>
<template>
<div style="background: none">
<HomeHead class="top" showCrumbs>
</HomeHead>
<div class="page-wrap h-834px mt60px" style="grid-template-columns: 1fr">
<div class="page-main" style="padding: 0 30px; height: 800px">
<AppBlock class="h-full">
<div class="overflow-y-auto h-full">
<div class="px46px py40px">
<DetailNews
:title="title"
:content="content"
/>
</div>
</div>
</AppBlock>
</div>
</div>
</div>
</template>
<style scoped lang="less">
.back{
position: absolute;
top: 25px;
left: 25px;
color: #fff;
// z-index: 500;
font-size: 25px;
font-weight: bold;
text-align: center;
justify-content: center;
}
.top {
right: 30px;
top: 0px;
}
.page {
width: 100%;
// height: 100px;
font-family: 'PingFang SC';
user-select: none;
background-image: url('@/assets/images/bg.jpg');
background-color: #000;
background-position: 0 0;
background-repeat: no-repeat;
background-size: cover;
color: #fff;
line-height: 1;
.page-wrap {
display: grid;
grid-template-columns: 1fr 314px;
grid-template-rows: repeat(2, 1fr);
grid-column-gap: 30px;
grid-row-gap: 30px;
.page-main {
height: 830px;
grid-area: 1 / 1 / 3 / 2;
}
.page-side {
height: 100%;
grid-area: 1 / 2 / 2 / 3;
&:last-of-type {
height: 300px;
grid-area: 2 / 2 / 3 / 3;
}
}
}
}
.main {
background-image: url('@/assets/images/bg-rs-main.svg');
background-position: 0 0;
background-repeat: repeat-x;
background-size: auto;
}
.box {
--title-h: 58px;
border: 0;
.box-title {
height: var(--title-h);
color: #fff;
background-color: #537deb;
font-size: 18px;
font-weight: 600;
padding: 0 24px;
cursor: pointer;
}
.box-content {
height: 100%;
max-height: calc(100% - var(--title-h));
}
}
.line {
border-bottom: 1px solid #eef3fb;
}
</style>