Commit 1ab910ff authored by 黄奎's avatar 黄奎

页面修改

parent 20897b46
......@@ -288,7 +288,7 @@
<q-menu ref="menu0" @mouseenter="menuFocusAll = 2" @mouseleave="menuLeaveAll">
<div class="all-menu">
<div class="flex">
<div class="category-item font-16" :key="i" v-for="(x, i) in categoryList">
<div class="category-item font-16" :key="`s_`+i" v-for="(x, i) in categoryList">
<template v-if="i <= 3">
<img class="category-icon" :src="
require(`../../assets/img/home/${
......@@ -301,18 +301,20 @@
</div>
<q-separator />
<div class="flex">
<div class="category-item" :key="i" v-for="(x, i) in categoryList"
<div class="category-item" :key="`s2_`+i" v-for="(x, i) in categoryList"
@click="x.SubList&&x.SubList.length>0&&x.CategoryName!='行程线路'?'':productSearch(x)"
:class="[x.SubList&&x.SubList.length>0&&x.CategoryName!='行程线路'?'':'cursor-pointer']">
<div :key="i" v-for="item in x.SubList">
<div @click.stop="x.CategoryName=='行程线路'?OpenNewUrl(item.LinkUrl):handleCategoryChage(item)"
<div :key="`s2_`+i+`d_`+index" v-for="(item,index) in x.SubList">
<div
@click.stop="x.CategoryName=='行程线路'||x.Id==40?OpenNewUrl(item.LinkUrl):handleCategoryChage(item)"
class="category-l2" :class="{
'category-l2-select': selectCategory === item.Id,
}">
{{ item.CategoryName }}
</div>
<div v-if="item.SubList&&item.SubList.length">
<div @click.stop="x.CategoryName=='行程线路'?OpenNewUrl(item2.LinkUrl):handleCategoryChage(item2)"
<div
@click.stop="x.CategoryName=='行程线路'||x.Id==40?OpenNewUrl(item2.LinkUrl):handleCategoryChage(item2)"
class="category-l3" :class="{
'category-l3-select': selectCategory === item2.Id,
}" :key="index" v-for="(item2,index) in item.SubList">
......@@ -326,22 +328,24 @@
</q-menu>
</div>
<template v-for="(x, i) in categoryList">
<div class="category-btn" :key="i" :label="x.CategoryName" flat unelevated
<div class="category-btn" :key="`s3_`+i" :label="x.CategoryName" flat unelevated
:content-style="{ hover: '#ff0000' }" @mouseenter="typeHover(i, true)" @mouseleave="typeHover(i, false)"
@click="x.SubList&&x.SubList.length>0&&x.CategoryName!='行程线路'?'':productSearch(x)"
:class="[x.SubList&&x.SubList.length>0&&x.CategoryName!='行程线路'?'':'cursor-pointer']">
@click="x.SubList&&x.SubList.length>0&&x.CategoryName!='行程线路'&&x.Id!=40 ?productSearch(x):''"
:class="[x.SubList&&x.SubList.length>0&&x.CategoryName!='行程线路'&& x.Id!=40?'cursor-pointer':'']">
{{ x.CategoryName }}
<q-menu ref="menu" :key="i" @mouseenter="menuFocus = 2" @mouseleave="menuLeave(i)">
<div class="category-box" v-if="x.SubList&&x.SubList.length>0">
<div :key="index" v-for="(item,index) in x.SubList">
<div @click.stop="x.CategoryName=='行程线路'?OpenNewUrl(item.LinkUrl):handleCategoryChage(item)"
<div :key="`s3_`+i+`d_`+index" v-for="(item,index) in x.SubList">
<div
@click.stop="x.CategoryName=='行程线路'||x.Id==40 ?OpenNewUrl(item.LinkUrl):handleCategoryChage(item)"
class="category-l2" :class="{
'category-l2-select': selectCategory === item.Id,
}">
{{ item.CategoryName }}
</div>
<div v-if="item.SubList&&item.SubList.length">
<div @click.stop="x.CategoryName=='行程线路'?OpenNewUrl(item2.LinkUrl):handleCategoryChage(item2)"
<div
@click.stop="x.CategoryName=='行程线路'||x.Id==40?OpenNewUrl(item2.LinkUrl):handleCategoryChage(item2)"
class="category-l3" :class="{
'category-l3-select': selectCategory === item2.Id,
}" :key="index" v-for="(item2,index) in item.SubList">
......@@ -406,7 +410,8 @@
},
$route: {
handler: function (val, oldVal) {
this.isHome = val.path === "/searchProduct" || val.path === "/search" || val.path === "/searchVisa" || val.path === "/planeticket";
this.isHome = val.path === "/searchProduct" || val.path === "/search" || val.path === "/searchVisa" || val
.path === "/planeticket";
},
// 深度观察监听
deep: true,
......@@ -437,8 +442,8 @@
Id: 0,
}
n.CategoryList.forEach(x=>{
if(x.SubList&&x.SubList.length>0){
n.CategoryList.forEach(x => {
if (x.SubList && x.SubList.length > 0) {
this.categoryList.push(x)
}
})
......@@ -468,7 +473,7 @@
},
mounted() {
this.isSearch = this.$router.history.current.path === "/search" ||
this.$router.history.current.path ==="/searchProduct" ||
this.$router.history.current.path === "/searchProduct" ||
this.$router.history.current.path === "/searchVisa" ||
this.$router.history.current.path === "/planeticket";
this.isHome =
......@@ -507,22 +512,22 @@
handleSelectArea(item) {
this.CommonJump("/city/" + item.Id);
},
handleCategoryChage(item,type) {
if(!type){
handleCategoryChage(item, type) {
if (!type) {
this.CommonJump("/search", {
qsearchKey: this.searchKey,
qsearchDate: this.searchDate,
qsearchEndDate: this.searchEndDate,
categoryId: item.Id,
});
}else{
if(type==1){//自由
} else {
if (type == 1) { //自由
}else if(type==2){//机票
} else if (type == 2) { //机票
this.CommonJump("/planeticket", {
Name: this.searchKey,
});
}else if(type==3){//签证
} else if (type == 3) { //签证
this.CommonJump("/searchVisa", {
Name: this.searchKey,
});
......@@ -534,10 +539,10 @@
}
}, 300)
},
productSearch(item){
if(item.CategoryName=='机票') this.handleCategoryChage(item,0)//this.handleCategoryChage(item,2)
else if(item.CategoryName=='签证') this.handleCategoryChage(item,3)
else this.handleCategoryChage(item,0)
productSearch(item) {
if (item.CategoryName == '机票') this.handleCategoryChage(item, 0) //this.handleCategoryChage(item,2)
else if (item.CategoryName == '签证') this.handleCategoryChage(item, 3)
else this.handleCategoryChage(item, 0)
},
mouseenterAddress() {
this.menuFocusAll = 0;
......
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