rkljw 1 долоо хоног өмнө
parent
commit
958336e320
1 өөрчлөгдсөн 70 нэмэгдсэн , 10 устгасан
  1. 70 10
      pages/index_form.vue

+ 70 - 10
pages/index_form.vue

@@ -1,5 +1,5 @@
 <template>
 <template>
-    <main class="index_main">
+    <main class="index_main newsDetail">
         <HomePageHead></HomePageHead>
         <HomePageHead></HomePageHead>
         <HomePageNavigation1></HomePageNavigation1>
         <HomePageNavigation1></HomePageNavigation1>
     
     
@@ -466,7 +466,61 @@ section {
 }
 }
 </style>
 </style>
 <style lang="less" scoped>
 <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>
 </style>
 <script setup>
 <script setup>
 import { ArrowRight } from '@element-plus/icons-vue'
 import { ArrowRight } from '@element-plus/icons-vue'
@@ -479,6 +533,9 @@ const captchaId = ref('')
 const dialogVisible = ref(false)
 const dialogVisible = ref(false)
 const title = ref('ceshi')
 const title = ref('ceshi')
 const remark = ref('nice')
 const remark = ref('nice')
+const seoTitle = ref('')
+const seoKeywords = ref('')
+const seoDescription = ref('')
 //1.加载页面必备组件 start---------------------------------------->
 //1.加载页面必备组件 start---------------------------------------->
 import { ref, onMounted, reactive, nextTick, onBeforeUpdate } from 'vue';
 import { ref, onMounted, reactive, nextTick, onBeforeUpdate } from 'vue';
 import { useSeoMeta } from '#imports';
 import { useSeoMeta } from '#imports';
@@ -673,7 +730,13 @@ async function refreshCaptcha() {
         ElMessage.error('刷新验证码失败,请重试');
         ElMessage.error('刷新验证码失败,请重试');
     }
     }
 }
 }
-
+useSeoMeta({
+            title:  seoTitle,
+            meta: [
+                { name: 'keywords', content: seoKeywords, tagPriority: 10 },
+                { name: 'description', content: seoDescription, tagPriority: 10 }
+            ]
+});
 async function get_from_data_fun() {
 async function get_from_data_fun() {
     pageLoading.value = true
     pageLoading.value = true
     try {
     try {
@@ -690,13 +753,10 @@ async function get_from_data_fun() {
         console.log("返回数据:",get_from_data,response)
         console.log("返回数据:",get_from_data,response)
         title.value = get_from_data.data.table.name
         title.value = get_from_data.data.table.name
         remark.value = get_from_data.data.table.remark
         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) {
         if (get_from_data.data?.table?.is_code === 1 && get_from_data.data?.code?.img) {
             showCaptcha.value = true
             showCaptcha.value = true