Commit 3fefcd92 authored by youjie's avatar youjie

no message

parent 0ef603de
......@@ -298,7 +298,7 @@
<div
class="category-item font-16"
:key="i"
v-for="(x, i) in dataList.CategoryList"
v-for="(x, i) in categoryList"
>
<template v-if="i <= 3">
<img
......@@ -318,11 +318,11 @@
<div
class="category-item"
:key="i"
v-for="(x, i) in dataList.CategoryList"
v-for="(x, i) in categoryList"
>
<div :key="item.Id" v-for="item in x.SubList">
<div :key="i" v-for="item in x.SubList">
<div
@click="handleCategoryChage(item)"
@click="x.CategoryName=='行程线路'?OpenNewUrl(item.LinkUrl):handleCategoryChage(item)"
class="category-l2"
:class="{
'category-l2-select': selectCategory === item.Id,
......@@ -330,9 +330,9 @@
>
{{ item.CategoryName }}
</div>
<div v-if="item.SubList.length">
<div v-if="item.SubList&&item.SubList.length">
<div
@click="handleCategoryChage(item2)"
@click="x.CategoryName=='行程线路'?OpenNewUrl(item.LinkUrl):handleCategoryChage(item2)"
class="category-l3"
:class="{
'category-l3-select': selectCategory === item2.Id,
......@@ -349,7 +349,7 @@
</div>
</q-menu>
</div>
<template v-for="(x, i) in dataList.CategoryList">
<template v-for="(x, i) in categoryList">
<div
class="category-btn"
:key="i"
......@@ -368,9 +368,9 @@
@mouseleave="menuLeave(i)"
>
<div class="category-box">
<div :key="item.Id" v-for="item in x.SubList">
<div :key="index" v-for="(item,index) in x.SubList">
<div
@click="handleCategoryChage(item)"
@click="x.CategoryName=='行程线路'?OpenNewUrl(item.LinkUrl):handleCategoryChage(item)"
class="category-l2"
:class="{
'category-l2-select': selectCategory === item.Id,
......@@ -378,9 +378,9 @@
>
{{ item.CategoryName }}
</div>
<div v-if="item.SubList.length">
<div v-if="item.SubList&&item.SubList.length">
<div
@click="handleCategoryChage(item2)"
@click="x.CategoryName=='行程线路'?OpenNewUrl(item.LinkUrl):handleCategoryChage(item2)"
class="category-l3"
:class="{
'category-l3-select': selectCategory === item2.Id,
......@@ -433,6 +433,7 @@ export default {
selectedArea: [],
selectedAreaId: "",
isHome: false,
HomeData: [],
};
},
watch: {
......@@ -448,11 +449,51 @@ export default {
},
$route: {
handler: function (val, oldVal) {
this.isHome = val.path === "/" || val.path === "/index";
this.isHome = val.path === "/searchProduct" || val.path === "/search";
},
// 深度观察监听
deep: true,
},
dataList: {
handler(n, o) {
var jObj = JSON.parse(window.localStorage.getItem('HomeData'));
this.HomeData = jObj.filter(x=>{ return x.Id == 'index_nav' })
if(this.HomeData.length>0) {
let obj = {
BackgroundImage: "",
CategoryName: "行程线路",
Icon: "",
Id: 9999999,
IsHot: '',
IsSelfGuidedTour: '',
Level: 0,
LinkUrl: '',
ParentId: 0,
Sort: 0,
SubList: []
}
let obj2 = {
CategoryName: '',
LinkUrl: '',
Id: 0,
}
this.categoryList = n.CategoryList
this.HomeData[0].plugData.MenuList.forEach(x=>{
obj.CategoryName = '行程线路'//x.MenuName
obj.LinkUrl = x.LinkUrl
x.SubMenuList.forEach((y,index)=>{
obj2 = {
CategoryName: y.MenuName,
LinkUrl: y.LinkUrl,
Id: 9999999+index,
}
obj.SubList.push(obj2)
})
})
this.categoryList[0] = obj
}
}
}
},
meta() {
return {
......@@ -464,8 +505,8 @@ export default {
},
mounted() {
this.isHome =
this.$router.history.current.path === "/" ||
this.$router.history.current.path === "/index";
this.$router.history.current.path === "/searchProduct" ||
this.$router.history.current.path === "/search";
if (localStorage.b2bUser) {
this.LoginUser = JSON.parse(window.localStorage.getItem("b2bUser"));
......@@ -484,6 +525,8 @@ export default {
);
this.searchDate = newStartDateStr;
this.searchEndDate = newEndDateStr;
},
methods: {
avatarClick() {
......
......@@ -221,7 +221,7 @@
:src="LoginUser.photo"
/>
<img class="avatar" v-else src="../../assets/img/avatar.png" />
<!-- <span>{{LoginUser.name || LoginUser.mailbox}}</span> -->
</template>
<div class="row no-wrap">
......@@ -456,7 +456,7 @@ export default {
"body"
).style = `position: fixed; top: -${this.scrollTop}px`;
},
handleDialogClose() {
document.querySelector(
"body"
......
......@@ -90,7 +90,7 @@ import Navs from 'src/pages/usercenter/components/navs.vue';
},
watch: {
'$route': function() {
this.showUserInfo = Boolean(this.$route.meta.isUserCenter)
this.showUserInfo = Boolean(this.$route.meta.isUserCenter)
}
},
created() {
......@@ -102,7 +102,7 @@ import Navs from 'src/pages/usercenter/components/navs.vue';
})
},
mounted() {
this.isSearch = this.$router.history.current.path != "/index"&&this.$router.history.current.path != "/"
this.isSearch = this.$router.history.current.path === "/searchProduct"||this.$router.history.current.path === "/search"
window.addEventListener('scroll', this.getScrollHeight, false);
//判断是不是同一天
if (localStorage.ToDay) {
......
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