|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
- <main class="index_main">
|
|
|
+ <main class="index_main newsDetail">
|
|
|
<HomePageHead></HomePageHead>
|
|
|
- <HomePageNavigation1></HomePageNavigation1>
|
|
|
+ <HomePageNavigation></HomePageNavigation>
|
|
|
|
|
|
<!-- 面包屑导航 -->
|
|
|
<div class="breadcrumb">
|
|
@@ -110,7 +110,8 @@
|
|
|
value-format="YYYY-MM-DD"
|
|
|
format="YYYY-MM-DD"
|
|
|
placeholder="选择日期"
|
|
|
- style="width: 100%">
|
|
|
+ style="width: 100%"
|
|
|
+ :locale="zhCn">
|
|
|
</el-date-picker>
|
|
|
<!-- 单文件上传 7 (新) -->
|
|
|
<el-upload
|
|
@@ -466,7 +467,61 @@ section {
|
|
|
}
|
|
|
</style>
|
|
|
<style lang="less" scoped>
|
|
|
-@import url('@/assets/css/detail.less');
|
|
|
+ .breadcrumb {
|
|
|
+ width: 100%;
|
|
|
+ height: 22px;
|
|
|
+ margin-top: 40px;
|
|
|
+ font-family: Microsoft YaHei, Microsoft YaHei;
|
|
|
+ font-weight: 400;
|
|
|
+ font-size: 20px;
|
|
|
+ color: #666666;
|
|
|
+ line-height: 23px;
|
|
|
+ text-align: left;
|
|
|
+ font-style: normal;
|
|
|
+ text-transform: none;
|
|
|
+
|
|
|
+ .el-breadcrumb::v-deep {
|
|
|
+ display: inline-block;
|
|
|
+ vertical-align: -4px;
|
|
|
+ }
|
|
|
+
|
|
|
+ :deep(.el-breadcrumb__inner a),
|
|
|
+ :deep(.el-breadcrumb__inner.is-link) {
|
|
|
+ color: #666666;
|
|
|
+ font-weight: 400;
|
|
|
+ text-decoration: none;
|
|
|
+ transition: var(--el-transition-color);
|
|
|
+ }
|
|
|
+
|
|
|
+ span {
|
|
|
+ font-family: Microsoft YaHei, Microsoft YaHei;
|
|
|
+ font-weight: 400;
|
|
|
+ font-size: 20px;
|
|
|
+ color: #666666;
|
|
|
+ line-height: 23px;
|
|
|
+ text-align: left;
|
|
|
+ font-style: normal;
|
|
|
+ text-transform: none;
|
|
|
+ }
|
|
|
+
|
|
|
+ span:hover {
|
|
|
+ color: #666666;
|
|
|
+ }
|
|
|
+
|
|
|
+ .location {
|
|
|
+ margin-right: 20px;
|
|
|
+ width: 100px;
|
|
|
+ height: 22px;
|
|
|
+ font-family: Microsoft YaHei, Microsoft YaHei;
|
|
|
+ font-weight: 400;
|
|
|
+ font-size: 20px;
|
|
|
+ color: #666666;
|
|
|
+ line-height: 23px;
|
|
|
+ text-align: left;
|
|
|
+ font-style: normal;
|
|
|
+ text-transform: none;
|
|
|
+ }
|
|
|
+ }
|
|
|
</style>
|
|
|
<script setup>
|
|
|
import { ArrowRight } from '@element-plus/icons-vue'
|
|
@@ -479,6 +534,9 @@ const captchaId = ref('')
|
|
|
const dialogVisible = ref(false)
|
|
|
const title = ref('ceshi')
|
|
|
const remark = ref('nice')
|
|
|
+const seoTitle = ref('')
|
|
|
+const seoKeywords = ref('')
|
|
|
+const seoDescription = ref('')
|
|
|
//1.加载页面必备组件 start---------------------------------------->
|
|
|
import { ref, onMounted, reactive, nextTick, onBeforeUpdate } from 'vue';
|
|
|
import { useSeoMeta } from '#imports';
|
|
@@ -500,31 +558,6 @@ onBeforeUpdate(() => {
|
|
|
uploadRefs.value = {};
|
|
|
});
|
|
|
|
|
|
-let adImg = ref({})
|
|
|
-//广告1
|
|
|
-let url = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=tsbb_index_1`
|
|
|
-const responseAd1 = await fetch(url, {
|
|
|
- headers: {
|
|
|
- 'Content-Type': 'application/json',
|
|
|
- 'Userurl': $CwebUrl,
|
|
|
- 'Origin': $CwebUrl
|
|
|
- }
|
|
|
-});
|
|
|
-const resultAd1 = await responseAd1.json();
|
|
|
-adImg.value = resultAd1.data[0];
|
|
|
-
|
|
|
-let adImg_2 = ref({})
|
|
|
-//广告_2
|
|
|
-let url_2 = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=tsbb_index_2`
|
|
|
-const responseAd_2 = await fetch(url_2, {
|
|
|
- headers: {
|
|
|
- 'Content-Type': 'application/json',
|
|
|
- 'Userurl': $CwebUrl,
|
|
|
- 'Origin': $CwebUrl
|
|
|
- }
|
|
|
-});
|
|
|
-const resultAd_2 = await responseAd_2.json();
|
|
|
-adImg_2.value = resultAd_2.data[0];
|
|
|
|
|
|
// 动态验证规则
|
|
|
const rules_js = ref({})
|
|
@@ -673,7 +706,13 @@ async function refreshCaptcha() {
|
|
|
ElMessage.error('刷新验证码失败,请重试');
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+useSeoMeta({
|
|
|
+ title: seoTitle,
|
|
|
+ meta: [
|
|
|
+ { name: 'keywords', content: seoKeywords, tagPriority: 10 },
|
|
|
+ { name: 'description', content: seoDescription, tagPriority: 10 }
|
|
|
+ ]
|
|
|
+});
|
|
|
async function get_from_data_fun() {
|
|
|
pageLoading.value = true
|
|
|
try {
|
|
@@ -690,13 +729,10 @@ async function get_from_data_fun() {
|
|
|
console.log("返回数据:",get_from_data,response)
|
|
|
title.value = get_from_data.data.table.name
|
|
|
remark.value = get_from_data.data.table.remark
|
|
|
- useSeoMeta({
|
|
|
- title: computed(() => response.data.table.name + "_" + response.data.table.website_name + "_" + response.data.table.suffix),
|
|
|
- meta: [
|
|
|
- { name: 'keywords', content: computed(() =>response.data.table.keywords+ "_" + response.data.table.website_name + "_" + response.data.table.suffix), tagPriority: 10 },
|
|
|
- { name: 'description', content: computed(() =>response.data.table.description+ "_" + response.data.table.website_name + "_" + response.data.table.suffix), tagPriority: 100 }
|
|
|
- ]
|
|
|
- });
|
|
|
+ seoTitle.value = response.data.table.name + "_" + response.data.table.website_name + "_" + response.data.table.suffix
|
|
|
+ seoKeywords.value = response.data.table.keywords + "_" + response.data.table.website_name + "_" + response.data.table.suffix
|
|
|
+ seoDescription.value = response.data.table.description + "_" + response.data.table.website_name + "_" + response.data.table.suffix
|
|
|
+
|
|
|
// 检查是否需要显示验证码(仅在初始化时)
|
|
|
if (get_from_data.data?.table?.is_code === 1 && get_from_data.data?.code?.img) {
|
|
|
showCaptcha.value = true
|