Commit 173265e5 authored by lei's avatar lei

2025.06.18修改

parent ae9bc87c
...@@ -2,15 +2,26 @@ ...@@ -2,15 +2,26 @@
<template> <template>
<header class="header"> <header class="header">
<div <div class="banner" @mouseover="stopCarousel" @mouseout="startCarousel">
class="banner"
@mouseover="stopCarousel"
@mouseout="startCarousel"
>
<div class="banner-bg"> <div class="banner-bg">
<el-carousel height="520px" :interval="carouselInterval" arrow="never" :loop="true" indicator-position="inside"> <el-carousel
height="520px"
:interval="carouselInterval"
arrow="never"
:loop="true"
indicator-position="inside"
>
<el-carousel-item v-for="item in bannerList" :key="item.id"> <el-carousel-item v-for="item in bannerList" :key="item.id">
<div style="width: 100%;height: 100%;background-size: cover;background-repeat: no-repeat;background-position: center;" :style="{backgroundImage:`url(${baseApi}${item.url})`}"></div> <div
style="
width: 100%;
height: 100%;
background-size: cover;
background-repeat: no-repeat;
background-position: center;
"
:style="{ backgroundImage: `url(${baseApi}${item.url})` }"
></div>
</el-carousel-item> </el-carousel-item>
</el-carousel> </el-carousel>
</div> </div>
...@@ -22,7 +33,7 @@ ...@@ -22,7 +33,7 @@
<div v-if="logo" class="logo"> <div v-if="logo" class="logo">
<img :src="logo" alt="Logo" class="logo-image" /> <img :src="logo" alt="Logo" class="logo-image" />
</div> </div>
<div class="search-bar" v-show="show"> <div class="search-bar" v-show="show">
<div class="search-input"> <div class="search-input">
<el-input <el-input
...@@ -46,7 +57,7 @@ ...@@ -46,7 +57,7 @@
> >
</div> --> </div> -->
</div> </div>
<HorizontalMenu :activeIndex="activeIndex" class="header-menu"/> <HorizontalMenu :activeIndex="activeIndex" class="header-menu" />
</div> </div>
</header> </header>
</template> </template>
...@@ -70,7 +81,7 @@ export default { ...@@ -70,7 +81,7 @@ export default {
}, },
bannerImage: { bannerImage: {
type: String, type: String,
default:require("~/static/images/banner.png"), default: require("~/static/images/banner.png"),
}, },
logo: { logo: {
type: String, type: String,
...@@ -87,7 +98,7 @@ export default { ...@@ -87,7 +98,7 @@ export default {
isHover: false, isHover: false,
searchKeyword: "", searchKeyword: "",
keywords: this.initialKeywords.slice(), // Add your keywords here keywords: this.initialKeywords.slice(), // Add your keywords here
searchCon: '', searchCon: "",
total: 0, total: 0,
carouselInterval: 5000, carouselInterval: 5000,
query: { query: {
...@@ -95,42 +106,40 @@ export default { ...@@ -95,42 +106,40 @@ export default {
pageSize: 10, pageSize: 10,
searchCon: null, searchCon: null,
}, },
bannerList:[], bannerList: [],
}; };
}, },
created(){ created() {
this.bannerData(); this.bannerData();
this.pvAdd(); this.pvAdd();
this.uvAdd(); this.uvAdd();
}, },
methods: { methods: {
stopCarousel() { stopCarousel() {
this.carouselInterval = 0; this.carouselInterval = 0;
}, },
startCarousel() { startCarousel() {
this.carouselInterval = 5000; this.carouselInterval = 5000;
}, },
handleSearch() { handleSearch() {
if(this.query.searchCon){ if (this.query.searchCon) {
this.$router.push({ this.$router.push({
path: `/Search?search=${this.query.searchCon}`, path: `/Search?search=${this.query.searchCon}`,
}); });
}else{ } else {
this.$message({ this.$message({
message: "请输入要查询的内容", message: "请输入要查询的内容",
type: "error", type: "error",
}); });
return return;
} }
}, },
keywordClick(keyword){ keywordClick(keyword) {
this.$router.push({ this.$router.push({
path: `/Search?search=${keyword}`, path: `/Search?search=${keyword}`,
}); });
}, },
async bannerData(){ async bannerData() {
try { try {
let that = this; let that = this;
const response = await sendRequest( const response = await sendRequest(
...@@ -142,24 +151,18 @@ export default { ...@@ -142,24 +151,18 @@ export default {
console.error("Error fetching data:", error); console.error("Error fetching data:", error);
} }
}, },
async pvAdd(){ async pvAdd() {
try { try {
let that = this; let that = this;
const response = await sendRequest( const response = await sendRequest(`/business/screening/pv`, "get");
`/business/screening/pv`,
"get"
);
} catch (error) { } catch (error) {
console.error("Error fetching data:", error); console.error("Error fetching data:", error);
} }
}, },
async uvAdd(){ async uvAdd() {
try { try {
let that = this; let that = this;
const response = await sendRequest( const response = await sendRequest(`/business/screening/uv`, "get");
`/business/screening/uv`,
"get"
);
} catch (error) { } catch (error) {
console.error("Error fetching data:", error); console.error("Error fetching data:", error);
} }
...@@ -182,17 +185,17 @@ export default { ...@@ -182,17 +185,17 @@ export default {
height: 520px; height: 520px;
// background: url(~/static/images/banner.png) no-repeat center; // background: url(~/static/images/banner.png) no-repeat center;
// background-size: cover; // background-size: cover;
.ysjszx{ .ysjszx {
position: absolute; position: absolute;
right: 0; right: 0;
bottom: -4px; bottom: -4px;
} }
.banner-bg{ .banner-bg {
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 100%; height: 100%;
left:0; left: 0;
top:0; top: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
z-index: 0; z-index: 0;
...@@ -206,7 +209,7 @@ export default { ...@@ -206,7 +209,7 @@ export default {
} }
.logo { .logo {
width: 245px; width: 350px;
height: 73px; height: 73px;
position: absolute; position: absolute;
top: 30px; top: 30px;
...@@ -230,7 +233,7 @@ export default { ...@@ -230,7 +233,7 @@ export default {
overflow: hidden; overflow: hidden;
span { span {
cursor: pointer; cursor: pointer;
color:#fff; color: #fff;
&:first-child { &:first-child {
cursor: context-menu; cursor: context-menu;
} }
...@@ -262,39 +265,37 @@ export default { ...@@ -262,39 +265,37 @@ export default {
font-size: 24px; font-size: 24px;
} }
::v-deep .el-input__inner { ::v-deep .el-input__inner {
background-color: rgb(1 82 147 / 30%); background-color: rgb(1 82 147 / 30%);
background-image: none; background-image: none;
border: 1px solid rgb(1 82 147 / 30%); border: 1px solid rgb(1 82 147 / 30%);
height: 50px; height: 50px;
line-height: 50px; line-height: 50px;
color:#fff; color: #fff;
&::-webkit-input-placeholder { &::-webkit-input-placeholder {
color: #fff; color: #fff;
} }
} }
} }
.header-menu{ .header-menu {
position: absolute; position: absolute;
bottom:0; bottom: 0;
left:0; left: 0;
right: 0; right: 0;
} }
::v-deep .el-carousel__indicators--horizontal{ ::v-deep .el-carousel__indicators--horizontal {
bottom: 86px; bottom: 86px;
z-index: 77; z-index: 77;
} }
::v-deep .el-carousel__button{ ::v-deep .el-carousel__button {
width: 8px; width: 8px;
height: 8px; height: 8px;
border-radius: 50%; border-radius: 50%;
} }
::v-deep .el-carousel__indicator--horizontal{ ::v-deep .el-carousel__indicator--horizontal {
padding: 12px 6px; padding: 12px 6px;
} }
.inner{ .inner {
height: 50%; height: 50%;
} }
</style> </style>
...@@ -16,11 +16,11 @@ export default { ...@@ -16,11 +16,11 @@ export default {
link: [ link: [
// { rel: 'stylesheet', href: 'https://a.amap.com/jsapi_demos/static/demo-center/css/demo-center.css' }, // { rel: 'stylesheet', href: 'https://a.amap.com/jsapi_demos/static/demo-center/css/demo-center.css' },
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }, { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
{ rel: 'stylesheet', href: 'https://cdn.jsdelivr.net/npm/swiper/swiper-bundle.min.css' }, { rel: 'stylesheet', href: '/css/swiper-bundle.min.css' },
], ],
script: [ script: [
{ src: 'https://cdn.jsdelivr.net/npm/swiper/swiper-bundle.min.js', body: true }, { src: 'js/swiper-bundle.min.js', body: true },
{ {
type: 'text/javascript', type: 'text/javascript',
src: '/js/sj.js', src: '/js/sj.js',
...@@ -31,7 +31,7 @@ export default { ...@@ -31,7 +31,7 @@ export default {
src: '/js/echarts.min.js', src: '/js/echarts.min.js',
body: true, body: true,
}, },
{ src: '/js/font.js', body: true }, { src: '/js/font.js', body: true },
// { src: '/js/qrcode.js', body: true }, // { src: '/js/qrcode.js', body: true },
// { src: '~plugins/amap.js', ssr: false } // { src: '~plugins/amap.js', ssr: false }
...@@ -79,14 +79,15 @@ export default { ...@@ -79,14 +79,15 @@ export default {
}, },
env: { env: {
VUE_APP_File_VIEW: "https://cfkyw-package.oss-cn-beijing.aliyuncs.com", VUE_APP_File_VIEW: "https://cfkyw-package.oss-cn-beijing.aliyuncs.com",
API_URL: process.env.API_URL || '/prod-api', // API_URL: "http://192.168.2.16:12051/chkq" || '/prod-api',
API_URL: "https://www.cfkyw.com.cn/prod-api" || '/prod-api',
GLOBAL_VARIABLE: { GLOBAL_VARIABLE: {
company:{ company: {
name:'赤峰矿业(集团)有限责任公司', name: '赤峰矿业(集团)有限责任公司',
phone:'(0476)567 8669', phone: '(0476)567 8669',
email:'50215148258@qq.com', email: '50215148258@qq.com',
address:'松山区长胜路与玉龙大街交叉口南100米', address: '松山区长胜路与玉龙大街交叉口南100米',
contacts:'吕先生' contacts: '吕先生'
} }
} }
}, },
......
<template> <template>
<div class="news cfkqbg"> <div class="news cfkqbg">
<BackToTopButton /> <BackToTopButton />
<Header :activeIndex="99"/> <Header :activeIndex="99" />
<div class="m2zrCon m2pubCon background-attachment"> <div class="m2zrCon m2pubCon background-attachment">
<div class="container"> <div class="container">
<div class="inner"> <div class="inner">
...@@ -28,9 +28,11 @@ ...@@ -28,9 +28,11 @@
<div class="news-detail-file" v-if="content.file"> <div class="news-detail-file" v-if="content.file">
相关文件: 相关文件:
<p v-for="(file, index) in content.file" :key="index"> <p v-for="(file, index) in content.file" :key="index">
<a :href="`/prod-api${file}`" target="_blank">{{ <a
content.fileName[index] :href="`https://cfkyw-package.oss-cn-beijing.aliyuncs.com/${file}`"
}}</a> target="_blank"
>{{ content.fileName[index] }}</a
>
</p> </p>
<el-divider></el-divider> <el-divider></el-divider>
...@@ -96,6 +98,13 @@ export default { ...@@ -96,6 +98,13 @@ export default {
"get" "get"
); );
this.content = response.data; this.content = response.data;
// 进行字符串替换操作
if (response.data.chkqCaContent) {
this.content.chkqCaContent = response.data.chkqCaContent.replace(
/\/prod-api/g,
"https://cfkyw-package.oss-cn-beijing.aliyuncs.com/"
);
}
this.pageTitle = response.data.chkqCaTitle; this.pageTitle = response.data.chkqCaTitle;
} catch (error) { } catch (error) {
console.error("Error fetching data:", error); console.error("Error fetching data:", error);
...@@ -152,4 +161,4 @@ export default { ...@@ -152,4 +161,4 @@ export default {
width: 1250px; width: 1250px;
} }
} }
</style> </style>
\ No newline at end of file
<template> <template>
<div class="news cfkqbg"> <div class="news cfkqbg">
<BackToTopButton /> <BackToTopButton />
<Header :activeIndex="99"/> <Header :activeIndex="99" />
<div class="m2zrCon m2pubCon background-attachment"> <div class="m2zrCon m2pubCon background-attachment">
<div class="container"> <div class="container">
<div class="inner"> <div class="inner">
<div class="news-breadcrumb"> <div class="news-breadcrumb">
<el-breadcrumb separator-class="el-icon-arrow-right"> <el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item :to="{ path: '/' }" <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
>首页</el-breadcrumb-item
>
<el-breadcrumb-item>有色金属产业链</el-breadcrumb-item> <el-breadcrumb-item>有色金属产业链</el-breadcrumb-item>
<el-breadcrumb-item>{{ pageTitle }}</el-breadcrumb-item> <el-breadcrumb-item>{{ pageTitle }}</el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
</div> </div>
</div> </div>
<div class="inner news-con"> <div class="inner news-con">
<div class="news-detail-title">{{ content.ippTitle }}</div> <div class="news-detail-title">{{ content.ippTitle }}</div>
<el-divider></el-divider> <el-divider></el-divider>
<div v-html="content.ippContent" class="detail-content"></div> <div v-html="content.ippContent" class="detail-content"></div>
...@@ -24,9 +21,11 @@ ...@@ -24,9 +21,11 @@
<div class="news-detail-file" v-if="content.file"> <div class="news-detail-file" v-if="content.file">
相关文件: 相关文件:
<p v-for="(file, index) in content.file" :key="index"> <p v-for="(file, index) in content.file" :key="index">
<a :href="`/prod-api${file}`" target="_blank">{{ <a
content.fileName[index] :href="`https://cfkyw-package.oss-cn-beijing.aliyuncs.com/${file}`"
}}</a> target="_blank"
>{{ content.fileName[index] }}</a
>
</p> </p>
<el-divider></el-divider> <el-divider></el-divider>
...@@ -92,6 +91,13 @@ export default { ...@@ -92,6 +91,13 @@ export default {
"get" "get"
); );
this.content = response.data; this.content = response.data;
// 进行字符串替换操作
if (response.data.chkqCaContent) {
this.content.chkqCaContent = response.data.chkqCaContent.replace(
/\/prod-api/g,
"https://cfkyw-package.oss-cn-beijing.aliyuncs.com/"
);
}
this.pageTitle = response.data.ippTitle; this.pageTitle = response.data.ippTitle;
} catch (error) { } catch (error) {
console.error("Error fetching data:", error); console.error("Error fetching data:", error);
...@@ -128,49 +134,46 @@ export default { ...@@ -128,49 +134,46 @@ export default {
} }
.news-detail-title { .news-detail-title {
margin-bottom: 20px; margin-bottom: 20px;
} }
.detailbro-info{ .detailbro-info {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
.news-detail-share { .news-detail-share {
font-size: 16px; font-size: 16px;
margin-bottom: 0px; margin-bottom: 0px;
span{ span {
display: inline-block; display: inline-block;
margin-right: 10px; margin-right: 10px;
} }
a{ a {
display: inline-block; display: inline-block;
padding: 0; padding: 0;
margin: 0 4px; margin: 0 4px;
height: 26px; height: 26px;
width: 26px; width: 26px;
} }
#wx{ #wx {
background: url(~/static/images/cf_bshare_icon01.png) no-repeat center; background: url(~/static/images/cf_bshare_icon01.png) no-repeat center;
} }
#wb{ #wb {
background: url(~/static/images/cf_bshare_icon02.png) no-repeat center; background: url(~/static/images/cf_bshare_icon02.png) no-repeat center;
} }
#kj{ #kj {
background: url(~/static/images/cf_bshare_icon03.png) no-repeat center; background: url(~/static/images/cf_bshare_icon03.png) no-repeat center;
} }
} }
.detail-content p { .detail-content p {
font-size: 16px; font-size: 16px;
width: 100%; width: 100%;
} }
} }
.el-divider--horizontal{ .el-divider--horizontal {
margin-top: 10px; margin-top: 10px;
} }
.news-con{ .news-con {
box-shadow: 3px 3px 6px 2px rgba(0, 0, 0, .2); box-shadow: 3px 3px 6px 2px rgba(0, 0, 0, 0.2);
padding:60px; padding: 60px;
} }
@media (min-width: 1200px) { @media (min-width: 1200px) {
.inner { .inner {
...@@ -182,8 +185,7 @@ export default { ...@@ -182,8 +185,7 @@ export default {
width: 1250px; width: 1250px;
} }
} }
.cfkqbg{ .cfkqbg {
background: none; background: none;
} }
</style>
</style>
\ No newline at end of file
<template> <template>
<div class="news cfkqbg"> <div class="news cfkqbg">
<BackToTopButton /> <BackToTopButton />
<Header :activeIndex="99"/> <Header :activeIndex="99" />
<div class="m2zrCon m2pubCon background-attachment"> <div class="m2zrCon m2pubCon background-attachment">
<div class="container"> <div class="container">
<div class="inner"> <div class="inner">
<div class="news-breadcrumb"> <div class="news-breadcrumb">
<el-breadcrumb separator-class="el-icon-arrow-right"> <el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item :to="{ path: '/' }" <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
>首页</el-breadcrumb-item
>
<el-breadcrumb-item>矿业研发招商政策</el-breadcrumb-item> <el-breadcrumb-item>矿业研发招商政策</el-breadcrumb-item>
<el-breadcrumb-item>{{ pageTitle }}</el-breadcrumb-item> <el-breadcrumb-item>{{ pageTitle }}</el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
</div> </div>
</div> </div>
<div class="inner news-con"> <div class="inner news-con">
<div class="news-detail-title">{{ content.ippTitle }}</div> <div class="news-detail-title">{{ content.ippTitle }}</div>
<!-- <div class="news-detail-share"> <!-- <div class="news-detail-share">
<span>来源:{{ content.newsOrigin }}</span> <span>来源:{{ content.newsOrigin }}</span>
...@@ -29,9 +26,11 @@ ...@@ -29,9 +26,11 @@
<div class="news-detail-file" v-if="content.file"> <div class="news-detail-file" v-if="content.file">
相关文件: 相关文件:
<p v-for="(file, index) in content.file" :key="index"> <p v-for="(file, index) in content.file" :key="index">
<a :href="`/prod-api${file}`" target="_blank">{{ <a
content.fileName[index] :href="`https://cfkyw-package.oss-cn-beijing.aliyuncs.com/${file}`"
}}</a> target="_blank"
>{{ content.fileName[index] }}</a
>
</p> </p>
<el-divider></el-divider> <el-divider></el-divider>
...@@ -97,6 +96,13 @@ export default { ...@@ -97,6 +96,13 @@ export default {
"get" "get"
); );
this.content = response.data; this.content = response.data;
// 进行字符串替换操作
if (response.data.ippContent) {
this.content.ippContent = response.data.ippContent.replace(
/\/prod-api/g,
"https://cfkyw-package.oss-cn-beijing.aliyuncs.com/"
);
}
this.pageTitle = response.data.ippTitle; this.pageTitle = response.data.ippTitle;
} catch (error) { } catch (error) {
console.error("Error fetching data:", error); console.error("Error fetching data:", error);
...@@ -133,49 +139,46 @@ export default { ...@@ -133,49 +139,46 @@ export default {
} }
.news-detail-title { .news-detail-title {
margin-bottom: 20px; margin-bottom: 20px;
} }
.detailbro-info{ .detailbro-info {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
.news-detail-share { .news-detail-share {
font-size: 16px; font-size: 16px;
margin-bottom: 0px; margin-bottom: 0px;
span{ span {
display: inline-block; display: inline-block;
margin-right: 10px; margin-right: 10px;
} }
a{ a {
display: inline-block; display: inline-block;
padding: 0; padding: 0;
margin: 0 4px; margin: 0 4px;
height: 26px; height: 26px;
width: 26px; width: 26px;
} }
#wx{ #wx {
background: url(~/static/images/cf_bshare_icon01.png) no-repeat center; background: url(~/static/images/cf_bshare_icon01.png) no-repeat center;
} }
#wb{ #wb {
background: url(~/static/images/cf_bshare_icon02.png) no-repeat center; background: url(~/static/images/cf_bshare_icon02.png) no-repeat center;
} }
#kj{ #kj {
background: url(~/static/images/cf_bshare_icon03.png) no-repeat center; background: url(~/static/images/cf_bshare_icon03.png) no-repeat center;
} }
} }
.detail-content p { .detail-content p {
font-size: 16px; font-size: 16px;
width: 100%; width: 100%;
} }
} }
.el-divider--horizontal{ .el-divider--horizontal {
margin-top: 10px; margin-top: 10px;
} }
.news-con{ .news-con {
box-shadow: 3px 3px 6px 2px rgba(0, 0, 0, .2); box-shadow: 3px 3px 6px 2px rgba(0, 0, 0, 0.2);
padding:60px; padding: 60px;
} }
@media (min-width: 1200px) { @media (min-width: 1200px) {
.inner { .inner {
...@@ -187,8 +190,7 @@ export default { ...@@ -187,8 +190,7 @@ export default {
width: 1250px; width: 1250px;
} }
} }
.cfkqbg{ .cfkqbg {
background: none; background: none;
} }
</style>
</style>
\ No newline at end of file
<template> <template>
<div class="news cfkqbg"> <div class="news cfkqbg">
<BackToTopButton /> <BackToTopButton />
<Header :activeIndex="6"/> <Header :activeIndex="6" />
<!-- <QRCodeComponent text="https://www.example.com" /> --> <!-- <QRCodeComponent text="https://www.example.com" /> -->
<div class="m2zrCon m2pubCon background-attachment"> <div class="m2zrCon m2pubCon background-attachment">
<div class="container"> <div class="container">
<div class="inner"> <div class="inner">
<div class="news-breadcrumb"> <div class="news-breadcrumb">
<el-breadcrumb separator-class="el-icon-arrow-right"> <el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item :to="{ path: '/' }" <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
>首页</el-breadcrumb-item <el-breadcrumb-item>新闻资讯</el-breadcrumb-item>
> <el-breadcrumb-item>{{ pageTitle }}</el-breadcrumb-item>
<el-breadcrumb-item>新闻资讯</el-breadcrumb-item> </el-breadcrumb>
<el-breadcrumb-item>{{ pageTitle }}</el-breadcrumb-item>
</el-breadcrumb>
</div>
</div> </div>
</div>
<div class="inner news-con"> <div class="inner news-con">
<div class="news-detail-title">{{ content.newsTitle }}</div> <div class="news-detail-title">{{ content.newsTitle }}</div>
<div class="detailbro-info "> <div class="detailbro-info">
<div class="news-detail-share"> <div class="news-detail-share">
<span>发布时间:{{ content.releaseTime }}</span> <span>发布时间:{{ content.releaseTime }}</span>
<span>来源:{{ content.newsOrigin }}</span> <span>来源:{{ content.newsOrigin }}</span>
...@@ -27,11 +24,24 @@ ...@@ -27,11 +24,24 @@
</div> </div>
<div class="news-detail-share"> <div class="news-detail-share">
<span>分享到:</span> <span>分享到:</span>
<a title="分享到QQ好友" id="wx" class="cup bshare-qqim" @click="shareQQ();"></a> <a
<a title="分享到新浪微博" id="wb" class="cup bshare-sinaminiblog" @click="shareWb();"></a> title="分享到QQ好友"
<a title="分享到QQ空间" id="kj" class="cup bshare-qzone" @click="shareQQzone();"></a> id="wx"
class="cup bshare-qqim"
@click="shareQQ()"
></a>
<a
title="分享到新浪微博"
id="wb"
class="cup bshare-sinaminiblog"
@click="shareWb()"
></a>
<a
title="分享到QQ空间"
id="kj"
class="cup bshare-qzone"
@click="shareQQzone()"
></a>
</div> </div>
<!-- <span>分享:<span @click="shareQQ">qq</span></span> --> <!-- <span>分享:<span @click="shareQQ">qq</span></span> -->
</div> </div>
...@@ -41,9 +51,11 @@ ...@@ -41,9 +51,11 @@
<div class="news-detail-file" v-if="content.file"> <div class="news-detail-file" v-if="content.file">
相关文件: 相关文件:
<p v-for="(file, index) in content.file" :key="index"> <p v-for="(file, index) in content.file" :key="index">
<a :href="`/prod-api${file}`" target="_blank">{{ <a
content.fileName[index] :href="`https://cfkyw-package.oss-cn-beijing.aliyuncs.com/${file}`"
}}</a> target="_blank"
>{{ content.fileName[index] }}</a
>
</p> </p>
<el-divider></el-divider> <el-divider></el-divider>
...@@ -57,7 +69,7 @@ ...@@ -57,7 +69,7 @@
<script> <script>
import axios from "axios"; import axios from "axios";
import { shareQQzone,qq } from "~/utils/tyler"; import { shareQQzone, qq } from "~/utils/tyler";
import CustomHeader from "~/components/CustomHeader.vue"; import CustomHeader from "~/components/CustomHeader.vue";
// import QRCodeComponent from "~/components/QRCodeComponent.vue"; // import QRCodeComponent from "~/components/QRCodeComponent.vue";
import sendRequest from "~/utils/request.js"; import sendRequest from "~/utils/request.js";
...@@ -103,15 +115,20 @@ export default { ...@@ -103,15 +115,20 @@ export default {
this.pageView(this.$route.query.id); this.pageView(this.$route.query.id);
}, },
methods: { methods: {
shareQQzone(){ shareQQzone() {
shareQQzone({title:this.pageTitle}) shareQQzone({ title: this.pageTitle });
}, },
shareQQ(){ shareQQ() {
qq({title:this.pageTitle}) qq({ title: this.pageTitle });
}, },
shareWb(){ shareWb() {
let currUrl = window.location.href; let currUrl = window.location.href;
window.open('http://service.weibo.com/share/share.php?url=' + currUrl + '&title=' + this.pageTitle); window.open(
"http://service.weibo.com/share/share.php?url=" +
currUrl +
"&title=" +
this.pageTitle
);
}, },
async fetchData() { async fetchData() {
try { try {
...@@ -121,6 +138,10 @@ export default { ...@@ -121,6 +138,10 @@ export default {
"get" "get"
); );
this.content = response.data; this.content = response.data;
this.content.newsContent = response.data.newsContent.replace(
/\/prod-api/g,
"https://cfkyw-package.oss-cn-beijing.aliyuncs.com"
);
this.pageTitle = response.data.newsTitle; this.pageTitle = response.data.newsTitle;
} catch (error) { } catch (error) {
console.error("Error fetching data:", error); console.error("Error fetching data:", error);
...@@ -157,49 +178,46 @@ export default { ...@@ -157,49 +178,46 @@ export default {
} }
.news-detail-title { .news-detail-title {
margin-bottom: 20px; margin-bottom: 20px;
} }
.detailbro-info{ .detailbro-info {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
.news-detail-share { .news-detail-share {
font-size: 16px; font-size: 16px;
margin-bottom: 0px; margin-bottom: 0px;
span{ span {
display: inline-block; display: inline-block;
margin-right: 10px; margin-right: 10px;
} }
a{ a {
display: inline-block; display: inline-block;
padding: 0; padding: 0;
margin: 0 4px; margin: 0 4px;
height: 26px; height: 26px;
width: 26px; width: 26px;
} }
#wx{ #wx {
background: url(~/static/images/cf_bshare_icon01.png) no-repeat center; background: url(~/static/images/cf_bshare_icon01.png) no-repeat center;
} }
#wb{ #wb {
background: url(~/static/images/cf_bshare_icon02.png) no-repeat center; background: url(~/static/images/cf_bshare_icon02.png) no-repeat center;
} }
#kj{ #kj {
background: url(~/static/images/cf_bshare_icon03.png) no-repeat center; background: url(~/static/images/cf_bshare_icon03.png) no-repeat center;
} }
} }
.detail-content p { .detail-content p {
font-size: 16px; font-size: 16px;
width: 100%; width: 100%;
} }
} }
.el-divider--horizontal{ .el-divider--horizontal {
margin-top: 10px; margin-top: 10px;
} }
.news-con{ .news-con {
box-shadow: 3px 3px 6px 2px rgba(0, 0, 0, .2); box-shadow: 3px 3px 6px 2px rgba(0, 0, 0, 0.2);
padding:60px; padding: 60px;
} }
@media (min-width: 1200px) { @media (min-width: 1200px) {
.inner { .inner {
...@@ -211,8 +229,7 @@ export default { ...@@ -211,8 +229,7 @@ export default {
width: 1250px; width: 1250px;
} }
} }
.cfkqbg{ .cfkqbg {
background: none; background: none;
} }
</style>
</style>
\ No newline at end of file
<template> <template>
<div class="goods-list"> <div class="goods-list">
<BackToTopButton /> <BackToTopButton />
<Header :activeIndex="5"/> <Header :activeIndex="5" />
<CommonDialog <CommonDialog
:show="dialogVisible" :show="dialogVisible"
@close-dialog="handleCloseDialog" @close-dialog="handleCloseDialog"
:omDemandName="omDemandName" :omDemandName="omDemandName"
/> />
<div class="wrapper"> <div class="wrapper">
<h1 style="font-size: 16px;"><span style="cursor: pointer;" @click="herfSup">供求信息</span> > 产品列表>{{ categoryName }}</h1> <h1 style="font-size: 16px">
<span style="cursor: pointer" @click="herfSup">供求信息</span> >
产品列表>{{ categoryName }}
</h1>
<article> <article>
<section class="infomation"> <section class="infomation">
<div class="table"> <div class="table">
<div class="search"> <div class="search">
<!-- <div class="input-search"> <!-- <div class="input-search">
<el-input placeholder="请输入产品名称" v-model="searchForm.name" class="input-with-select" @keyup.enter.native="handleSearch(searchForm.productName)" prefix-icon="el-icon-search"> <el-input placeholder="请输入产品名称" v-model="searchForm.name" class="input-with-select" @keyup.enter.native="handleSearch(searchForm.productName)" prefix-icon="el-icon-search">
...@@ -50,7 +51,11 @@ ...@@ -50,7 +51,11 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="二级类目" prop="industryLe2" v-if="searchForm.industryLe1"> <el-form-item
label="二级类目"
prop="industryLe2"
v-if="searchForm.industryLe1"
>
<el-select <el-select
v-model="searchForm.industryLe2" v-model="searchForm.industryLe2"
placeholder="二级类目" placeholder="二级类目"
...@@ -65,7 +70,6 @@ ...@@ -65,7 +70,6 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button
type="primary" type="primary"
...@@ -74,24 +78,30 @@ ...@@ -74,24 +78,30 @@
@click="handleQuery" @click="handleQuery"
>搜索</el-button >搜索</el-button
> >
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery" <el-button
icon="el-icon-refresh"
size="mini"
@click="resetQuery"
>重置</el-button >重置</el-button
> >
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<div class="list" v-if="productList"> <div class="list" v-if="productList">
<ul> <ul>
<li v-for="(item, index) in productList" :key="index"> <li v-for="(item, index) in productList" :key="index">
<div @click="goto(item.id)"> <div @click="goto(item.id)">
<img :src="`${baseApi}${item.appearanceImg&&item.appearanceImg[0]}`" alt="" /> <img
:src="`${baseApi}${
item.appearanceImg && item.appearanceImg[0]
}`"
alt=""
/>
</div> </div>
<h2 @click="goto(item.id)">{{item.productName}}</h2> <h2 @click="goto(item.id)">{{ item.productName }}</h2>
<h4 @click="openDia(item.productName)">联系平台</h4> <h4 @click="openDia(item.productName)">联系平台</h4>
</li> </li>
</ul> </ul>
</div> </div>
<div class="list" v-if="!productList">暂无数据</div> <div class="list" v-if="!productList">暂无数据</div>
</div> </div>
...@@ -123,9 +133,9 @@ export default { ...@@ -123,9 +133,9 @@ export default {
}, },
data() { data() {
return { return {
goodsName:'', goodsName: "",
categoryName:'', categoryName: "",
showCategoryName:false, showCategoryName: false,
baseApi: process.env.VUE_APP_File_VIEW, baseApi: process.env.VUE_APP_File_VIEW,
dialogVisible: false, dialogVisible: false,
omDemandName: "cs", omDemandName: "cs",
...@@ -135,9 +145,8 @@ export default { ...@@ -135,9 +145,8 @@ export default {
commonCode4hangye: [], commonCode4hangye: [],
productList: [], productList: [],
searchForm: {}, searchForm: {},
allLevel:[], allLevel: [],
productTypeList:[], productTypeList: [],
}; };
}, },
watch: { watch: {
...@@ -147,7 +156,7 @@ export default { ...@@ -147,7 +156,7 @@ export default {
}, },
deep: true, deep: true,
}, },
'searchForm.industryLe1'(newVal) { "searchForm.industryLe1"(newVal) {
// 当一级类目变化时,清空二级类目 // 当一级类目变化时,清空二级类目
// this.searchForm.industryLe2 = null; // this.searchForm.industryLe2 = null;
}, },
...@@ -164,12 +173,11 @@ export default { ...@@ -164,12 +173,11 @@ export default {
: []; : [];
}, },
}, },
created(){ created() {
this.resetForm(); this.resetForm();
}, },
async mounted() { async mounted() {
await this.getProductTypeList(); // 确保类型数据加载完成 await this.getProductTypeList(); // 确保类型数据加载完成
if (this.$route.query.industryLe2) { if (this.$route.query.industryLe2) {
// 如果 industryLe2 存在,优先使用 industryLe2 // 如果 industryLe2 存在,优先使用 industryLe2
...@@ -183,8 +191,8 @@ export default { ...@@ -183,8 +191,8 @@ export default {
); );
if (found) { if (found) {
// 找到对应的父级类目 industryLe1 并赋值 // 找到对应的父级类目 industryLe1 并赋值
this.$set(this.searchForm, 'industryLe1', firstLevel.id); this.$set(this.searchForm, "industryLe1", firstLevel.id);
this.$set(this.searchForm, 'industryLe2', industryLe2); this.$set(this.searchForm, "industryLe2", industryLe2);
console.log("industryLe1:", this.searchForm.industryLe1); console.log("industryLe1:", this.searchForm.industryLe1);
console.log("industryLe2:", this.searchForm.industryLe2); console.log("industryLe2:", this.searchForm.industryLe2);
...@@ -194,38 +202,45 @@ export default { ...@@ -194,38 +202,45 @@ export default {
} }
} else if (this.$route.query.industryLe1) { } else if (this.$route.query.industryLe1) {
// 如果 industryLe2 不存在,使用 industryLe1 // 如果 industryLe2 不存在,使用 industryLe1
this.$set(this.searchForm, 'industryLe1', Number(this.$route.query.industryLe1)); this.$set(
this.searchForm,
"industryLe1",
Number(this.$route.query.industryLe1)
);
} }
this.getCommoncode(); this.getCommoncode();
this.getProductList(); this.getProductList();
}, },
methods: { methods: {
resetQuery(){ resetQuery() {
this.resetForm(); this.resetForm();
}, },
resetForm(){ resetForm() {
this.searchForm = { this.searchForm = {
industryLe1: null, industryLe1: null,
industryLe2: null, industryLe2: null,
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
productName: null, productName: null,
} };
}, },
goto(id) { goto(id) {
this.$router.push({ path: `/Supply/det?id=${id}` }); this.$router.push({ path: `/Supply/det?id=${id}` });
}, },
le1Change(){this.searchForm.industryLe2 = null;}, le1Change() {
handleQuery(){}, this.searchForm.industryLe2 = null;
async handleSearch(){ },
await sendRequest( handleQuery() {},
"/business/equipmentProducts/listAll?name=" + this.searchForm.productName, async handleSearch() {
await sendRequest(
"/business/equipmentProducts/listAll?name=" +
this.searchForm.productName,
"get" "get"
); );
this.getProductList(this.searchForm.productName); this.getProductList(this.searchForm.productName);
}, },
herfSup(){ herfSup() {
this.$router.push({ this.$router.push({
path: `/Supply`, path: `/Supply`,
}); });
...@@ -237,31 +252,27 @@ export default { ...@@ -237,31 +252,27 @@ export default {
async getProductTypeList() { async getProductTypeList() {
const result = await sendRequest( const result = await sendRequest(
"/business/commodityCategory/tree", "/business/commodityCategory/tree",
"get", "get"
); );
this.productTypeList = result.data || []; this.productTypeList = result.data || [];
}, },
async getHangyeList() { async getHangyeList() {
const result = await sendRequest( const result = await sendRequest(
"/business/commodityCategory/list", "/business/commodityCategory/list",
"get" "get"
); );
if (result.rows && result.rows.length) { if (result.rows && result.rows.length) {
this.allLevel = result.rows; this.allLevel = result.rows;
} }
}, },
async getProductList() { async getProductList() {
let form={ let form = {
productName:this.searchForm.productName, productName: this.searchForm.productName,
};
} if (this.searchForm.industryLe2) {
if(this.searchForm.industryLe2){ form.industry = this.searchForm.industryLe2;
form.industry = this.searchForm.industryLe2 } else {
}else{ form.industry = this.searchForm.industryLe1;
form.industry = this.searchForm.industryLe1
} }
const result = await sendRequest( const result = await sendRequest(
"/business/equipmentProducts/listAll", "/business/equipmentProducts/listAll",
...@@ -296,7 +307,7 @@ export default { ...@@ -296,7 +307,7 @@ export default {
dictLabel: "全部", dictLabel: "全部",
dictValue: "", dictValue: "",
}); });
this.mapSearchCommonCode(); this.mapSearchCommonCode();
}, },
}, },
...@@ -306,8 +317,8 @@ export default { ...@@ -306,8 +317,8 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
$color: #479aff; $color: #479aff;
$border-color: #f1f1f1; $border-color: #f1f1f1;
.goods-list{ .goods-list {
background-color:#F3F3F3; background-color: #f3f3f3;
} }
.vertical-center { .vertical-center {
display: flex; display: flex;
...@@ -349,9 +360,14 @@ $border-color: #f1f1f1; ...@@ -349,9 +360,14 @@ $border-color: #f1f1f1;
color: #333333; color: #333333;
line-height: 35px; line-height: 35px;
cursor: pointer; cursor: pointer;
width: 216px;
display: block;
padding: 0px 18px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
} }
h3 { h3 {
font-size: 20px; font-size: 20px;
font-family: Source Han Sans CN; font-family: Source Han Sans CN;
font-weight: 400; font-weight: 400;
...@@ -390,9 +406,9 @@ $border-color: #f1f1f1; ...@@ -390,9 +406,9 @@ $border-color: #f1f1f1;
.search { .search {
width: 100%; width: 100%;
margin-bottom: 20px; margin-bottom: 20px;
border-bottom: 3px solid #F3F3F3; border-bottom: 3px solid #f3f3f3;
padding: 30px; padding: 30px;
.input-search{ .input-search {
width: 30%; width: 30%;
} }
...@@ -432,11 +448,10 @@ $border-color: #f1f1f1; ...@@ -432,11 +448,10 @@ $border-color: #f1f1f1;
border-radius: 5px; border-radius: 5px;
&.active { &.active {
font-weight: bold; font-weight: bold;
background: #EEEEEE; background: #eeeeee;
} }
&:hover{ &:hover {
background: rgba(238, 238, 238,.5); background: rgba(238, 238, 238, 0.5);
} }
} }
} }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment