|
@@ -2,28 +2,28 @@
|
|
|
<div id="newsList">
|
|
|
<!-- 页面头部 -->
|
|
|
<HomePageHead></HomePageHead>
|
|
|
-
|
|
|
- <HomePageNavigation></HomePageNavigation>
|
|
|
-
|
|
|
+ <!-- 导航栏 -->
|
|
|
+ <HomePageNavigation1></HomePageNavigation1>
|
|
|
+ <!-- 列表页广告一 -->
|
|
|
+ <HomeTopTen :imgurl="adImg1" v-if="adImg1"></HomeTopTen>
|
|
|
<!-- 搜索框 -->
|
|
|
<div class="search">
|
|
|
<div class="inner">
|
|
|
- <input v-model="keywordInput" type="text" placeholder="请输入搜索内容" @keydown.enter.prevent="goSearch">
|
|
|
+ <input v-model="keywordInput" type="text" placeholder="请输入搜索内容">
|
|
|
<button @click="goSearch">搜索</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
- <!-- 面包屑导航 -->
|
|
|
<div class="breadcrumb">
|
|
|
<div class="inner">
|
|
|
<span class="location">当前位置:</span>
|
|
|
<el-breadcrumb :separator-icon="ArrowRight">
|
|
|
- <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
|
|
|
- <el-breadcrumb-item :to="{ path: '/search/search' }">搜索</el-breadcrumb-item>
|
|
|
+ <el-breadcrumb-item>
|
|
|
+ <NuxtLink to="/">首页</NuxtLink>
|
|
|
+ </el-breadcrumb-item>
|
|
|
+ <el-breadcrumb-item>搜索</el-breadcrumb-item>
|
|
|
</el-breadcrumb>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <!-- 资讯列表 -->
|
|
|
<div class="newsList">
|
|
|
<div class="inner">
|
|
|
<div class="innerLeft">
|
|
@@ -47,780 +47,257 @@
|
|
|
<div class="pagination">
|
|
|
<el-pagination size="small" background layout="prev, pager, next" :total="total" class="mt-4"
|
|
|
v-model:page-size="pageSize" prev-text="上一页" next-text="下一页" @change="changePage" />
|
|
|
- <!-- <HomePagination @sendData="handleData"></HomePagination> -->
|
|
|
</div>
|
|
|
</div>
|
|
|
- <!-- <div class="innerRight">
|
|
|
- <DetailHotNews></DetailHotNews>
|
|
|
- </div> -->
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
- <!-- 列表页广告 -->
|
|
|
- <HomeTopTenTitle :imgurl="adList[1]" v-if="adList[1]"></HomeTopTenTitle>
|
|
|
-
|
|
|
+ <!-- 列表页广告二 -->
|
|
|
+ <HomeTopTen :imgurl="adImg2" v-if="adImg2"></HomeTopTen>
|
|
|
<!-- 页面底部 -->
|
|
|
<HomeFoot1></HomeFoot1>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { onMounted } from 'vue';
|
|
|
+//1.页面依赖 start ---------------------------------------->
|
|
|
import { ElBreadcrumb, ElBreadcrumbItem, ElPagination } from 'element-plus'
|
|
|
import { ArrowRight } from '@element-plus/icons-vue'
|
|
|
+import { ref, onMounted } from 'vue';
|
|
|
|
|
|
-const nuxtApp = useNuxtApp();
|
|
|
-const axios = nuxtApp.$axios;
|
|
|
-
|
|
|
-//获得跳转过来的id
|
|
|
const route = useRoute();
|
|
|
-const articleId = route.params.id; //获得该页面的id
|
|
|
-const category_id = route.query.category_id; //获得该页面的id
|
|
|
-const name = route.query.name; //获得该页面的id
|
|
|
-const searchKey = route.query.keyword
|
|
|
-console.log(name);
|
|
|
+//const pageCatids = route.query.catids;
|
|
|
+const pageCatids = route.params.id
|
|
|
+const pageDepartment_id = route.query.department_id;
|
|
|
|
|
|
-//从地区跳转
|
|
|
-const catids = ref([]);
|
|
|
+//const category_id = route.query.category_id; //获得该页面的id
|
|
|
+// const searchKey = route.query.keyword
|
|
|
+// const catids = ref([]);
|
|
|
|
|
|
//关键词
|
|
|
-let keyWord = useState("keyWord", () => "")
|
|
|
-let id = useState("id", () => "")
|
|
|
let total = useState("total", () => 0)
|
|
|
let page = useState("page", () => 1)
|
|
|
let pageSize = useState("pageSize", () => 20)
|
|
|
+//1.页面依赖 end ---------------------------------------->
|
|
|
+
|
|
|
+//2.页面数据 start ---------------------------------------->
|
|
|
+//2.1 广告
|
|
|
+let adImg1 = ref([]);
|
|
|
+let adImg2 = ref([]);
|
|
|
+// async function getAdData(){
|
|
|
+// const mkdata = await requestDataPromise('/web/getWebsiteAdvertisement',{
|
|
|
+// method:'GET',
|
|
|
+// query:{
|
|
|
+// 'ad_tag':'SEARCH'
|
|
|
+// }
|
|
|
+// });
|
|
|
+// if(adData.code==200){
|
|
|
+// for(let item of adData.data){
|
|
|
+// if(item.ad_tag == 'SEARCH_0001'){
|
|
|
+// adImg1.value = item;
|
|
|
+// }
|
|
|
+// if(item.ad_tag == 'SEARCH_0002'){
|
|
|
+// adImg2.value = item;
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }else{
|
|
|
+// console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
|
|
|
+// console.log("错误位置:获取搜索页广告列表")
|
|
|
+// console.log("后端错误反馈:",adData.message)
|
|
|
+// console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
|
|
|
+// }
|
|
|
+// }
|
|
|
+// getAdData();
|
|
|
+onMounted(async () => {
|
|
|
+ //从客户端获取行政职能部门 加快打开速度
|
|
|
+ const { $webUrl, $CwebUrl } = useNuxtApp();
|
|
|
+ //广告1
|
|
|
+ let url = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=snzxw_search_0001`
|
|
|
+ const responseAd1 = await fetch(url, {
|
|
|
+ headers: {
|
|
|
+ 'Content-Type': 'application/json',
|
|
|
+ 'Userurl': $CwebUrl,
|
|
|
+ 'Origin': $CwebUrl
|
|
|
+ }
|
|
|
+ });
|
|
|
+ const resultAd1 = await responseAd1.json();
|
|
|
+ adImg1.value = resultAd1.data[0];
|
|
|
+
|
|
|
+ //广告2
|
|
|
+ let url2 = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=snzxw_search_0002`
|
|
|
+ const responseAd2 = await fetch(url2, {
|
|
|
+ headers: {
|
|
|
+ 'Content-Type': 'application/json',
|
|
|
+ 'Userurl': $CwebUrl,
|
|
|
+ 'Origin': $CwebUrl
|
|
|
+ }
|
|
|
+ });
|
|
|
+ const resultAd2 = await responseAd2.json();
|
|
|
+ adImg2.value = resultAd2.data[0];
|
|
|
+})
|
|
|
|
|
|
|
|
|
-let keywordInput = ref("")
|
|
|
+// 新闻列表
|
|
|
+const newsList = ref([]);
|
|
|
+let keywordInput = ref("");
|
|
|
|
|
|
-//获得广告
|
|
|
-const adList = ref("");
|
|
|
-const aa = 'SEARCH'
|
|
|
-const getadList = async () => {
|
|
|
- try {
|
|
|
- const response = await axios.get(`/web/getWebsiteAdvertisement?ad_tag=${aa}`);
|
|
|
- adList.value = response.data;
|
|
|
- } catch (error) {
|
|
|
- console.error(error);
|
|
|
+//搜索
|
|
|
+let goSearch = async () => {
|
|
|
+ console.log(111222)
|
|
|
+ console.log(page.value)
|
|
|
+ console.log(pageSize.value)
|
|
|
+ console.log(keywordInput.value)
|
|
|
+ console.log(pageCatids)
|
|
|
+ console.log(pageDepartment_id)
|
|
|
+ const listData = await requestDataPromise('/web/selectWebsiteCategory', {
|
|
|
+ method: 'GET',
|
|
|
+ query: {
|
|
|
+ 'page': page.value,
|
|
|
+ 'pageSize': pageSize.value,
|
|
|
+ 'keyword':keywordInput.value,
|
|
|
+ 'cityid':pageCatids,
|
|
|
+ 'department_id':pageDepartment_id
|
|
|
+ },
|
|
|
+ });
|
|
|
+ if(listData.data.rows){
|
|
|
+ console.log(listData)
|
|
|
+ newsList.value = listData.data.rows;
|
|
|
+ total.value = listData.data.count;
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
-onMounted(() => {
|
|
|
- getadList()
|
|
|
-})
|
|
|
|
|
|
-// 定义响应式数据
|
|
|
-const seoData = ref({
|
|
|
- title: '搜索',
|
|
|
- description: '默认描述',
|
|
|
- keywords: '默认关键词',
|
|
|
- image: 'https://example.com/default-image.jpg'
|
|
|
-});
|
|
|
+goSearch();
|
|
|
+//基于导航池搜索
|
|
|
+// let goSearchFont = async (font) => {
|
|
|
+// const listData = await requestDataPromise('/web/getWebsiteArticleList', {
|
|
|
+// method: 'GET',
|
|
|
+// query: {
|
|
|
+// 'page': page.value,
|
|
|
+// 'pageSize': pageSize.value,
|
|
|
+// 'catid': font
|
|
|
+// },
|
|
|
+// });
|
|
|
+// newsList.value = listData.data.rows;
|
|
|
+// total.value = listData.data.count;
|
|
|
+// }
|
|
|
|
|
|
-// 在 onMounted 钩子中获取数据
|
|
|
-onMounted(() => {
|
|
|
- seoData.value.title = '搜索';
|
|
|
- seoData.value.description = '默认描述';
|
|
|
- seoData.value.keywords = '默认关键词';
|
|
|
-})
|
|
|
+// //基于导航池与关键词搜索
|
|
|
+// let goSearchFontandCid = async (font) => {
|
|
|
+// const listData = await requestDataPromise('/web/getWebsiteArticleList', {
|
|
|
+// method: 'GET',
|
|
|
+// query: {
|
|
|
+// 'page': page.value,
|
|
|
+// 'pageSize': pageSize.value,
|
|
|
+// 'catid': category_id,
|
|
|
+// 'keyword':searchKey
|
|
|
+// },
|
|
|
+// });
|
|
|
+// newsList.value = listData.data.rows;
|
|
|
+// total.value = listData.data.count;
|
|
|
+// }
|
|
|
|
|
|
-// 在 onMounted 钩子中获取数据
|
|
|
-// onMounted(async () => {
|
|
|
-// try {
|
|
|
-// const response = await axios.get(`/web/getWebsiteCategoryHead?catid=${articleId}`);
|
|
|
-// const data = response.data.website_head; // 假设接口返回的数据在 data 字段中
|
|
|
-// console.log(seoData.value.title)
|
|
|
-// // 更新 seoData
|
|
|
-// seoData.value = {
|
|
|
-// title: data.seo_title,
|
|
|
-// description: data.seo_description,
|
|
|
-// keywords: data.seo_keywords,
|
|
|
-// image: data.seo_image
|
|
|
-// };
|
|
|
-// console.log(seoData.value.title)
|
|
|
|
|
|
+//直接查新闻
|
|
|
+// const newslists = async () => {
|
|
|
+// try {
|
|
|
+// // 从地区跳转
|
|
|
+// if (route.query.catids && route.query.catids.length > 0) {
|
|
|
+// // 将字符串转换回数组,并过滤掉可能的空值
|
|
|
+// catids.value = route.query.catids.split(',').filter(id => id);
|
|
|
+
|
|
|
+// if (catids.value.length > 0) {
|
|
|
+// // 有效的 catids 数组,可以进行后续操作
|
|
|
+// console.log('接收到的分类ID数组:', catids.value);
|
|
|
+// let font = catids.value.join(",")
|
|
|
+// font = "[" + font + "]"
|
|
|
+
|
|
|
+// goSearchFont(font);
|
|
|
+// } else {
|
|
|
+// // 处理空数组情况
|
|
|
+// console.log('未接收到有效的分类ID');
|
|
|
+// }
|
|
|
+// } else {
|
|
|
+// if (category_id == undefined) {
|
|
|
+// //直接搜索 默认进来没有导航池的话 不执行搜索
|
|
|
+// goSearch();
|
|
|
+// } else {
|
|
|
+// goSearchFontandCid();
|
|
|
+// }
|
|
|
+// }
|
|
|
// } catch (error) {
|
|
|
-// console.error('获取 SEO 数据失败:', error);
|
|
|
-// // 设置默认值
|
|
|
-// seoData.value = {
|
|
|
-// title: '三农资讯网',
|
|
|
-// description: '默认描述',
|
|
|
-// keywords: '默认关键词',
|
|
|
-// image: 'https://example.com/default-image.jpg'
|
|
|
-// };
|
|
|
-// }
|
|
|
-// });
|
|
|
-
|
|
|
-// 监听 seoData 的变化,动态设置 SEO 字段
|
|
|
-// watch(seoData, (newVal) => {
|
|
|
-// if (newVal.title) { // 确保 title 有值
|
|
|
-// useSeoMeta({
|
|
|
-// title: newVal.title, // 使用动态值
|
|
|
-// description: newVal.description,
|
|
|
-// ogTitle: newVal.title,
|
|
|
-// ogDescription: newVal.description,
|
|
|
-// ogImage: newVal.image,
|
|
|
-// twitterTitle: newVal.title,
|
|
|
-// twitterDescription: newVal.description,
|
|
|
-// twitterImage: newVal.image,
|
|
|
-// keywords: newVal.keywords
|
|
|
-// });
|
|
|
+// console.error(error);
|
|
|
// }
|
|
|
-// }, { immediate: true });
|
|
|
-
|
|
|
-//点击搜索按钮
|
|
|
-let goSearch = async () => {
|
|
|
- const response = await axios.get(`/web/getWebsiteArticleList?page=${page.value}&pageSize=${pageSize.value}&catid=${category_id}&keyword=${keywordInput.value}`);
|
|
|
- // console.log(response.data.rows);
|
|
|
- newsList.value = response.data.rows;
|
|
|
- total.value = response.data.count;
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
-onMounted(() => {
|
|
|
- id.value = route.query.id;
|
|
|
- console.log('id', id.value);
|
|
|
-})
|
|
|
+// }
|
|
|
+// newslists();
|
|
|
|
|
|
-// 页码
|
|
|
-// //页面组件传递数据的时间驱动函数
|
|
|
-// const handleData = (data) => {
|
|
|
-// console.log(data.value)
|
|
|
-// page.value = data.value
|
|
|
|
|
|
-// //在页码发生变化时去请求响应页面的新闻数据
|
|
|
-// axios.get(`/web/getWebsiteArticlesList?page=${page.value}&pageSize=${10}&catid=${14}&keyword=${keyWord.value}`).then(response => {
|
|
|
-// // console.log(response.data.rows);
|
|
|
-// newsList.value = response.data.rows;
|
|
|
-// }).catch(error => {
|
|
|
+// 查询导航池的方法
|
|
|
+// const newslists = async () => {
|
|
|
+// try {
|
|
|
+// // 从地区跳转
|
|
|
+// if (route.query.catids && route.query.catids.length > 0) {
|
|
|
+// // 将字符串转换回数组,并过滤掉可能的空值
|
|
|
+// catids.value = route.query.catids.split(',').filter(id => id);
|
|
|
+
|
|
|
+// if (catids.value.length > 0) {
|
|
|
+// // 有效的 catids 数组,可以进行后续操作
|
|
|
+// console.log('接收到的分类ID数组:', catids.value);
|
|
|
+// let font = catids.value.join(",")
|
|
|
+// font = "[" + font + "]"
|
|
|
+
|
|
|
+// goSearchFont(font);
|
|
|
+// } else {
|
|
|
+// // 处理空数组情况
|
|
|
+// console.log('未接收到有效的分类ID');
|
|
|
+// }
|
|
|
+// } else {
|
|
|
+// if (category_id == undefined) {
|
|
|
+// //直接搜索 默认进来没有导航池的话 不执行搜索
|
|
|
+// goSearch();
|
|
|
+// } else {
|
|
|
+// goSearchFontandCid();
|
|
|
+// }
|
|
|
+// }
|
|
|
+// } catch (error) {
|
|
|
// console.error(error);
|
|
|
-// })
|
|
|
+// }
|
|
|
// }
|
|
|
|
|
|
+// newslists();
|
|
|
+
|
|
|
+//分页事件
|
|
|
let changePage = (value) => {
|
|
|
console.log("当前页码", value);
|
|
|
page.value = value
|
|
|
console.log(page.value);
|
|
|
- newslists()
|
|
|
-}
|
|
|
-
|
|
|
-// 新闻列表
|
|
|
-const newsList = useState("newsList", () => '');
|
|
|
-const newslists = async () => {
|
|
|
- try {
|
|
|
-
|
|
|
- // const response = await axios.get(`/web/getWebsiteArticleList?page=${page.value}&pageSize=${pageSize.value}&keyword=${searchKey}`);
|
|
|
- // // console.log(response.data.rows);
|
|
|
- // newsList.value = response.data.rows;
|
|
|
- // total.value = response.data.count;
|
|
|
-
|
|
|
- // 从地区跳转
|
|
|
- if (route.query.catids && route.query.catids.length > 0) {
|
|
|
- // 将字符串转换回数组,并过滤掉可能的空值
|
|
|
- catids.value = route.query.catids.split(',').filter(id => id);
|
|
|
-
|
|
|
- if (catids.value.length > 0) {
|
|
|
- // 有效的 catids 数组,可以进行后续操作
|
|
|
- console.log('接收到的分类ID数组:', catids.value);
|
|
|
- let font = catids.value.join(",")
|
|
|
- font = "[" + font + "]"
|
|
|
- //console.log(font);
|
|
|
-
|
|
|
- const response = await axios.get(`/web/getWebsiteArticleList?page=${page.value}&pageSize=${pageSize.value}&catid=${font}`);
|
|
|
- console.log(response.data.rows);
|
|
|
- newsList.value = response.data.rows;
|
|
|
- total.value = response.data.count;
|
|
|
-
|
|
|
- } else {
|
|
|
- // 处理空数组情况
|
|
|
- console.log('未接收到有效的分类ID');
|
|
|
- }
|
|
|
- } else {
|
|
|
-
|
|
|
- if (category_id == undefined) {
|
|
|
- const response = await axios.get(`/web/getWebsiteArticleList?page=${page.value}&pageSize=${pageSize.value}&keyword=${searchKey}`);
|
|
|
- // console.log(response.data.rows);
|
|
|
- newsList.value = response.data.rows;
|
|
|
- total.value = response.data.count;
|
|
|
-
|
|
|
- } else {
|
|
|
- const response = await axios.get(`/web/getWebsiteArticleList?page=${page.value}&pageSize=${pageSize.value}&catid=${category_id}&keyword=${searchKey}`);
|
|
|
- // console.log(response.data.rows);
|
|
|
- newsList.value = response.data.rows;
|
|
|
- total.value = response.data.count;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- } catch (error) {
|
|
|
- console.error(error);
|
|
|
- }
|
|
|
+ goSearch()
|
|
|
}
|
|
|
-
|
|
|
-//热点资讯
|
|
|
-const hotlistall = useState("hotlistall", () => "");
|
|
|
-const hotlist = async () => {
|
|
|
- try {
|
|
|
- const response = await axios.get(`/web/getWebsiteArticlett?pageSize=${2}&level=${4}&placeid=${1}`);
|
|
|
- console.log('热点资讯', response.data);
|
|
|
- for (let item of response.data) {
|
|
|
- console.log(item);
|
|
|
- item.count = 1;
|
|
|
- }
|
|
|
- hotlistall.value = response.data;
|
|
|
- } catch (error) {
|
|
|
- console.error(error);
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-//资讯推荐1
|
|
|
-const news1 = useState("news1", () => "");
|
|
|
-const newslist1 = async () => {
|
|
|
- try {
|
|
|
- const response = await axios.get(`/web/getWebsiteArticlett?pageSize=${1}&level=${5}&placeid=${1}`);
|
|
|
- console.log('热点资讯', response.data);
|
|
|
- news1.value = response.data;
|
|
|
- } catch (error) {
|
|
|
- console.error(error);
|
|
|
- }
|
|
|
-}
|
|
|
-const news11 = useState("news11", () => "");
|
|
|
-const newslist11 = async () => {
|
|
|
- try {
|
|
|
- const response = await axios.get(`/web/getWebsiteArticlett?pageSize=${3}&level=${5}&placeid=${1}`);
|
|
|
- console.log('热点资讯', response.data);
|
|
|
- news11.value = response.data;
|
|
|
- } catch (error) {
|
|
|
- console.error(error);
|
|
|
- }
|
|
|
-}
|
|
|
-//资讯推荐2
|
|
|
-const news2 = useState("news2", () => "");
|
|
|
-const newslist2 = async () => {
|
|
|
- try {
|
|
|
- const response = await axios.get(`/web/getWebsiteArticlett?pageSize=${1}&level=${5}&placeid=${1}`);
|
|
|
- console.log('热点资讯', response.data);
|
|
|
- news2.value = response.data;
|
|
|
- } catch (error) {
|
|
|
- console.error(error);
|
|
|
- }
|
|
|
-}
|
|
|
-const news22 = useState("news22", () => "");
|
|
|
-const newslist22 = async () => {
|
|
|
- try {
|
|
|
- const response = await axios.get(`/web/getWebsiteArticlett?pageSize=${3}&level=${5}&placeid=${1}`);
|
|
|
- console.log('热点资讯', response.data);
|
|
|
- news22.value = response.data;
|
|
|
- } catch (error) {
|
|
|
- console.error(error);
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
+//2.页面数据 end ---------------------------------------->
|
|
|
|
|
|
|
|
|
-//挂载成功钩子函数
|
|
|
-onMounted(() => {
|
|
|
-
|
|
|
- // 资讯推荐
|
|
|
- newslists()
|
|
|
- // 热点资讯
|
|
|
- hotlist()
|
|
|
- // 资讯推荐
|
|
|
- newslist1()
|
|
|
- newslist2()
|
|
|
- // 热点资讯
|
|
|
- newslist11()
|
|
|
- newslist22()
|
|
|
-})
|
|
|
-
|
|
|
-//路由中间件
|
|
|
-definePageMeta({
|
|
|
- middleware: 'auth'
|
|
|
-})
|
|
|
+//4.设置seo信息 start---------------------------------------->
|
|
|
+//4.1 设置seo信息
|
|
|
+const setData = await requestDataPromise('/web/getWebsiteFootInfo', {
|
|
|
+ method: 'GET',
|
|
|
+ query: {},
|
|
|
+});
|
|
|
|
|
|
+let seoTitle = setData.data.website_head.title;
|
|
|
+let seoDescription = setData.data.website_head.description;
|
|
|
+let seoKeywords = setData.data.website_head.keywords;
|
|
|
+let seoSuffix = setData.data.website_head.suffix;
|
|
|
+let seoName = setData.data.website_head.website_name;
|
|
|
+
|
|
|
+useSeoMeta({
|
|
|
+ title: seoTitle + "_" + seoSuffix,
|
|
|
+ meta: [
|
|
|
+ { name: 'description', content: seoDescription + "_" + seoName + "_" + seoSuffix , tagPriority: 10 },
|
|
|
+ { name: 'keywords', content: seoKeywords + "_" + seoName + "_" + seoSuffix , tagPriority: 10 }
|
|
|
+ ]
|
|
|
+});
|
|
|
+//4.设置seo信息 end---------------------------------------->
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
-//导航条
|
|
|
-.breadcrumb {
|
|
|
- width: 100%;
|
|
|
- height: 22px;
|
|
|
- margin-bottom: 30px;
|
|
|
- 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;
|
|
|
-
|
|
|
- :deep(.el-breadcrumb) {
|
|
|
- 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;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-.empty {
|
|
|
- div {
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
- align-items: center;
|
|
|
- padding-top: 200px;
|
|
|
- }
|
|
|
-
|
|
|
- width: 100%;
|
|
|
- height: 600px;
|
|
|
- font-size: 26px;
|
|
|
- color: #CCCCCC;
|
|
|
-
|
|
|
- img {
|
|
|
- display: inline-block;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-// 资讯列表
|
|
|
-.newsList {
|
|
|
- width: 1200px;
|
|
|
- margin: 0 auto;
|
|
|
- //height: 675px;
|
|
|
- margin-bottom: 70px;
|
|
|
-
|
|
|
- .inner {
|
|
|
- width: 1200px;
|
|
|
-
|
|
|
- .innerLeft {
|
|
|
- width: 100%;
|
|
|
- }
|
|
|
-
|
|
|
- .innerLeft,
|
|
|
- .innerRight {
|
|
|
- border-top: 1px solid #CCCCCC;
|
|
|
- clear: both;
|
|
|
- float: none;
|
|
|
- }
|
|
|
-
|
|
|
- .innerLeft {
|
|
|
- //height: 675px;
|
|
|
-
|
|
|
- >.list {
|
|
|
- //height: 570px;
|
|
|
- margin-bottom: 70px;
|
|
|
-
|
|
|
- >li {
|
|
|
- width: 1200px;
|
|
|
- height: 56px;
|
|
|
- white-space: nowrap;
|
|
|
- overflow: hidden;
|
|
|
- text-overflow: ellipsis;
|
|
|
- line-height: 56px;
|
|
|
-
|
|
|
-
|
|
|
- a {
|
|
|
- display: inline-block;
|
|
|
- width: 800px;
|
|
|
- height: 26px;
|
|
|
- font-family: Microsoft YaHei, Microsoft YaHei;
|
|
|
- font-weight: 400;
|
|
|
- font-size: 20px;
|
|
|
- color: #333333;
|
|
|
- line-height: 26px;
|
|
|
- text-align: left;
|
|
|
- font-style: normal;
|
|
|
- text-transform: none;
|
|
|
- white-space: nowrap;
|
|
|
- overflow: hidden;
|
|
|
- text-overflow: ellipsis;
|
|
|
- }
|
|
|
-
|
|
|
- .time {
|
|
|
- font-family: Microsoft YaHei, Microsoft YaHei;
|
|
|
- font-weight: 400;
|
|
|
- font-size: 18px;
|
|
|
- color: #333333;
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- >li:hover>a {
|
|
|
- color: #a01c0e;
|
|
|
- }
|
|
|
-
|
|
|
- >li:nth-child(1)::after,
|
|
|
- >li:nth-child(2)::after {
|
|
|
- content: "热";
|
|
|
- margin-left: 13px;
|
|
|
- background: #FF8A37;
|
|
|
- color: #fff;
|
|
|
- font-size: 14px;
|
|
|
- padding: 0px 2px;
|
|
|
- }
|
|
|
-
|
|
|
- >li:nth-child(5n) {
|
|
|
- border-bottom: 1px solid #D9D9D9;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- >.pagination {
|
|
|
- width: 100%;
|
|
|
- height: 34px;
|
|
|
- margin-left: 141px;
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
- margin: 0;
|
|
|
-
|
|
|
- // 鼠标移入后字体颜色
|
|
|
- .el-pagination::v-deep :hover {
|
|
|
- color: #a01c0e;
|
|
|
- }
|
|
|
-
|
|
|
- .el-pagination.is-background::v-deep .btn-next,
|
|
|
- .el-pagination.is-background::v-deep .btn-prev {
|
|
|
- width: 70px;
|
|
|
- height: 34px;
|
|
|
- margin: 0px 10px;
|
|
|
- border-radius: 4px;
|
|
|
- }
|
|
|
-
|
|
|
- .el-pagination.is-background::v-deep .el-pager li {
|
|
|
- margin: 0px 10px;
|
|
|
- width: 38px;
|
|
|
- height: 34px;
|
|
|
- border-radius: 4px;
|
|
|
- }
|
|
|
-
|
|
|
- .el-pagination.is-background::v-deep .btn-next.is-active,
|
|
|
- .el-pagination.is-background::v-deep .btn-prev.is-active,
|
|
|
- .el-pagination.is-background::v-deep .el-pager li.is-active {
|
|
|
- background-color: #a01c0e;
|
|
|
- color: #fff;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .innerRight {
|
|
|
- width: 381px;
|
|
|
- height: 605px;
|
|
|
- clear: both;
|
|
|
- overflow: hidden;
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-//资讯推荐
|
|
|
-.zixuntuijian {
|
|
|
- width: 100%;
|
|
|
- height: 290px;
|
|
|
- margin-bottom: 70px;
|
|
|
-
|
|
|
- .innerLeft {
|
|
|
-
|
|
|
- // 左侧
|
|
|
- .zixunLeft {
|
|
|
- margin-right: 30px;
|
|
|
- }
|
|
|
-
|
|
|
- .zixunRight,
|
|
|
- .zixunLeft {
|
|
|
- float: left;
|
|
|
- width: 380px;
|
|
|
- height: 290px;
|
|
|
-
|
|
|
- // 标题部分
|
|
|
- >.title {
|
|
|
- width: 380px;
|
|
|
- }
|
|
|
-
|
|
|
- >.title>h3 {
|
|
|
- height: 36px;
|
|
|
- font-family: Source Han Sans, Source Han Sans;
|
|
|
- font-weight: bold;
|
|
|
- font-size: 24px;
|
|
|
- color: #000000;
|
|
|
- line-height: 28px;
|
|
|
- text-align: left;
|
|
|
- font-style: normal;
|
|
|
- text-transform: none;
|
|
|
- border-bottom: 1px solid #a01c0e;
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- >.title>h3>span {
|
|
|
- float: right;
|
|
|
- width: 56px;
|
|
|
- height: 20px;
|
|
|
- line-height: 24px;
|
|
|
- font-weight: 400;
|
|
|
- font-size: 14px;
|
|
|
- color: #999999;
|
|
|
- font-style: normal;
|
|
|
- text-transform: none;
|
|
|
- }
|
|
|
-
|
|
|
- .photo_text {
|
|
|
-
|
|
|
- >li:first-child {
|
|
|
- width: 380px;
|
|
|
- height: 120px;
|
|
|
- margin-top: 20px;
|
|
|
- margin-bottom: 15px;
|
|
|
- position: relative;
|
|
|
-
|
|
|
- >img {
|
|
|
- float: left;
|
|
|
- width: 160px;
|
|
|
- height: 120px;
|
|
|
- }
|
|
|
-
|
|
|
- >div {
|
|
|
- float: left;
|
|
|
- width: 220px;
|
|
|
- height: 120px;
|
|
|
- padding-left: 15px;
|
|
|
- padding-top: 6px;
|
|
|
- box-sizing: border-box;
|
|
|
- background-color: #f6f6f6;
|
|
|
-
|
|
|
-
|
|
|
- >h5 {
|
|
|
- width: 200px;
|
|
|
- height: 54px;
|
|
|
- display: -webkit-box;
|
|
|
- -webkit-box-orient: vertical;
|
|
|
- -webkit-line-clamp: 2;
|
|
|
- overflow: hidden;
|
|
|
- text-overflow: ellipsis;
|
|
|
- word-break: break-all;
|
|
|
- font-family: Source Han Sans, Source Han Sans;
|
|
|
- font-weight: 500;
|
|
|
- font-size: 18px;
|
|
|
- color: #333333;
|
|
|
- line-height: 26px;
|
|
|
- text-align: left;
|
|
|
- font-style: normal;
|
|
|
- text-transform: none;
|
|
|
- }
|
|
|
-
|
|
|
- >p {
|
|
|
- width: 200px;
|
|
|
- height: 22px;
|
|
|
- line-height: 20px;
|
|
|
- position: absolute;
|
|
|
- bottom: 5px;
|
|
|
- right: 0;
|
|
|
-
|
|
|
- >span {
|
|
|
- display: inline-block;
|
|
|
- // width: 100px;
|
|
|
- height: 18px;
|
|
|
- font-family: Source Han Sans, Source Han Sans;
|
|
|
- font-weight: 400;
|
|
|
- font-size: 12px;
|
|
|
- color: #999999;
|
|
|
- text-align: left;
|
|
|
- line-height: 14px;
|
|
|
- font-style: normal;
|
|
|
- text-transform: none;
|
|
|
- }
|
|
|
-
|
|
|
- >span:last-child {
|
|
|
- // width: 90px;
|
|
|
- text-align: right;
|
|
|
- margin-left: 20px;
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- >li {
|
|
|
- width: 380px;
|
|
|
- height: 25px;
|
|
|
- white-space: nowrap;
|
|
|
- overflow: hidden;
|
|
|
- text-overflow: ellipsis;
|
|
|
- font-family: PingFang SC, PingFang SC;
|
|
|
- font-weight: 500;
|
|
|
- font-size: 18px;
|
|
|
- color: #333333;
|
|
|
- line-height: 21px;
|
|
|
- text-align: left;
|
|
|
- font-style: normal;
|
|
|
- text-transform: none;
|
|
|
- margin-bottom: 10px;
|
|
|
-
|
|
|
- em {
|
|
|
- display: inline-block;
|
|
|
- width: 8px;
|
|
|
- height: 8px;
|
|
|
- border-radius: 8px;
|
|
|
- margin-right: 10px;
|
|
|
- background-color: #d9d9d9;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- >li:hover {
|
|
|
- color: #a01c0e;
|
|
|
- }
|
|
|
-
|
|
|
- >li:hover em {
|
|
|
- background-color: #a01c0e;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .innerRight {
|
|
|
- width: 381px;
|
|
|
- height: 290px;
|
|
|
- background-color: #fbfbfb;
|
|
|
-
|
|
|
- >.title {
|
|
|
- width: 380px;
|
|
|
- height: 40px;
|
|
|
- line-height: 40px;
|
|
|
- border-top: 1px solid #a01c0e;
|
|
|
- border-bottom: 1px solid #e7e7e7;
|
|
|
-
|
|
|
- >h4 {
|
|
|
- font-family: Microsoft YaHei, Microsoft YaHei;
|
|
|
- font-weight: 400;
|
|
|
- margin-left: 20px;
|
|
|
- font-size: 20px;
|
|
|
- color: #000000;
|
|
|
- text-align: left;
|
|
|
- font-style: normal;
|
|
|
- text-transform: none;
|
|
|
-
|
|
|
- >span {
|
|
|
- float: right;
|
|
|
- font-family: Microsoft YaHei, Microsoft YaHei;
|
|
|
- font-weight: 400;
|
|
|
- font-size: 14px;
|
|
|
- margin-right: 10px;
|
|
|
- color: #999999;
|
|
|
- text-align: left;
|
|
|
- font-style: normal;
|
|
|
- text-transform: none;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- .rightList {
|
|
|
- height: 540px;
|
|
|
- margin-top: 20px;
|
|
|
-
|
|
|
- >li {
|
|
|
- height: 100px;
|
|
|
- margin-bottom: 10px;
|
|
|
-
|
|
|
- >img {
|
|
|
- width: 150px;
|
|
|
- height: 100px;
|
|
|
- }
|
|
|
-
|
|
|
- >p {
|
|
|
- width: 219px;
|
|
|
- height: 100px;
|
|
|
- padding-left: 12px;
|
|
|
- font-family: PingFang SC, PingFang SC;
|
|
|
- font-weight: 400;
|
|
|
- font-size: 16px;
|
|
|
- color: #333333;
|
|
|
- line-height: 22px;
|
|
|
- text-align: left;
|
|
|
- font-style: normal;
|
|
|
- text-transform: none;
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- >p:hover {
|
|
|
- box-shadow: 0 0 16px 1px rgba(0, 0, 0, 0.1);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-.searchBox {
|
|
|
- text-align: center;
|
|
|
- padding-bottom: 40px;
|
|
|
-}
|
|
|
-
|
|
|
-.search {
|
|
|
- width: 100%;
|
|
|
- height: 100px;
|
|
|
- margin-top: 40px;
|
|
|
- // background-color: #f5f5f5;
|
|
|
-
|
|
|
- .inner {
|
|
|
- width: 1200px;
|
|
|
- height: 100px;
|
|
|
- // line-height: 100px;
|
|
|
- padding-top: 10px;
|
|
|
- text-align: center;
|
|
|
-
|
|
|
- input {
|
|
|
- width: 582px;
|
|
|
- height: 46px;
|
|
|
- outline: none;
|
|
|
- border: 1px solid #E6E6E6;
|
|
|
- border-radius: 0;
|
|
|
- padding-left: 20px;
|
|
|
- vertical-align: 0px;
|
|
|
- font-size: 16px;
|
|
|
- color: #666666
|
|
|
- }
|
|
|
-
|
|
|
- button {
|
|
|
- width: 120px;
|
|
|
- height: 48px;
|
|
|
- background-color: #a01c0e;
|
|
|
- color: #fff;
|
|
|
- border: none;
|
|
|
- border-radius: 0;
|
|
|
- cursor: pointer;
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
+@import url('@/assets/css/search.less');
|
|
|
</style>
|