Commit 3fefcd92 authored by youjie's avatar youjie

no message

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