|
|
@@ -1,13 +1,15 @@
|
|
|
<template>
|
|
|
<div class="warning-detail">
|
|
|
<custom-header name="查看详情"></custom-header>
|
|
|
- <div class="article-content">
|
|
|
+ <div class="article-content" :class="{ 'is-link': isLink }">
|
|
|
<div class="article-header">
|
|
|
<div class="title">{{ warningDetail.title }}</div>
|
|
|
<div class="author-info">
|
|
|
<el-avatar :size="16" :src="warningDetail.icon" />
|
|
|
<span class="author-name">{{ warningDetail.name }}</span>
|
|
|
- <span class="qa-date">{{ warningDetail?.createTime && warningDetail?.createTime?.slice(0, 10) }}</span>
|
|
|
+ <span class="qa-date">{{
|
|
|
+ warningDetail?.createTime && warningDetail?.createTime?.slice(0, 10)
|
|
|
+ }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
@@ -18,24 +20,48 @@
|
|
|
<div class="article-text">
|
|
|
<span v-html="warningDetail.content"></span>
|
|
|
</div>
|
|
|
+
|
|
|
+ <div class="article-footer">
|
|
|
+ <div class="footer-top">
|
|
|
+ <img class="icon" src="@/assets/img/home/ask-icon.png" alt="" />
|
|
|
+ <div class="title">在白点期,您当前农场是否出现白点?</div>
|
|
|
+ </div>
|
|
|
+ <div class="footer-bottom" :style="{ justifyContent: !isLink ? 'center' : 'flex-end' }">
|
|
|
+ <div class="edit-btn" v-if="!isLink">编辑问题</div>
|
|
|
+ <template v-else>
|
|
|
+ <div class="edit-btn">否,未出现</div>
|
|
|
+ <div class="edit-btn primary-btn">是,已出现</div>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="custom-bottom-fixed-btns" v-if="!isLink">
|
|
|
+ <div class="bottom-btn primary-btn" @click="handleForward">转发</div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
import customHeader from "@/components/customHeader.vue";
|
|
|
-import { ref,onActivated } from "vue";
|
|
|
+import { ref, onActivated } from "vue";
|
|
|
import { useRoute } from "vue-router";
|
|
|
|
|
|
const route = useRoute();
|
|
|
|
|
|
+const isLink = ref(false);
|
|
|
+
|
|
|
const warningDetail = ref({});
|
|
|
const showImage = ref(false);
|
|
|
onActivated(() => {
|
|
|
- showImage.value = route.query.showImage === 'true' ? true : false;
|
|
|
+ showImage.value = route.query.showImage === "true" ? true : false;
|
|
|
getWarningDetail();
|
|
|
});
|
|
|
|
|
|
+const handleForward = () => {
|
|
|
+ console.log("转发");
|
|
|
+};
|
|
|
+
|
|
|
const getWarningDetail = () => {
|
|
|
const params = {
|
|
|
id: route.query.id,
|
|
|
@@ -54,9 +80,11 @@ const getWarningDetail = () => {
|
|
|
.article-content {
|
|
|
padding: 8px 16px;
|
|
|
overflow-y: auto;
|
|
|
- height: calc(100% - 40px);
|
|
|
+ height: calc(100% - 40px - 60px);
|
|
|
box-sizing: border-box;
|
|
|
-
|
|
|
+ &.is-link {
|
|
|
+ height: calc(100% - 40px);
|
|
|
+ }
|
|
|
.article-header {
|
|
|
.title {
|
|
|
font-size: 18px;
|
|
|
@@ -72,7 +100,8 @@ const getWarningDetail = () => {
|
|
|
padding-bottom: 12px;
|
|
|
border-bottom: 1px solid #f5f5f5;
|
|
|
|
|
|
- .author-name,.qa-date {
|
|
|
+ .author-name,
|
|
|
+ .qa-date {
|
|
|
font-size: 14px;
|
|
|
color: #666;
|
|
|
font-weight: normal;
|
|
|
@@ -91,8 +120,8 @@ const getWarningDetail = () => {
|
|
|
object-fit: cover;
|
|
|
}
|
|
|
}
|
|
|
- .article-text{
|
|
|
- ::v-deep{
|
|
|
+ .article-text {
|
|
|
+ ::v-deep {
|
|
|
img {
|
|
|
width: 100%;
|
|
|
height: 175px;
|
|
|
@@ -101,6 +130,53 @@ const getWarningDetail = () => {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ .article-footer {
|
|
|
+ margin-top: 12px;
|
|
|
+ border-radius: 8px;
|
|
|
+ border: 1px solid #2199f8;
|
|
|
+ padding: 10px;
|
|
|
+ .footer-top {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ gap: 8px;
|
|
|
+
|
|
|
+ .icon {
|
|
|
+ width: 20px;
|
|
|
+ height: 20px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .title {
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: 600;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .footer-bottom {
|
|
|
+ display: flex;
|
|
|
+ justify-content: flex-end;
|
|
|
+ gap: 10px;
|
|
|
+ margin-top: 10px;
|
|
|
+ .edit-btn {
|
|
|
+ padding: 7px 20px;
|
|
|
+ background: rgba(33, 153, 248, 0.1);
|
|
|
+ color: #2199f8;
|
|
|
+ border-radius: 25px;
|
|
|
+ font-size: 12px;
|
|
|
+ text-align: center;
|
|
|
+ &.primary-btn{
|
|
|
+ background: #2199f8;
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .custom-bottom-fixed-btns {
|
|
|
+ justify-content: center;
|
|
|
+ .primary-btn {
|
|
|
+ padding: 10px 34px;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</style>
|