Commit b8e4ac48 authored by linjw's avatar linjw

修改搜索

parent 53c744e5
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
> >
<div>您好!欢迎进入欣新房车集团官方网站</div> <div>您好!欢迎进入欣新房车集团官方网站</div>
<div class="ft-14" style="position: relative"> <div class="ft-14" style="position: relative">
<span style="margin-right:30px">服务热线: 4000-369-369</span> <span style="margin-right:30px" class="help"><nuxt-link to="/company">服务热线: 4000-369-369</nuxt-link></span>
<nuxt-link to="/indexWeb"> <nuxt-link to="/indexWeb">
<span style="color:#666" @mouseenter="enter()" @mouseleave="leave()">网站地图</span> <span style="color:#666" @mouseenter="enter()" @mouseleave="leave()">网站地图</span>
</nuxt-link> </nuxt-link>
...@@ -20,13 +20,14 @@ ...@@ -20,13 +20,14 @@
<div > <div >
<div style="margin-top:23px">产品展示</div> <div style="margin-top:23px">产品展示</div>
<ul class="v-ul clearfix"> <ul class="v-ul clearfix">
<li style="margin-right:12px"> <li style="margin-right:12px" @click="chooseVe()">
<nuxt-link to="/vehicle" >房车租赁</nuxt-link> 房车租赁
</li> </li>
<li <li
v-for="item in vehicleType" v-for="item in vehicleType"
:key="item.id" :key="item.id"
style="" style=""
@click="chooseVe(item.id)"
>{{item.name}}</li> >{{item.name}}</li>
</ul> </ul>
<ul class="v-ul clearfix" style="margin-top:9px"> <ul class="v-ul clearfix" style="margin-top:9px">
...@@ -170,6 +171,8 @@ export default { ...@@ -170,6 +171,8 @@ export default {
}, },
created() { created() {
// console.log(this); // console.log(this);
this.getType();
if(this.$route.path == '/findList/all'||this.$route.path == '/findList/findVehicle'||this.$route.path == '/findList/findTour'||this.$route.path == '/findList/findCampsite'||this.$route.path == '/findList/findActivity'||this.$route.path == '/findList/findNew'||this.$route.path == '/findList/findCompany'){ if(this.$route.path == '/findList/all'||this.$route.path == '/findList/findVehicle'||this.$route.path == '/findList/findTour'||this.$route.path == '/findList/findCampsite'||this.$route.path == '/findList/findActivity'||this.$route.path == '/findList/findNew'||this.$route.path == '/findList/findCompany'){
this.select = this.$route.path; this.select = this.$route.path;
}else{ }else{
...@@ -179,7 +182,6 @@ export default { ...@@ -179,7 +182,6 @@ export default {
this.listQuery.keyword = this.$route.query.keywords; this.listQuery.keyword = this.$route.query.keywords;
let router = this.$route.path; let router = this.$route.path;
this.router = router; this.router = router;
this.getType();
}, },
methods: { methods: {
chooseSelect(e){ chooseSelect(e){
...@@ -202,6 +204,16 @@ export default { ...@@ -202,6 +204,16 @@ export default {
this.$emit('goCam',e); this.$emit('goCam',e);
this.visibleMap = false; this.visibleMap = false;
}, },
chooseVe(e){
if(e == undefined){
e = "",
console.log(3);
}
this.$router.push({ path: '/vehicle', query: { types: e } });
console.log(e);
this.$emit('goVe',e);
this.visibleMap = false;
},
async getType() { async getType() {
const tour = await axios.get("/api/uccn/app/unauth/tour/tagList"); const tour = await axios.get("/api/uccn/app/unauth/tour/tagList");
this.tourType = tour.data.data; this.tourType = tour.data.data;
...@@ -392,5 +404,7 @@ a{ ...@@ -392,5 +404,7 @@ a{
top: 10px; top: 10px;
right: 0 right: 0
} }
.help:hover a{
color:#1BBB9F;
}
</style> </style>
...@@ -125,8 +125,14 @@ export default { ...@@ -125,8 +125,14 @@ export default {
}, },
goCam(e){ goCam(e){
this.listQuery.type = e; this.listQuery.type = e;
for(var i = 0;i<this.dataType.length;i++){
if(e == this.dataType[i].id){
this.typeList = this.dataType[i].name
}
}
this.getAll(); this.getAll();
this.typeList="营地类型"; // this.typeList="营地类型";
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.listQuery.pageNo = val; this.listQuery.pageNo = val;
...@@ -144,6 +150,11 @@ export default { ...@@ -144,6 +150,11 @@ export default {
// console.log(data); // console.log(data);
data.unshift({id:"",name:'全部'}) data.unshift({id:"",name:'全部'})
this.dataType = data; this.dataType = data;
for(var i = 0;i<this.dataType.length;i++){
if(this.$route.query.types == this.dataType[i].id){
this.typeList = this.dataType[i].name
}
}
}, },
async getAll() { async getAll() {
let { let {
......
...@@ -11,8 +11,10 @@ ...@@ -11,8 +11,10 @@
<div <div
style="font-size:20px;font-weight:Bold;text-align:center;margin-bottom:30px" style="font-size:20px;font-weight:Bold;text-align:center;margin-bottom:30px"
>欣新房车全国分布图</div> >欣新房车全国分布图</div>
<viewer> <viewer>
<img src="../assets/images/company.png" alt style="width:526px;height:430px" /> <img id="image" src="https://mgmt.dfangche.com/xxfccn/image/contact/map.jpg" alt style="width:526px;height:430px" />
</viewer> </viewer>
</div> </div>
<div style="float:left;width:500px"> <div style="float:left;width:500px">
...@@ -20,7 +22,7 @@ ...@@ -20,7 +22,7 @@
style="font-size:20px;font-weight:Bold;text-align:center;margin-bottom:30px" style="font-size:20px;font-weight:Bold;text-align:center;margin-bottom:30px"
>欣新房车集团总部</div> >欣新房车集团总部</div>
<img <img
src="https://mgmt.dfangche.com/xxfccn/image/2019-09-02/17.jpg" src="https://mgmt.dfangche.com/xxfccn/image/contact/xxfc.jpg"
alt alt
style="width:500px;height:320px" style="width:500px;height:320px"
/> />
...@@ -109,12 +111,18 @@ ...@@ -109,12 +111,18 @@
</template> </template>
<script> <script>
// new Viewer(image, {
// url(image) {
// return image.src.replace('thumb_', '');
// },
// });
import axios from "../plugins/axios"; import axios from "../plugins/axios";
import menuModal from "../components/menu"; import menuModal from "../components/menu";
import footerModal from "../components/footer"; import footerModal from "../components/footer";
import vehicleBanner from "../components/vehicleBanner"; import vehicleBanner from "../components/vehicleBanner";
import GoTop from "../components/goTop"; import GoTop from "../components/goTop";
import provinceCity from "../assets/code.json"; import provinceCity from "../assets/code.json";
// import Viewer from 'viewerjs';
export default { export default {
transition: "bounce", transition: "bounce",
components: { components: {
......
...@@ -174,7 +174,8 @@ ...@@ -174,7 +174,8 @@
</div> </div>
<ul class="v-ul clearfix list list-four"> <ul class="v-ul clearfix list list-four">
<li v-for="item in companyDetail.data" :key="item.id"> <li v-for="item in companyDetail.data" :key="item.id">
<nuxt-link to="/" class="flex-aic-noc"> <div class="flex-aic-noc">
<!-- <nuxt-link to="/" class="flex-aic-noc"> -->
<img class="v-img-cover" :src="item.cover" alt="房车租赁" /> <img class="v-img-cover" :src="item.cover" alt="房车租赁" />
<div style="margin-left: 11px;position: relative"> <div style="margin-left: 11px;position: relative">
<h2 style="font-size: 18px;margin-top:10px">{{item.name}}</h2> <h2 style="font-size: 18px;margin-top:10px">{{item.name}}</h2>
...@@ -187,7 +188,8 @@ ...@@ -187,7 +188,8 @@
{{item.provinceName}} {{item.cityName}} {{item.townName}} {{item.address}} {{item.provinceName}} {{item.cityName}} {{item.townName}} {{item.address}}
</h2> </h2>
</div> </div>
</nuxt-link> <!-- </nuxt-link> -->
</div>
</li> </li>
</ul> </ul>
</div> </div>
......
...@@ -13,13 +13,14 @@ ...@@ -13,13 +13,14 @@
<div > <div >
<div style="margin-top:23px">产品展示</div> <div style="margin-top:23px">产品展示</div>
<ul class="v-ul clearfix"> <ul class="v-ul clearfix">
<li style="margin-right:12px"> <li style="margin-right:12px" @click="chooseVe()">
<nuxt-link to="/vehicle" >房车租赁</nuxt-link> 房车租赁
</li> </li>
<li <li
v-for="item in vehicleType" v-for="item in vehicleType"
:key="item.id" :key="item.id"
style="" style=""
@click="chooseVe(item.id)"
>{{item.name}}</li> >{{item.name}}</li>
</ul> </ul>
<ul class="v-ul clearfix" style="margin-top:9px"> <ul class="v-ul clearfix" style="margin-top:9px">
...@@ -107,6 +108,14 @@ export default { ...@@ -107,6 +108,14 @@ export default {
this.$router.push({ path: '/campsite', query: { types: e } }); this.$router.push({ path: '/campsite', query: { types: e } });
console.log(e); console.log(e);
}, },
chooseVe(e){
if(e == undefined){
e = "",
console.log(3);
}
this.$router.push({ path: '/vehicle', query: { types: e } });
console.log(e);
},
async getType() { async getType() {
const tour = await axios.get("/api/uccn/app/unauth/tour/tagList"); const tour = await axios.get("/api/uccn/app/unauth/tour/tagList");
this.tourType = tour.data.data; this.tourType = tour.data.data;
......
...@@ -88,6 +88,9 @@ ...@@ -88,6 +88,9 @@
this.getType(); this.getType();
this.getAll(); this.getAll();
}, },
data(){ data(){
return{ return{
...@@ -115,7 +118,14 @@ ...@@ -115,7 +118,14 @@
methods:{ methods:{
goTour(e){ goTour(e){
this.listQuery.tagId = e; this.listQuery.tagId = e;
this.typeList="旅行类型" for(var i = 0;i<this.dataType.length;i++){
if(e == this.dataType[i].id){
this.typeList = this.dataType[i].name
}
}
// console.log(this.dataType);
// this.typeList="旅行类型"
this.getAll(); this.getAll();
}, },
chooseSelect() { chooseSelect() {
...@@ -146,6 +156,11 @@ ...@@ -146,6 +156,11 @@
this.dataType = data; this.dataType = data;
console.log(data); console.log(data);
this.loading = false this.loading = false
for(var i = 0;i<this.dataType.length;i++){
if(this.$route.query.tagIds == this.dataType[i].id){
this.typeList = this.dataType[i].name
}
}
}, },
async getAll() { async getAll() {
let { let {
......
...@@ -97,14 +97,14 @@ ...@@ -97,14 +97,14 @@
</div> </div>
<div class="clearfix" style="margin-top:40px"> <div class="clearfix" style="margin-top:40px">
<div style="float:left;width:190px;background-color:#fff;padding:40px 28px;margin-right:14px;"> <!-- <div style="float:left;width:190px;background-color:#fff;padding:40px 28px;margin-right:14px;">
<ul class="typeUl"> <ul class="typeUl">
<li>行程亮点</li> <li>行程亮点</li>
<li>行程介绍</li> <li>行程介绍</li>
<li>报名须知</li> <li>报名须知</li>
</ul> </ul>
</div> </div> -->
<div style="float:left;width:680px;background-color:#fff;padding:31px 50px;"> <div style="float:left;width:884px;background-color:#fff;padding:31px 50px;">
<h3 style="font-size:16px;font-weight:bold;margin-bottom:20px">行程亮点</h3> <h3 style="font-size:16px;font-weight:bold;margin-bottom:20px">行程亮点</h3>
<div v-html="detail.content"> <div v-html="detail.content">
</div> </div>
......
<template> <template>
<div> <div>
<menu-modal></menu-modal> <menu-modal @goVe="goVe"></menu-modal>
<div class="main-container"> <div class="main-container">
<vehicle-banner <vehicle-banner
:list = "bannerList" :list = "bannerList"
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
return { return {
// headList:{}, // headList:{},
typeList:"车型", typeList:"车型",
dataType:"", dataType:[],
totalCount: 0, totalCount: 0,
dataDetail: [], dataDetail: [],
bannerList: [],//车型banner列表 bannerList: [],//车型banner列表
...@@ -130,6 +130,17 @@ ...@@ -130,6 +130,17 @@
window.addEventListener("scroll", this.scrollHandle); // 绑定页面的滚动事件 window.addEventListener("scroll", this.scrollHandle); // 绑定页面的滚动事件
}, },
methods: { methods: {
goVe(e){
this.listQuery.type = e;
for(var i = 0;i<this.dataType.length;i++){
if(e == this.dataType[i].id){
this.typeList = this.dataType[i].name
}
}
this.getAll();
// this.typeList="车型";
},
handleCurrentChange(val) { handleCurrentChange(val) {
this.listQuery.page = val; this.listQuery.page = val;
this.getAll(); this.getAll();
...@@ -173,11 +184,16 @@ ...@@ -173,11 +184,16 @@
this.dataType = data; this.dataType = data;
console.log(data); console.log(data);
this.loading = false this.loading = false
for(var i = 0;i<this.dataType.length;i++){
if(this.$route.query.types == this.dataType[i].id){
this.typeList = this.dataType[i].name
}
}
}, },
async getAll() { async getAll() {
let { let {
data: { data } data: { data }
} = await axios.get(`/api/uccn/vehicleModel/app/unauth/findVehicleModelPage?page=${this.listQuery.page}&limit=${this.listQuery.limit}`); } = await axios.get(`/api/uccn/vehicleModel/app/unauth/findVehicleModelPage?page=${this.listQuery.page}&limit=${this.listQuery.limit}&vehicleType=${this.listQuery.type}`);
this.totalCount = data.totalCount; this.totalCount = data.totalCount;
data.data.map(function(item){ data.data.map(function(item){
item.link = encodeURI('/vehicleList/' + item.id+'?name='+item.name); item.link = encodeURI('/vehicleList/' + item.id+'?name='+item.name);
......
...@@ -2,7 +2,7 @@ import Vue from 'vue' ...@@ -2,7 +2,7 @@ import Vue from 'vue'
import Viewer from 'v-viewer' import Viewer from 'v-viewer'
import 'viewerjs/dist/viewer.css' import 'viewerjs/dist/viewer.css'
Vue.use(Viewer); Vue.use(Viewer);
Viewer.setDefaults({ Viewer.setDefaults({
Options: { Options: {
......
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