Commit 4e3b535b authored by 黄奎's avatar 黄奎

11

parent 1a753464
...@@ -288,7 +288,9 @@ ...@@ -288,7 +288,9 @@
<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="`s_`+i" v-for="(x, i) in categoryList"> <div class="category-item font-16" :key="`s_`+i" v-for="(x, i) in categoryList"
v-if="x.SubList.length>0"
>
<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/${
...@@ -303,7 +305,9 @@ ...@@ -303,7 +305,9 @@
<div class="flex"> <div class="flex">
<div class="category-item" :key="`s2_`+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']"
v-if="x.SubList.length>0"
>
<div :key="`s2_`+i+`d_`+index" v-for="(item,index) in x.SubList"> <div :key="`s2_`+i+`d_`+index" v-for="(item,index) in x.SubList">
<div <div
@click.stop="x.CategoryName=='行程线路'||x.Id==44?OpenNewUrl(item.LinkUrl):handleCategoryChage(item)" @click.stop="x.CategoryName=='行程线路'||x.Id==44?OpenNewUrl(item.LinkUrl):handleCategoryChage(item)"
...@@ -318,7 +322,7 @@ ...@@ -318,7 +322,7 @@
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">
<div>{{ item2.CategoryName }}</div> <div>{{ item2.CategoryName }} </div>
</div> </div>
</div> </div>
</div> </div>
...@@ -327,11 +331,12 @@ ...@@ -327,11 +331,12 @@
</div> </div>
</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="`s3_`+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!='行程线路'&&x.Id!=44 ?productSearch(x):''" @click="x.CategoryName!='行程线路'&&x.Id!=44 ?productSearch(x):''"
:class="[x.SubList&&x.SubList.length>0&&x.CategoryName!='行程线路'&& x.Id!=44?'cursor-pointer':'']"> :class="[x.CategoryName!='行程线路'&& x.Id!=44?'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">
...@@ -442,12 +447,10 @@ ...@@ -442,12 +447,10 @@
Id: 0, Id: 0,
} }
n.CategoryList.forEach(x => { // n.CategoryList.forEach(x => {
if (x.SubList && x.SubList.length > 0) { // this.categoryList.push(x)
this.categoryList.push(x) // })
} this.categoryList = n.CategoryList;
})
// this.categoryList = n.CategoryList;
this.HomeData[0].plugData.MenuList.forEach((x, index) => { this.HomeData[0].plugData.MenuList.forEach((x, index) => {
obj.CategoryName = '行程线路' //x.MenuName obj.CategoryName = '行程线路' //x.MenuName
......
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