Commit b8e4ac48 authored by linjw's avatar linjw

修改搜索

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