Commit 6b0c29f5 authored by 黄奎's avatar 黄奎

11

parent 1a65fbc4
......@@ -384,8 +384,6 @@ export default {
},
playVideo(formName){
let i = this.slide-1
// console.log(this.FileUrlList[i],'----')
// return
if(this.FileUrlList[i].FileType==2){
let video = this.$refs[formName]
if(video){
......@@ -393,10 +391,8 @@ export default {
if(this.FileUrlList[i].currentTime){
video.currentTime = this.FileUrlList[i].currentTime
}
// console.log('继续播放')
video.play()
}else {
// console.log('暂停')
video.pause()
}
}
......@@ -406,7 +402,6 @@ export default {
let URL = ''
if(this.LinkUrl) {
URL = `${this.LinkUrl.indexOf('/#/searchProduct')!=-1?this.LinkUrl:this.LinkUrl+'?'}${this.searchKey?'&qsearchKey='+this.searchKey:''}${this.searchDate?'&qsearchDate='+this.searchDate:''}${this.searchEndDate?'&qsearchEndDate='+this.searchEndDate:''}${this.type1&&this.type2?'&categoryId='+this.type2:this.type1&&!this.type2?'&categoryId='+this.type1:''}`
// console.log(URL,'----')
this.OpenNewUrl(URL)
}
else {
......@@ -414,11 +409,10 @@ export default {
}
},
getType2(e){
// console.log(this.type2,'----type2222222')
},
getType1(e){
this.optionsList = []
// console.log(this.type1,'----type111111')
let list = this.CategoryList.filter(x=>{
if(x.Id==e){
this.lineUrl = x.LinkUrl
......
<style lang="scss" scoped>
.header-box {
.header-box {
max-width: 1200px;
margin: 0 auto;
}
.address-box {
}
.address-box {
width: 815px;
height: 426px;
}
.menu-box {
}
.menu-box {
width: 174px;
height: 426px;
overflow: auto;
}
.menu-item {
}
.menu-item {
width: 139px;
margin: 15px auto;
height: 49px;
border-radius: 4px;
padding: 8px 16px;
cursor: pointer;
}
.menu-item:hover {
}
.menu-item:hover {
color: #333;
background-color: #eeeeee;
}
.hot {
}
.hot {
line-height: 33px;
}
.select {
}
.select {
color: #fff;
background-color: var(--q-color-primary);
}
.menu-title {
}
.menu-title {
font-weight: bold;
}
.menu-tag-box span {
}
.menu-tag-box span {
margin-right: 20px;
}
.menu-tag-box:last-child {
}
.menu-tag-box:last-child {
margin-right: 0;
}
.city-box {
}
.city-box {
padding: 14px 18px;
width: 641px;
background: #f5f5f5;
}
.city {
}
.city {
width: 129px;
height: 69px;
background-size: cover;
background-repeat: no-repeat;
background-position: 0% 0%;
cursor: pointer;
}
.city2 {
}
.city2 {
width: 76px;
height: 32px;
background: #dbdbdb;
......@@ -64,42 +76,48 @@
padding: 0 8px;
margin-right: 20px;
cursor: pointer;
}
.city3 {
}
.city3 {
height: 32px;
line-height: 32px;
margin: 0 20px 4px 0;
cursor: pointer;
font-weight: bold;
}
.city:hover {
}
.city:hover {
background-color: #eeeeee;
}
.city-img {
}
.city-img {
width: 127px;
height: 67px;
position: absolute;
top: 1;
left: 1;
border-radius: 10px;
}
.city-name-box {
}
.city-name-box {
z-index: 10;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.city-name {
}
.city-name {
text-align: center;
height: 22px;
background: rgba(0, 0, 0, 0.2);
color: #fff;
padding: 0 5px;
border-radius: 10px;
}
.address-btn {
}
.address-btn {
text-align: center;
width: 140px;
height: 36px;
......@@ -107,28 +125,34 @@
padding-left: 20px;
background: #fff;
margin: 0 10px 0 44px;
}
.address-btn:hover {
}
.address-btn:hover {
background: #f5f5f5;
}
.all-type {
}
.all-type {
margin-left: 10px;
}
.all-menu {
}
.all-menu {
width: 660px;
padding: 10px;
}
.category-item {
}
.category-item {
min-width: 160px;
padding: 10px;
border-radius: 8px;
font-weight: bold;
font-size: 18px !important;
}
.font-16 {
}
.font-16 {
font-size: 16px;
}
.category-l2 {
}
.category-l2 {
height: 34px;
border-radius: 8px;
line-height: 34px;
......@@ -136,48 +160,58 @@
cursor: pointer;
font-size: 14px;
font-weight: 400;
}
.category-l2:hover {
}
.category-l2:hover {
background: var(--q-color-primary);
color: #fff;
}
.category-l2-select {
}
.category-l2-select {
background: var(--q-color-primary);
color: #fff;
}
.category-l3 {
}
.category-l3 {
padding: 8px;
font-size: 12px;
font-weight: 400;
color: #a0a0a0;
border-radius: 8px;
cursor: pointer;
}
.category-l3:hover {
}
.category-l3:hover {
background-color: #eee;
}
.category-l3-select {
}
.category-l3-select {
color: #ee4454;
}
.category-box {
}
.category-box {
min-width: 140px;
padding: 10px;
font-weight: bold;
}
.category-btn {
}
.category-btn {
text-align: center;
width: 100px;
height: 36px;
line-height: 36px;
background: #fff;
}
.category-btn:hover {
}
.category-btn:hover {
background: #f5f5f5;
}
.category-icon {
}
.category-icon {
width: 16px;
height: 16px;
}
}
</style>
<template>
<div>
......@@ -185,35 +219,16 @@
<div class="header-box flex q-py-sm" v-if="isHome">
<q-tabs align="center" shrink>
<template v-if="false">
<div
flat
unelevated
class="address-btn"
@mouseenter="mouseenterAddress"
@mouseleave="mouseeleaveAddress"
>
<div flat unelevated class="address-btn" @mouseenter="mouseenterAddress" @mouseleave="mouseeleaveAddress">
<span slot="default" class="flex item-center">
<i
class="iconfont icondingweixiao q-icon notranslate"
style="font-size: 14px; margin-right: 8px"
></i
>選擇目的地
<i class="iconfont icondingweixiao q-icon notranslate"
style="font-size: 14px; margin-right: 8px"></i>選擇目的地
</span>
<q-menu
ref="address"
@mouseenter="addressMenuEnter"
@mouseleave="addressMenuLeave"
class="light-shadow"
>
<q-menu ref="address" @mouseenter="addressMenuEnter" @mouseleave="addressMenuLeave" class="light-shadow">
<div class="address-box flex">
<div class="menu-box">
<div
v-for="item in areas"
:key="item.Id"
class="menu-item"
@click="changeAreas(item)"
:class="{ select: selectedAreaId === item.Id }"
>
<div v-for="item in areas" :key="item.Id" class="menu-item" @click="changeAreas(item)"
:class="{ select: selectedAreaId === item.Id }">
<div v-if="!item.tag" class="hot">{{ item.Name }}</div>
<div v-else>
<div class="menu-title">{{ item.Name }}</div>
......@@ -227,29 +242,15 @@
<!-- 热门城市 -->
<div class="col bg-grey-2">
<div v-if="!selectedAreaId" class="row q-pr-md">
<div
@click="handleSelectArea(item)"
v-for="item in selectedArea"
class="q-mt-md q-ml-md"
:key="item.Id"
style="width: 130px; height: 70px"
>
<q-img
:src="item.ImageList[0]"
spinner-color="grey-2"
class="rounded-borders full-width full-height"
>
<div
class="full-width full-height row items-center justify-center"
style="background: none"
>
<div
style="
<div @click="handleSelectArea(item)" v-for="item in selectedArea" class="q-mt-md q-ml-md"
:key="item.Id" style="width: 130px; height: 70px">
<q-img :src="item.ImageList[0]" spinner-color="grey-2"
class="rounded-borders full-width full-height">
<div class="full-width full-height row items-center justify-center" style="background: none">
<div style="
background: rgba(0, 0, 0, 0.2);
text-shadow: 2px 2px 5px rgb(0 0 0 / 50%);
"
class="rounded-borders q-px-md q-py-xs text-white cursor-pointer"
>
" class="rounded-borders q-px-md q-py-xs text-white cursor-pointer">
{{ item.Name }}
</div>
</div>
......@@ -259,21 +260,15 @@
<div v-else class="city-box">
<div class="row" v-for="item in selectedArea" :key="item.Id">
<div style="width: 138px">
<div
@click="handleSelectArea(item)"
class="q-py-xs q-px-md bg-grey-4 cursor-pointer text-black text-subtitle2 inline-block rounded-borders text-weight-bolder"
>
<div @click="handleSelectArea(item)"
class="q-py-xs q-px-md bg-grey-4 cursor-pointer text-black text-subtitle2 inline-block rounded-borders text-weight-bolder">
{{ item.Name }}
</div>
</div>
<div class="col q-mt-sm">
<div class="row q-col-gutter-lg">
<div
@click="handleSelectArea(item2)"
class="text-subtitle2 text-grey-9 cursor-pointer"
v-for="item2 in item.SubList"
:key="item2.Id"
>
<div @click="handleSelectArea(item2)" class="text-subtitle2 text-grey-9 cursor-pointer"
v-for="item2 in item.SubList" :key="item2.Id">
{{ item2.Name }}
</div>
</div>
......@@ -287,62 +282,38 @@
<q-separator style="height: 16px; margin: auto 0" vertical />
</template>
<div
class="all-type category-btn"
flat
unelevated
@mouseenter="typeHoverAll(true)"
@mouseleave="typeHoverAll(false)"
>
<div class="all-type category-btn" flat unelevated @mouseenter="typeHoverAll(true)"
@mouseleave="typeHoverAll(false)">
全部分類
<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="i" v-for="(x, i) in categoryList">
<template v-if="i <= 3">
<img
class="category-icon"
:src="
<img class="category-icon" :src="
require(`../../assets/img/home/${
['guanguang', 'jindian', 'hotel', 'car'][i]
}.png`)
"
/>
" />
</template>
{{ x.CategoryName }}
</div>
</div>
<q-separator />
<div class="flex">
<div
class="category-item"
:key="i"
v-for="(x, i) in categoryList"
>
<div class="category-item" :key="i" v-for="(x, i) in categoryList">
<div :key="i" v-for="item in x.SubList">
<div
@click="x.CategoryName=='行程线路'?OpenNewUrl(item.LinkUrl):handleCategoryChage(item)"
class="category-l2"
:class="{
<div @click="x.CategoryName=='行程线路'?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="x.CategoryName=='行程线路'?OpenNewUrl(item2.LinkUrl):handleCategoryChage(item2)"
class="category-l3"
:class="{
<div @click="x.CategoryName=='行程线路'?OpenNewUrl(item2.LinkUrl):handleCategoryChage(item2)"
class="category-l3" :class="{
'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>
</div>
......@@ -353,44 +324,23 @@
</q-menu>
</div>
<template v-for="(x, i) in categoryList">
<div
class="category-btn"
:key="i"
:label="x.CategoryName"
flat
unelevated
:content-style="{ hover: '#ff0000' }"
@mouseenter="typeHover(i, true)"
@mouseleave="typeHover(i, false)"
>
<div class="category-btn" :key="i" :label="x.CategoryName" flat unelevated
:content-style="{ hover: '#ff0000' }" @mouseenter="typeHover(i, true)" @mouseleave="typeHover(i, false)">
{{ 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">
<div :key="index" v-for="(item,index) in x.SubList">
<div
@click="x.CategoryName=='行程线路'?OpenNewUrl(item.LinkUrl):handleCategoryChage(item)"
class="category-l2"
:class="{
<div @click="x.CategoryName=='行程线路'?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="x.CategoryName=='行程线路'?OpenNewUrl(item2.LinkUrl):handleCategoryChage(item2)"
class="category-l3"
:class="{
<div @click="x.CategoryName=='行程线路'?OpenNewUrl(item2.LinkUrl):handleCategoryChage(item2)"
class="category-l3" :class="{
'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>
</div>
......@@ -405,7 +355,7 @@
</template>
<script>
export default {
export default {
props: {
baseData: {
type: Object,
......@@ -446,7 +396,6 @@ export default {
},
baseData: {
handler(n, o) {
// this.initNavs();
this.initAreas();
},
deep: true,
......@@ -461,8 +410,10 @@ export default {
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) {
this.HomeData = jObj.filter(x => {
return x.Id == 'index_nav'
})
if (this.HomeData.length > 0) {
let obj = {
BackgroundImage: "",
CategoryName: "行程线路",
......@@ -481,40 +432,34 @@ export default {
LinkUrl: '',
Id: 0,
}
this.categoryList = n.CategoryList
this.HomeData[0].plugData.MenuList.forEach((x,index)=>{
obj.CategoryName = '行程线路'//x.MenuName
this.categoryList = n.CategoryList;
this.HomeData[0].plugData.MenuList.forEach((x, index) => {
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)
// })
obj2 = {
CategoryName: x.MenuName,
LinkUrl: x.LinkUrl,
Id: 9999999+index,
Id: 9999999 + index,
}
obj.SubList.push(obj2)
})
this.categoryList[0] = obj
console.log("this.categoryList", this.categoryList);
}
}
}
},
meta() {
return {
title:
this.subTitle != ""
? `${this.subTitle} - ${this.baseData.name}`
: this.baseData.name,
title: this.subTitle != "" ?
`${this.subTitle} - ${this.baseData.name}` : this.baseData.name,
};
},
mounted() {
this.isSearch = this.$router.history.current.path === "/search"||this.$router.history.current.path === "/searchProduct";
this.isSearch = this.$router.history.current.path === "/search" || this.$router.history.current.path ===
"/searchProduct";
this.isHome =
this.$router.history.current.path === "/searchProduct" ||
this.$router.history.current.path === "/search";
......@@ -536,8 +481,6 @@ export default {
);
this.searchDate = newStartDateStr;
this.searchEndDate = newEndDateStr;
},
methods: {
avatarClick() {
......@@ -558,11 +501,11 @@ export default {
qsearchEndDate: this.searchEndDate,
categoryId: item.Id,
});
setTimeout(()=>{
if(this.isSearch) {
setTimeout(() => {
if (this.isSearch) {
window.location.reload()
}
},300)
}, 300)
},
mouseenterAddress() {
this.menuFocusAll = 0;
......@@ -724,24 +667,28 @@ export default {
);
},
},
};
};
</script>
<style>
.avatar {
.avatar {
width: 38px;
height: 38px;
border-radius: 50%;
}
.nav-items {
}
.nav-items {
position: relative;
}
.nav-items:hover {
}
.nav-items:hover {
background: #eee;
color: var(--q-color-primary);
}
.nav-items:hover::after {
}
.nav-items:hover::after {
content: " ";
position: absolute;
bottom: 0px;
......@@ -749,16 +696,19 @@ export default {
right: 0;
height: 2px;
background: var(--q-color-primary);
}
.nav-items:hover .secondMenu {
}
.nav-items:hover .secondMenu {
display: block;
}
.secondMenu {
}
.secondMenu {
display: none;
padding-top: 5px;
position: absolute;
top: 60px;
left: 0px;
z-index: 9;
}
}
</style>
<style lang="scss" scoped>
.header-box {
.header-box {
max-width: 1200px;
margin: 0 auto;
}
.address-box {
}
.address-box {
width: 815px;
height: 426px;
}
.menu-box {
}
.menu-box {
width: 174px;
height: 426px;
overflow: auto;
}
.menu-item {
}
.menu-item {
width: 139px;
margin: 15px auto;
height: 49px;
border-radius: 4px;
padding: 8px 16px;
cursor: pointer;
}
.menu-item:hover {
}
.menu-item:hover {
color: #333;
background-color: #eeeeee;
}
.hot {
}
.hot {
line-height: 33px;
}
.select {
}
.select {
color: #fff;
background-color: var(--q-color-primary);
}
.menu-title {
}
.menu-title {
font-weight: bold;
}
.menu-tag-box span {
}
.menu-tag-box span {
margin-right: 20px;
}
.menu-tag-box:last-child {
}
.menu-tag-box:last-child {
margin-right: 0;
}
.city-box {
}
.city-box {
padding: 14px 18px;
width: 641px;
background: #f5f5f5;
}
.city {
}
.city {
width: 129px;
height: 69px;
background-size: cover;
background-repeat: no-repeat;
background-position: 0% 0%;
cursor: pointer;
}
.city2 {
}
.city2 {
width: 76px;
height: 32px;
background: #dbdbdb;
......@@ -64,63 +76,74 @@
padding: 0 8px;
margin-right: 20px;
cursor: pointer;
}
.city3 {
}
.city3 {
height: 32px;
line-height: 32px;
/* display: inline-block; */
margin: 0 20px 4px 0;
cursor: pointer;
font-weight: bold;
}
.city:hover {
}
.city:hover {
background-color: #eeeeee;
}
.city-img {
}
.city-img {
width: 127px;
height: 67px;
position: absolute;
top: 1;
left: 1;
border-radius: 10px;
}
.city-name-box {
}
.city-name-box {
z-index: 10;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.city-name {
}
.city-name {
text-align: center;
height: 22px;
background: rgba(0, 0, 0, 0.2);
color: #fff;
padding: 0 5px;
border-radius: 10px;
}
.address-btn {
}
.address-btn {
margin: 0 10px 0 44px;
}
.all-type {
}
.all-type {
margin-left: 10px;
}
.all-menu {
}
.all-menu {
width: 660px;
padding: 10px;
}
.category-item {
}
.category-item {
width: 160px;
padding: 10px;
border-radius: 8px;
font-weight: bold;
font-size: 18px !important;
}
.font-16 {
}
.font-16 {
font-size: 16px;
}
.category-l2 {
}
.category-l2 {
height: 34px;
border-radius: 8px;
line-height: 34px;
......@@ -128,71 +151,66 @@
cursor: pointer;
font-size: 14px;
font-weight: 400;
}
.category-l2:hover {
}
.category-l2:hover {
background-color: #eee;
}
.category-l2-select {
}
.category-l2-select {
background: var(--q-color-primary);
color: #fff;
}
.category-l3 {
}
.category-l3 {
padding: 8px;
font-size: 12px;
font-weight: 400;
color: #a0a0a0;
border-radius: 8px;
cursor: pointer;
}
.category-l3:hover {
}
.category-l3:hover {
background-color: #eee;
}
.category-l3-select {
}
.category-l3-select {
color: #ee4454;
}
.category-box {
}
.category-box {
width: 140px;
padding: 10px;
font-weight: bold;
}
.category-btn {
}
.category-btn {
width: 100px;
}
.mobile-logo {
}
.mobile-logo {
max-height: 35px;
max-width: 120px;
object-fit: contain;
}
}
</style>
<template>
<q-header
reveal
:style="{ background: baseData.nav.bg, color: baseData.nav.color }"
class="bg-white"
height-hint="108"
to="/index"
style="border-bottom: 1px solid #eee"
>
<q-toolbar
style="height: 50px; max-width: 1200px; margin: 0 auto"
class="zk_toolbar flex justify-between"
:class="{ 'q-px-none': $q.platform.is.desktop }"
>
<q-header reveal :style="{ background: baseData.nav.bg, color: baseData.nav.color }" class="bg-white"
height-hint="108" to="/index" style="border-bottom: 1px solid #eee">
<q-toolbar style="height: 50px; max-width: 1200px; margin: 0 auto" class="zk_toolbar flex justify-between"
:class="{ 'q-px-none': $q.platform.is.desktop }">
<div class="flex">
<div class="f24" v-if="$q.platform.is.mobile && isHome" @click="handleShowDialog">
<i class="iconfont iconmore1" style="font-size: 24px"></i>
</div>
<img
:src="baseData.logo"
style="
<img :src="baseData.logo" style="
cursor: pointer;
height: 35px;
filter: drop-shadow(0px 0px var(--q-color-primary));
"
class="q-mr-lg q-ml-sm"
:class="{ 'mobile-logo': $q.platform.is.mobile }"
@click="CommonJump('/index', {})"
/>
" class="q-mr-lg q-ml-sm" :class="{ 'mobile-logo': $q.platform.is.mobile }"
@click="CommonJump('/index', {})" />
</div>
<!--HK 2024-11-22 去掉 搜索接口有调整-->
<searchSf2 v-if="!isHome" :plugData="plugData"></searchSf2>
......@@ -211,11 +229,7 @@
<q-btn label="帮助中心" flat></q-btn> -->
<q-btn v-if="LoginUser.id <= 0" label="注册" flat></q-btn>
<template v-if="LoginUser.token">
<q-btn-dropdown
style="color: #444; font-weight: bold"
class="q-ml-lg"
unelevated
>
<q-btn-dropdown style="color: #444; font-weight: bold" class="q-ml-lg" unelevated>
<template v-slot:label>
<img class="avatar" v-if="LoginUser.photo" :src="LoginUser.photo" />
<img class="avatar" v-else src="../../assets/img/avatar.png" />
......@@ -297,67 +311,38 @@
</q-btn-dropdown>
</template>
<template v-else>
<q-btn
flat
style="color: #444; font-weight: bold"
class="q-ml-lg desktop-only"
:label="$t('login')"
icon="iconfont iconicon-unlogin"
to="/login"
/>
<q-btn
flat
style="color: #444; font-weight: bold"
class="mobile-only"
icon="iconfont iconicon-unlogin"
to="/login"
/>
<q-btn flat style="color: #444; font-weight: bold" class="q-ml-lg desktop-only" :label="$t('login')"
icon="iconfont iconicon-unlogin" to="/login" />
<q-btn flat style="color: #444; font-weight: bold" class="mobile-only" icon="iconfont iconicon-unlogin"
to="/login" />
</template>
</div>
<!-- 移动端 -->
<div v-else>
<img
@click="avatarClick"
class="avatar q-mt-sm"
v-if="LoginUser.photo"
:src="LoginUser.photo"
/>
<img
v-else
class="avatar q-mt-sm"
@click="avatarClick"
src="../../assets/img/avatar.png"
/>
<img @click="avatarClick" class="avatar q-mt-sm" v-if="LoginUser.photo" :src="LoginUser.photo" />
<img v-else class="avatar q-mt-sm" @click="avatarClick" src="../../assets/img/avatar.png" />
</div>
</q-toolbar>
<city-category
v-if="$q.platform.is.desktop"
:baseData="baseData"
:dataList="dataList"
></city-category>
<popup
@mousemove.prevent
id="city-category"
v-model="showDialog"
mode="bottom"
@close="handleDialogClose"
>
<city-category-mobile
@close="showDialog = false"
:baseData="baseData"
:dataList="dataList"
></city-category-mobile
></popup>
<city-category v-if="$q.platform.is.desktop" :baseData="baseData" :dataList="dataList"></city-category>
<popup @mousemove.prevent id="city-category" v-model="showDialog" mode="bottom" @close="handleDialogClose">
<city-category-mobile @close="showDialog = false" :baseData="baseData" :dataList="dataList">
</city-category-mobile>
</popup>
</q-header>
</template>
<script>
import popup from "../props/index";
import CityCategoryMobile from "./city-category-mobile.vue";
import cityCategory from "./city-category.vue";
import searchSf2 from "../search_sf/search-top.vue";
export default {
components: { cityCategory, CityCategoryMobile, popup, searchSf2 },
import popup from "../props/index";
import CityCategoryMobile from "./city-category-mobile.vue";
import cityCategory from "./city-category.vue";
import searchSf2 from "../search_sf/search-top.vue";
export default {
components: {
cityCategory,
CityCategoryMobile,
popup,
searchSf2
},
props: {
baseData: {
type: Object,
......@@ -374,7 +359,10 @@ export default {
},
data() {
return {
plugData: { details: [], Title: "" },
plugData: {
details: [],
Title: ""
},
showDialog: false,
searchDate: "",
searchEndDate: "",
......@@ -416,21 +404,15 @@ export default {
},
meta() {
return {
title:
this.subTitle != ""
? `${this.subTitle} - ${this.baseData.name}`
: this.baseData.name,
title: this.subTitle != "" ?
`${this.subTitle} - ${this.baseData.name}` :
this.baseData.name,
};
},
mounted() {
this.isHome =
this.$router.history.current.path === "/" ||
this.$router.history.current.path === "/index";
// this.isSearch = this.$router.history.current.path === "/search";
console.log(
'JSON.parse(window.localStorage.getItem("b2bUser"))',
JSON.parse(window.localStorage.getItem("b2bUser"))
);
if (localStorage.b2bUser) {
this.LoginUser = JSON.parse(window.localStorage.getItem("b2bUser"));
}
......@@ -448,9 +430,6 @@ export default {
);
this.searchDate = newStartDateStr;
this.searchEndDate = newEndDateStr;
// this.initAreas()
// this.initNavs();
// this.getCategoryList();
},
methods: {
handler(event) {
......@@ -647,24 +626,28 @@ export default {
);
},
},
};
};
</script>
<style>
.avatar {
.avatar {
width: 38px;
height: 38px;
border-radius: 50%;
}
.nav-items {
}
.nav-items {
position: relative;
}
.nav-items:hover {
}
.nav-items:hover {
background: #eee;
color: var(--q-color-primary);
}
.nav-items:hover::after {
}
.nav-items:hover::after {
content: " ";
position: absolute;
bottom: 0px;
......@@ -672,16 +655,19 @@ export default {
right: 0;
height: 2px;
background: var(--q-color-primary);
}
.nav-items:hover .secondMenu {
}
.nav-items:hover .secondMenu {
display: block;
}
.secondMenu {
}
.secondMenu {
display: none;
padding-top: 5px;
position: absolute;
top: 60px;
left: 0px;
z-index: 9;
}
}
</style>
......@@ -682,7 +682,6 @@ export default {
if (this.msg.SeriesIds && this.msg.SeriesIds.length > 0) {
SeriesIdList = this.msg.SeriesIds.split(",");
}
console.log("SeriesIdList=====",SeriesIdList);
this.apipost(
"b2c_get_GetB2CQueryCondition",
this.msg,
......@@ -807,12 +806,10 @@ export default {
this.msg,
(res) => {
this.$q.loading.hide();
console.log("b2c_get_GetB2C2024TravelProductPage", res);
if (res.data.resultCode == 1) {
this.PageCount = res.data.data.pageCount;
this.TotalCount = res.data.data.count;
var tempArray = res.data.data.pageData.list;
if (tempArray && tempArray.length > 0) {
this.DataList = tempArray;
this.renderSearchInfo(res.data.data.pageData.condition);
......
......@@ -333,7 +333,6 @@ export default {
this.initAreaList()
var jObj = JSON.parse(window.localStorage.getItem('baseifo'));
const hotList = this.getHotList(jObj.AreaList)
console.log('hotList mounted', jObj, hotList)
this.hotList = hotList
this.getHistory()
var newStartDate = new Date();
......
......@@ -474,7 +474,6 @@ export default {
mounted() {
var jObj = JSON.parse(window.localStorage.getItem('baseifo'));
const hotList = this.getHotList(jObj.AreaList)
console.log('hotList mounted', jObj, hotList)
this.hotList = hotList
this.getHistory()
var newStartDate = new Date();
......
......@@ -495,7 +495,6 @@ export default {
},
created() {
this.msg = this.qMsg;
// this.msg.teamType = [];
this.initAreaList();
this.initGoods();
this.msg.priceRange = {
......@@ -591,14 +590,7 @@ export default {
if (x.SubList) {
}
},
// changeGoodTypeHandler(x) {
// if (x.checked && this.msg.teamType.indexOf(x.Id) == -1) {
// this.msg.teamType.push(x.Id);
// } else if (!x.checked && this.msg.teamType.indexOf(x.Id) != -1) {
// let i = this.msg.teamType.findIndex(item => item == x.Id);
// this.msg.teamType.splice(i, 1);
// }
// },
chosenSortHandler(x) {
this.msg.orderBy = x.value;
this.msg.pageIndex = 1
......
......@@ -28,10 +28,12 @@
</style>
<template>
<q-layout view="hHh lpr fFf">
<hor-big-one v-if="isSearch&&windowWidth>=768" :base-data="baseinfo" :dataList="dataList" ref="webhead"></hor-big-one>
<hor-big-one v-if="isSearch&&windowWidth>=768" :base-data="baseinfo" :dataList="dataList" ref="webhead">
</hor-big-one>
<!-- <hor-big-two v-if="headType==2" :base-data="baseinfo" ref="webhead"></hor-big-two> -->
<q-page-container>
<div class="flex justify-between" v-if="showUserInfo" :style="$q.platform.is.desktop ? 'width: 1200px; margin: 0 auto' : ''">
<div class="flex justify-between" v-if="showUserInfo"
:style="$q.platform.is.desktop ? 'width: 1200px; margin: 0 auto' : ''">
<navs v-if="$q.platform.is.desktop"></navs>
<router-view />
</div>
......@@ -54,7 +56,7 @@
import horBtm from "../components/navs/hor-btm";
import newHorBtm from "../components/navs/newHor-btm";
import subscriber from "../components/navs/subscriber";
import Navs from 'src/pages/usercenter/components/navs.vue';
import Navs from 'src/pages/usercenter/components/navs.vue';
export default {
components: {
horBigOne,
......@@ -90,9 +92,9 @@ import Navs from 'src/pages/usercenter/components/navs.vue';
};
},
watch: {
'$route': function() {
'$route': function () {
this.showUserInfo = Boolean(this.$route.meta.isUserCenter)
this.isSearch = this.$router.history.current.path != "/"&&this.$router.history.current.path != "/index"
this.isSearch = this.$router.history.current.path != "/" && this.$router.history.current.path != "/index"
}
},
destroyed() {
......@@ -108,7 +110,7 @@ import Navs from 'src/pages/usercenter/components/navs.vue';
})
},
mounted() {
this.isSearch = this.$router.history.current.path != "/"&&this.$router.history.current.path != "/index"
this.isSearch = this.$router.history.current.path != "/" && this.$router.history.current.path != "/index"
window.addEventListener('scroll', this.getScrollHeight, false);
//判断是不是同一天
if (localStorage.ToDay) {
......@@ -133,6 +135,7 @@ import Navs from 'src/pages/usercenter/components/navs.vue';
//获取网站基础配置
if (localStorage.baseifo) {
var jObj = JSON.parse(window.localStorage.getItem('baseifo'));
console.log("layout",jObj);
this.baseinfo.logo = jObj.Config.Logo;
this.baseinfo.name = jObj.Config.Name;
this.baseinfo.nav.navs = jObj.HeaderList;
......@@ -173,7 +176,7 @@ import Navs from 'src/pages/usercenter/components/navs.vue';
var msg = {
GroupId: 0,
B2BDomain: locationName,
IsGetConfigSite:1,
IsGetConfigSite: 1,
};
this.apipost(
"admin_get_GetGroupDomain", msg,
......@@ -189,7 +192,7 @@ import Navs from 'src/pages/usercenter/components/navs.vue';
},
//获取网站配置数据
getConfigData() {
let locationName =this.GetDomain();
let locationName = this.GetDomain();
this.apipost(
"ws_get_GetWebSiteConfig", {
RB_Group_Id: this.RB_Group_Id,
......
......@@ -1263,7 +1263,6 @@
var seriesIds = this.getUrlKey("SeriesIds", window.location.href);
var lineIds = this.getUrlKey("LineIds", window.location.href);
var TeamType = this.getUrlKey("TeamType", window.location.href);
console.log("TeamType", TeamType);
if (qsearchKey) {
this.qMsg.searchKey = qsearchKey;
}
......
......@@ -312,7 +312,6 @@ export default {
},
methods: {
pageChange(value) {
console.log("pageChange", value);
this.current = value;
this.getUsersList();
},
......
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