Commit 2979fd8c by tang

feat: 首页查询跳转

parent bb5e2c13
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
@click="learnMore(i)" @click="learnMore(i)"
> >
<span>了解更多</span <span>了解更多</span
><img src="../../assets/image/home/more-arrow.png" alt="" /> ><img src="../../assets/image/home/more-arrow.png" alt=""/>
</button> </button>
</div> </div>
</div> </div>
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<!-- <img :src="el.picIndexPath" alt="" class="container"/>--> <!-- <img :src="el.picIndexPath" alt="" class="container"/>-->
<!-- </div>--> <!-- </div>-->
<div class="banner-bg"> <div class="banner-bg">
<img :src="el.picIndexPath" alt="" /> <img :src="el.picIndexPath" alt=""/>
</div> </div>
</div> </div>
</div> </div>
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
v-for="el in newsBanner" v-for="el in newsBanner"
:key="el.id" :key="el.id"
> >
<img :src="el.picFile" alt="..." class="newsBanner-tp" /> <img :src="el.picFile" alt="..." class="newsBanner-tp"/>
</div> </div>
</VueSlickCarousel> </VueSlickCarousel>
<VueSlickCarousel <VueSlickCarousel
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
role="tabpanel" role="tabpanel"
aria-labelledby="yaowen-tab" aria-labelledby="yaowen-tab"
> >
<list :list="news[0].data" /> <list :list="news[0].data"/>
</div> </div>
</div> </div>
</div> </div>
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
@click="whbsxtcyHandelClick(i)" @click="whbsxtcyHandelClick(i)"
> >
<div class="ywdt-tp"> <div class="ywdt-tp">
<img :src="tmp.ico" alt="" /> <img :src="tmp.ico" alt=""/>
</div> </div>
<div class="ywdt-bt">{{ tmp.name }}</div> <div class="ywdt-bt">{{ tmp.name }}</div>
</div> </div>
...@@ -164,7 +164,7 @@ ...@@ -164,7 +164,7 @@
@click="wsxtcyHandelClick(i)" @click="wsxtcyHandelClick(i)"
> >
<div class="ywdt-tp"> <div class="ywdt-tp">
<img :src="tmp.ico" alt="" /> <img :src="tmp.ico" alt=""/>
</div> </div>
<div class="ywdt-bt">{{ tmp.name }}</div> <div class="ywdt-bt">{{ tmp.name }}</div>
</div> </div>
...@@ -184,7 +184,7 @@ ...@@ -184,7 +184,7 @@
@click="wsylqyHandelClick(i)" @click="wsylqyHandelClick(i)"
> >
<div class="ywdt-tp"> <div class="ywdt-tp">
<img :src="tmp.ico" alt="" /> <img :src="tmp.ico" alt=""/>
</div> </div>
<div class="ywdt-bt">{{ tmp.name }}</div> <div class="ywdt-bt">{{ tmp.name }}</div>
</div> </div>
...@@ -202,7 +202,7 @@ ...@@ -202,7 +202,7 @@
@click="kjywblzqHandelClick(i)" @click="kjywblzqHandelClick(i)"
> >
<div class="ywdt-tp"> <div class="ywdt-tp">
<img :src="tmp.ico" alt="" /> <img :src="tmp.ico" alt=""/>
</div> </div>
<div class="ywdt-bt">{{ tmp.name }}</div> <div class="ywdt-bt">{{ tmp.name }}</div>
</div> </div>
...@@ -232,7 +232,7 @@ ...@@ -232,7 +232,7 @@
> >
<div class="dzfw-border"> <div class="dzfw-border">
<div class="dzfw-tp"> <div class="dzfw-tp">
<img :src="tmp.ico" alt="" /> <img :src="tmp.ico" alt=""/>
</div> </div>
<div class="dzfw-bt">{{ tmp.name }}</div> <div class="dzfw-bt">{{ tmp.name }}</div>
</div> </div>
...@@ -309,7 +309,7 @@ ...@@ -309,7 +309,7 @@
</el-input> </el-input>
</div> </div>
<div class="col-lg-3 chaxun-right"> <div class="col-lg-3 chaxun-right">
<button>境内条码查询</button> <button @click="toSearch(chaxun.type,chaxun.keywords,'company')">境内条码查询</button>
</div> </div>
</div> </div>
</div> </div>
...@@ -344,7 +344,7 @@ ...@@ -344,7 +344,7 @@
</el-input> </el-input>
</div> </div>
<div class="col-lg-3 chaxun-right"> <div class="col-lg-3 chaxun-right">
<button>境内条码查询</button> <button @click="toSearch(chaxun.type,chaxun.keywords,'product')">境内条码查询</button>
</div> </div>
</div> </div>
</div> </div>
...@@ -370,7 +370,7 @@ ...@@ -370,7 +370,7 @@
<div class="spqqsfz-cont row"> <div class="spqqsfz-cont row">
<div class="spqqsfz-cont-left col-lg-2"> <div class="spqqsfz-cont-left col-lg-2">
<div class="spqqsfz-cont-left-tp"> <div class="spqqsfz-cont-left-tp">
<img :src="spqqsfz.surl" alt="" /> <img :src="spqqsfz.surl" alt=""/>
</div> </div>
</div> </div>
<div class="spqqsfz-cont-right col-lg-10"> <div class="spqqsfz-cont-right col-lg-10">
...@@ -394,7 +394,7 @@ ...@@ -394,7 +394,7 @@
<div class="col offset-2 offset-lg-3"> <div class="col offset-2 offset-lg-3">
<button class="spqqsfz-btn blue" @click="spqqsfzHandelClick"> <button class="spqqsfz-btn blue" @click="spqqsfzHandelClick">
<span>更多商品信息</span <span>更多商品信息</span
><img src="../../assets/image/home/more-arrow.png" alt="" /> ><img src="../../assets/image/home/more-arrow.png" alt=""/>
</button> </button>
</div> </div>
</div> </div>
...@@ -418,7 +418,7 @@ ...@@ -418,7 +418,7 @@
alt="" alt=""
/></a> /></a>
</div> </div>
<list2 :list="djwh.data" /> <list2 :list="djwh.data"/>
</div> </div>
<div class="ztjj"> <div class="ztjj">
<div class="home-bottom-cate">专题聚焦</div> <div class="home-bottom-cate">专题聚焦</div>
...@@ -429,17 +429,17 @@ ...@@ -429,17 +429,17 @@
alt="" alt=""
/></a> /></a>
</div> </div>
<list2 :list="ztjj.data" /> <list2 :list="ztjj.data"/>
</div> </div>
<div class="yyly"> <div class="yyly">
<div class="home-bottom-cate">应用领域</div> <div class="home-bottom-cate">应用领域</div>
<yylyList :list="yyly.data" /> <yylyList :list="yyly.data"/>
</div> </div>
<div class="other"> <div class="other">
<div class="home-bottom-cate"> <div class="home-bottom-cate">
质检中心/协会/杂志社/标准委/其他 质检中心/协会/杂志社/标准委/其他
</div> </div>
<otherList :list="other.data" /> <otherList :list="other.data"/>
</div> </div>
</div> </div>
</div> </div>
...@@ -462,7 +462,7 @@ ...@@ -462,7 +462,7 @@
:key="ii" :key="ii"
@click="handelSmallImagesClick(tmpB)" @click="handelSmallImagesClick(tmpB)"
> >
<img :src="tmpB.picIndexPath" /> <img :src="tmpB.picIndexPath"/>
</div> </div>
</div> </div>
</div> </div>
...@@ -487,7 +487,7 @@ ...@@ -487,7 +487,7 @@
> >
<div class="row"> <div class="row">
<div class="col" @click="handelSmallImagesClick(tmpA)"> <div class="col" @click="handelSmallImagesClick(tmpA)">
<img :src="tmpA.picIndexPath" /> <img :src="tmpA.picIndexPath"/>
</div> </div>
</div> </div>
</div> </div>
...@@ -504,7 +504,7 @@ ...@@ -504,7 +504,7 @@
</div> </div>
</div> </div>
</div> </div>
<notice /> <notice/>
<modal <modal
:dialogData="dzfwMoreDialog" :dialogData="dzfwMoreDialog"
@toFatherClose="dzfwMoreHandel(false)" @toFatherClose="dzfwMoreHandel(false)"
...@@ -522,7 +522,7 @@ ...@@ -522,7 +522,7 @@
@change="dzfwHandelChange(i)" @change="dzfwHandelChange(i)"
></el-checkbox> ></el-checkbox>
<div class="dzfwDialog-ico"> <div class="dzfwDialog-ico">
<img :src="tmp.ico" alt="" /> <img :src="tmp.ico" alt=""/>
</div> </div>
<div class="dzfwDialog-title">{{ tmp.name }}</div> <div class="dzfwDialog-title">{{ tmp.name }}</div>
</div> </div>
...@@ -625,11 +625,11 @@ export default { ...@@ -625,11 +625,11 @@ export default {
}, },
], ],
chaxun: { chaxun: {
type: "", type: "1",
options: [ options: [
{ {
label: "根据厂商名称查询", label: "根据厂商名称查询",
value: "根据厂商名称查询", value: "1",
}, },
], ],
keywords: "", keywords: "",
...@@ -968,6 +968,17 @@ export default { ...@@ -968,6 +968,17 @@ export default {
this.getCustomServiceFromServer(); this.getCustomServiceFromServer();
}, },
methods: { methods: {
toSearch(type, keyword, infoType) {
console.log(type)
this.$router.push({
path: '/search/internal',
query: {
keyword,
type,
infoType
}
})
},
getCustomService() { getCustomService() {
let service = localStorage.getItem("gs-custom-service") || ""; let service = localStorage.getItem("gs-custom-service") || "";
console.log("getCustomService-----------", service); console.log("getCustomService-----------", service);
...@@ -979,7 +990,7 @@ export default { ...@@ -979,7 +990,7 @@ export default {
async getCustomServiceFromServer() { async getCustomServiceFromServer() {
const searchGlnRes = await this.$api.home.customService(); const searchGlnRes = await this.$api.home.customService();
const { returnCode, data } = searchGlnRes; const {returnCode, data} = searchGlnRes;
if (returnCode === "0") { if (returnCode === "0") {
localStorage.setItem("gs-custom-service", JSON.stringify(data)); localStorage.setItem("gs-custom-service", JSON.stringify(data));
this.showCustomService(data); this.showCustomService(data);
...@@ -1032,7 +1043,7 @@ export default { ...@@ -1032,7 +1043,7 @@ export default {
async homeBigImages() { async homeBigImages() {
// console.log(this.$api, 'this.$api'); // console.log(this.$api, 'this.$api');
const homeBigImagesRes = await this.$api.home.homeBigImages(); const homeBigImagesRes = await this.$api.home.homeBigImages();
const { returnCode, data } = homeBigImagesRes; const {returnCode, data} = homeBigImagesRes;
if (returnCode === "0") { if (returnCode === "0") {
this.banner = data; this.banner = data;
console.log(this.banner, "this.banner"); console.log(this.banner, "this.banner");
...@@ -1047,7 +1058,7 @@ export default { ...@@ -1047,7 +1058,7 @@ export default {
async homePictureImageList() { async homePictureImageList() {
const homePictureImageListRes = const homePictureImageListRes =
await this.$api.home.homePictureImageList(); await this.$api.home.homePictureImageList();
const { returnCode, data } = homePictureImageListRes; const {returnCode, data} = homePictureImageListRes;
if (returnCode === "0") { if (returnCode === "0") {
data.forEach((el) => { data.forEach((el) => {
el.picFile = `http://www.gs1cn.org/news/newsimg/${el.picFile}`; el.picFile = `http://www.gs1cn.org/news/newsimg/${el.picFile}`;
...@@ -1060,7 +1071,7 @@ export default { ...@@ -1060,7 +1071,7 @@ export default {
async homeImportantNewList() { async homeImportantNewList() {
const homeImportantNewListRes = const homeImportantNewListRes =
await this.$api.home.homeImportantNewList(); await this.$api.home.homeImportantNewList();
const { returnCode, data } = homeImportantNewListRes; const {returnCode, data} = homeImportantNewListRes;
if (returnCode === "0") { if (returnCode === "0") {
data.forEach((el) => { data.forEach((el) => {
el.time = this.$moment(el.showtime).format("MM-DD"); el.time = this.$moment(el.showtime).format("MM-DD");
...@@ -1095,7 +1106,7 @@ export default { ...@@ -1095,7 +1106,7 @@ export default {
const homeGet4PartyTopNewsRes = await this.$api.home.homeGet4PartyTopNews( const homeGet4PartyTopNewsRes = await this.$api.home.homeGet4PartyTopNews(
params params
); );
const { returnCode, data } = homeGet4PartyTopNewsRes; const {returnCode, data} = homeGet4PartyTopNewsRes;
if (returnCode === "0") { if (returnCode === "0") {
console.log(homeGet4PartyTopNewsRes, "党建文化新闻列表"); console.log(homeGet4PartyTopNewsRes, "党建文化新闻列表");
this.djwh.data = data; this.djwh.data = data;
...@@ -1104,7 +1115,7 @@ export default { ...@@ -1104,7 +1115,7 @@ export default {
// 首页小轮播图 // 首页小轮播图
async homeSmallImages() { async homeSmallImages() {
const homeSmallImagesRes = await this.$api.home.homeSmallImages(); const homeSmallImagesRes = await this.$api.home.homeSmallImages();
const { returnCode, data } = homeSmallImagesRes; const {returnCode, data} = homeSmallImagesRes;
if (returnCode === "0") { if (returnCode === "0") {
let list = []; let list = [];
data.forEach((el, i) => { data.forEach((el, i) => {
...@@ -1398,8 +1409,7 @@ export default { ...@@ -1398,8 +1409,7 @@ export default {
&::before { &::before {
width: 24px; width: 24px;
height: 50px; height: 50px;
background: url("../../assets/image/home/prevArrow-hover2.png") background: url("../../assets/image/home/prevArrow-hover2.png") no-repeat;
no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
} }
} }
...@@ -1409,8 +1419,7 @@ export default { ...@@ -1409,8 +1419,7 @@ export default {
&::before { &::before {
width: 24px; width: 24px;
height: 50px; height: 50px;
background: url("../../assets/image/home/nextArrow-hover2.png") background: url("../../assets/image/home/nextArrow-hover2.png") no-repeat;
no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
} }
} }
...@@ -1936,11 +1945,13 @@ export default { ...@@ -1936,11 +1945,13 @@ export default {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.kjywblzq-col{
.kjywblzq-col {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.ywdt-bt { .ywdt-bt {
color: #0e2c6b; color: #0e2c6b;
font-size: 14px; font-size: 14px;
...@@ -2019,8 +2030,7 @@ export default { ...@@ -2019,8 +2030,7 @@ export default {
// padding: 0 10px; // padding: 0 10px;
cursor: pointer; cursor: pointer;
@media screen and (min-width: 992px) { @media screen and (min-width: 992px) {
background: url("../../assets/image/home/line.png") no-repeat right background: url("../../assets/image/home/line.png") no-repeat right center;
center;
&:nth-child(-n + 3) { &:nth-child(-n + 3) {
.dzfw-border { .dzfw-border {
border: 0; border: 0;
......
...@@ -212,6 +212,18 @@ export default { ...@@ -212,6 +212,18 @@ export default {
components: { components: {
Vcode, Vcode,
}, },
created() {
if(this.$route.query.infoType){
if(this.$route.query.infoType === 'product'){
this.activeName = 'second'
this.productSearch.code = this.$route.query.keyword
}else if(this.$route.query.infoType === 'company'){
this.activeName = 'first'
this.company = NAME
this.companySearch.name = this.$route.query.keyword
}
}
},
methods: { methods: {
// 点击此处进行验证 // 点击此处进行验证
handleVerification() { handleVerification() {
......
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