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

11

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