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

页面修改

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