Commit e2d19d40 authored by 黄媛媛's avatar 黄媛媛

添加头部搜索

parent 8cf3f235
...@@ -110,6 +110,22 @@ ...@@ -110,6 +110,22 @@
.commonF .cff{ .commonF .cff{
color: #ffffff color: #ffffff
} }
.commonF .SearchSpan{
display: inline-block;
width: 70px;
height: 32px;
line-height: 32px;
text-align: center;
color:#fff;
background: #EE4454;
position: relative;
cursor: pointer;
margin:0!important;
padding:0!important;
}
.commonF .SearchKey .el-input__inner{
border-radius: 0;
}
.del-text{ .del-text{
text-decoration: line-through text-decoration: line-through
} }
...@@ -166,4 +182,4 @@ ...@@ -166,4 +182,4 @@
} }
.brd0{ .brd0{
border-radius: 0; border-radius: 0;
} }
\ No newline at end of file
<template> <template>
<div class="visaList IndependentList"> <div class="visaList IndependentList commonF">
<!-- <div style="padding:10px 0"> <!-- <div style="padding:10px 0">
<el-row :gutter="24" style="box-shadow:0px 4px 8px 0px rgba(107,107,107,0.18);"> <el-row :gutter="24" style="box-shadow:0px 4px 8px 0px rgba(107,107,107,0.18);">
<div class="common_width"> <div class="common_width">
...@@ -87,6 +87,14 @@ ...@@ -87,6 +87,14 @@
</ul> </ul>
<!-- <span class="czd" @click="ChangeSelect(1)">{{seriescontext}}<i :class="seriesn?'rolate':''" class="iconfont icon-moban"></i></span> --> <!-- <span class="czd" @click="ChangeSelect(1)">{{seriescontext}}<i :class="seriesn?'rolate':''" class="iconfont icon-moban"></i></span> -->
</div> </div>
<div>
<div class="select_title" style="top:20px">搜索词</div>
<ul class="select_ul">
<el-input size="small" style="width:200px;border-right:none;border-radius:0" v-model="listmsg.searchKey"></el-input>
<span @click="GetList" class="SearchSpan" style="top: 1px;"><i class="iconfont icon-search"></i></span>
</ul>
<!-- <span class="czd" @click="ChangeSelect(1)">{{seriescontext}}<i :class="seriesn?'rolate':''" class="iconfont icon-moban"></i></span> -->
</div>
</div> </div>
<!-- 列表 --> <!-- 列表 -->
...@@ -472,6 +480,7 @@ export default { ...@@ -472,6 +480,7 @@ export default {
<style> <style>
@import "../../assets/css/reset.css"; @import "../../assets/css/reset.css";
@import "../../assets/css/common.css";
.IndependentList .icon-bb-chufadi{ .IndependentList .icon-bb-chufadi{
font-size: 12px; font-size: 12px;
color: #666; color: #666;
......
...@@ -892,6 +892,10 @@ export default { ...@@ -892,6 +892,10 @@ export default {
mounted() { mounted() {
}, },
created() { created() {
if(this.$route.query.searchKey){
this.keyWords=this.$route.query.searchKey;
this.SearchHotel();
}
if(sessionStorage.getItem("HotelInfo")){ if(sessionStorage.getItem("HotelInfo")){
let msgList = JSON.parse(sessionStorage.getItem("HotelInfo")); let msgList = JSON.parse(sessionStorage.getItem("HotelInfo"));
this.placeKeyWords = msgList.place; this.placeKeyWords = msgList.place;
...@@ -908,6 +912,7 @@ export default { ...@@ -908,6 +912,7 @@ export default {
this.isShowTime=false; this.isShowTime=false;
} }
} }
}, },
components: { components: {
HTMap HTMap
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<template> <template>
<div class="LocalCuisine commonF"> <div class="LocalCuisine commonF">
<div class="w1200 basefix" style="margin-bottom:20px;"> <div class="w1200 basefix" style="margin-bottom:20px;">
<p style="margin-top:14px" class="f12 pfR">当地游 > 当地美食</p> <p style="padding-top:14px" class="f12 pfR">当地游 > 当地美食</p>
<ul class="chooseDiv"> <ul class="chooseDiv">
<li style="padding-bottom:8px"> <li style="padding-bottom:8px">
<div class="title pfR f14" style="position: absolute;top:18px;">目的地</div> <div class="title pfR f14" style="position: absolute;top:18px;">目的地</div>
...@@ -51,6 +51,13 @@ ...@@ -51,6 +51,13 @@
</span> </span>
</div> </div>
</li> </li>
<li style="padding-bottom:8px">
<div class="title pfR f14" style="position: absolute;top:18px;">搜索词</div>
<div class="change spanMargin" style="padding-left:80px">
<el-input size="small" style="width:200px;border-right:none;border-radius:0" v-model="msg.searchKey"></el-input>
<span @click="GetList" class="SearchSpan" style="top: 1px;"><i class="iconfont icon-search"></i></span>
</div>
</li>
<div class="pxDiv"> <div class="pxDiv">
<span>印象推荐</span> <span>印象推荐</span>
<span class="px">价格排序 <span class="px">价格排序
...@@ -191,6 +198,9 @@ export default { ...@@ -191,6 +198,9 @@ export default {
if(localStorage.LikeList){ if(localStorage.LikeList){
this.LikeList=JSON.parse(localStorage.LikeList); this.LikeList=JSON.parse(localStorage.LikeList);
} }
if(this.$route.query.searchKey){
this.msg.searchKey=this.$route.query.searchKey;
}
}, },
mounted(){ mounted(){
......
...@@ -120,52 +120,17 @@ ...@@ -120,52 +120,17 @@
</div> </div>
</li> </li>
<!-- <li class="line" v-if="tab==1"> <li>
<div class="tabLeft"> <div class="tabLeft" style="line-height: 43px;">
系列 搜索词
</div>
<div class="tabRight spanMargin">
<span class="spanActive">亲子游</span>
<span>韩国</span>
<span>巴厘岛</span>
<span>韩国</span>
<span>巴厘岛</span>
<span>韩国</span>
<span>巴厘岛</span>
<span>韩国</span>
<span>巴厘岛</span>
<span>韩国</span>
<span>巴厘岛</span>
<span>韩国</span>
<span>巴厘岛</span><span>韩国</span>
<span>巴厘岛</span>
<span>韩国</span>
<span>巴厘岛</span>
<span>韩国</span>
<span>巴厘岛</span>
<span>韩国</span>
<span>巴厘岛</span>
<span>韩国</span>
<span>巴厘岛</span>
<span>韩国</span>
<span>巴厘岛</span>
<div class="liStatus">
展开<i class="iconfont icon-xiabiao"></i>
</div>
</div>
</li> -->
<!-- <li v-if="tab==2">
<div class="tabLeft">
景点主题
</div> </div>
<div class="tabRight spanMargin"> <div class="tabRight SearchKey">
<span class="spanActive">日本</span> <el-input size="small" style="width:200px;border-right:none;border-radius:0;margin-left:20px;" v-model="msg.searchKey"></el-input>
<span>韩国</span> <span @click="SearchKey" class="SearchSpan" style="top: 1px;"><i class="iconfont icon-search"></i></span>
<span>巴厘岛</span>
</div> </div>
</li> --> </li>
</ul> </ul>
</div> </div>
...@@ -282,15 +247,16 @@ export default { ...@@ -282,15 +247,16 @@ export default {
this.msg.priceOrderByField=4; this.msg.priceOrderByField=4;
} }
this.GetLine(); this.GetLine();
if(this.$route.query.searchKey){
this.msg.searchKey=this.$route.query.searchKey;
this.tempsearchKey=this.$route.query.searchKey;
}
if(this.$route.query.tab){ if(this.$route.query.tab){
this.tab= this.$route.query.tab; this.tab= this.$route.query.tab;
if(this.tab==1){ if(this.tab==1){
this.GetList(); this.GetList();
}else{ }else{
if(this.$route.query.searchKey){
this.msg.searchKey=this.$route.query.searchKey;
this.tempsearchKey=this.$route.query.searchKey;
}
this.GetTicketList(); this.GetTicketList();
} }
} }
...@@ -305,6 +271,13 @@ export default { ...@@ -305,6 +271,13 @@ export default {
}, },
methods: { methods: {
SearchKey(){
if(this.tab==1){
this.GetList();
}else{
this.GetTicketList();
}
},
GetHotScen(){ GetHotScen(){
let msg={ let msg={
pageIndex:0, pageIndex:0,
......
...@@ -169,8 +169,13 @@ ...@@ -169,8 +169,13 @@
<el-select v-model="select" slot="prepend" size="mini" class="w100" placeholder="请选择"> <el-select v-model="select" slot="prepend" size="mini" class="w100" placeholder="请选择">
<el-option label="旅游" value="1"></el-option> <el-option label="旅游" value="1"></el-option>
<!-- <el-option label="酒店" value="2"></el-option> -->
<el-option label="机票" value="3"></el-option> <el-option label="机票" value="3"></el-option>
<el-option label="定制游" value="4"></el-option>
<el-option label="一日游" value="5-1"></el-option>
<el-option label="当地门票" value="5-2"></el-option>
<el-option label="当地美食" value="5-3"></el-option>
<el-option label="签证" value="6"></el-option>
<el-option label="酒店" value="7"></el-option>
</el-select> </el-select>
<span class="_splice"></span> <span class="_splice"></span>
<el-input <el-input
...@@ -408,18 +413,59 @@ export default { ...@@ -408,18 +413,59 @@ export default {
path: "search", path: "search",
query query
}); });
} else if (this.select === "2") { } else if (this.select === "3") {
// 酒店 // 机票
let query = { keywords: encodeURIComponent(this.searchText) }; let query = { keywords: encodeURIComponent(this.searchText) };
this.$router.push({ this.$router.push({
path: "search", path: "TicketList",
query query
}); });
} else if (this.select === "3") { }
// 机票 else if (this.select === "4") {
let query = { keywords: encodeURIComponent(this.searchText) }; // 定制游
let query = { keywords: this.searchText};
this.$router.push({ this.$router.push({
path: "TicketList", path: "IndependentList",
query
});
}
else if (this.select === "5-1") {
// 一日游
let query = { searchKey: this.searchText,tab:1};
this.$router.push({
path: "LocalTourList",
query
});
}
else if (this.select === "5-2") {
// 当地游门票
let query = { searchKey: this.searchText,tab:2};
this.$router.push({
path: "LocalTourList",
query
});
}
else if (this.select === "5-3") {
// 当地游美食
let query = { searchKey: this.searchText};
this.$router.push({
path: "LocalCuisine",
query
});
}
else if (this.select === "6") {
// 签证
let query = { searchKey: this.searchText};
this.$router.push({
path: "Visalist",
query
});
}
else if (this.select === "7") {
// 酒店
let query = { searchKey: this.searchText};
this.$router.push({
path: "HotelList",
query query
}); });
} }
......
<template> <template>
<div class="visaList"> <div class="visaList commonF">
<div style="padding:10px 0"> <div style="padding:10px 0">
<el-row :gutter="24" style="box-shadow:0px 4px 8px 0px rgba(107,107,107,0.18);"> <el-row :gutter="24" style="box-shadow:0px 4px 8px 0px rgba(107,107,107,0.18);">
<div class="common_width"> <div class="common_width">
...@@ -75,6 +75,14 @@ ...@@ -75,6 +75,14 @@
<el-button @click="GetList" size="small" style="background:rgba(238,68,84,1);color:#fff;border:none">查询</el-button> <el-button @click="GetList" size="small" style="background:rgba(238,68,84,1);color:#fff;border:none">查询</el-button>
</el-col> </el-col>
</el-row> </el-row>
<div>
<div class="select_title" style="top:20px">搜索词</div>
<ul class="select_ul">
<el-input size="small" style="width:200px;border-right:none;border-radius:0" v-model="listmsg.searchKey"></el-input>
<span @click="GetList" class="SearchSpan" style="top: 1px;"><i class="iconfont icon-search"></i></span>
</ul>
</div>
</div> </div>
<!-- 列表 --> <!-- 列表 -->
...@@ -337,6 +345,7 @@ export default { ...@@ -337,6 +345,7 @@ export default {
<style> <style>
@import "../../assets/css/reset.css"; @import "../../assets/css/reset.css";
@import "../../assets/css/common.css";
.visaList .top_ul .el-carousel__arrow--left{ .visaList .top_ul .el-carousel__arrow--left{
left: -30px; left: -30px;
top: 25px; top: 25px;
......
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