Commit 3878b7d2 authored by 黄奎's avatar 黄奎

11

parent 632641f8
......@@ -21,11 +21,11 @@ Vue.prototype.$product = product
//域名管理对象
Vue.prototype.domainManager = function () {
let domainUrl = "http://192.168.5.46";
domainUrl = "http://192.168.5.214";
let domainNameUrl = this.GetDomain();
if (domainNameUrl.indexOf('oytour') !== -1) {
domainUrl = "https://reborn.oytour.com";
}
domainUrl = "http://192.168.5.46";
var obj = {
//主地址
DomainUrl: domainUrl,
......@@ -38,6 +38,7 @@ Vue.prototype.domainManager = function () {
//获取当前域名
Vue.prototype.GetDomain = function () {
var domainNameUrl = window.location.hostname;
domainNameUrl="www.oytour.com";
return domainNameUrl;
}
Vue.prototype.groupBy = function (array, f) {
......
......@@ -289,8 +289,7 @@
<div class="all-menu">
<div class="flex">
<div class="category-item font-16" :key="`s_`+i" v-for="(x, i) in categoryList"
v-if="x.SubList.length>0"
>
v-if="x.SubList.length>0">
<template v-if="i <= 3">
<img class="category-icon" :src="
require(`../../assets/img/home/${
......@@ -298,7 +297,7 @@
}.png`)
" />
</template>
{{ x.CategoryName }}
{{ x.CategoryName }}
</div>
</div>
<q-separator />
......@@ -306,18 +305,17 @@
<div class="category-item" :key="`s2_`+i" v-for="(x, i) in categoryList"
@click="x.SubList&&x.SubList.length>0&&x.CategoryName!='行程线路'?'':productSearch(x)"
:class="[x.SubList&&x.SubList.length>0&&x.CategoryName!='行程线路'?'':'cursor-pointer']"
v-if="x.SubList.length>0"
>
v-if="x.SubList.length>0">
<div :key="`s2_`+i+`d_`+index" v-for="(item,index) in x.SubList">
<div
@click.stop="x.CategoryName=='行程线路'||x.Id==44?OpenNewUrl(item.LinkUrl):handleCategoryChage(item)"
class="category-l2" :class="{
'category-l2-select': selectCategory === item.Id,
}">
{{ item.CategoryName }}
{{ item.CategoryName }}
</div>
<div v-if="item.SubList&&item.SubList.length">
<div
<div
@click.stop="x.CategoryName=='行程线路'||x.Id==44?OpenNewUrl(item2.LinkUrl):handleCategoryChage(item2)"
class="category-l3" :class="{
'category-l3-select': selectCategory === item2.Id,
......@@ -331,13 +329,12 @@
</div>
</q-menu>
</div>
<template v-for="(x, i) in categoryList">
<div class="category-btn" :key="`s3_`+i" :label="x.CategoryName" flat unelevated
:content-style="{ hover: '#ff0000' }" @mouseenter="typeHover(i, true)" @mouseleave="typeHover(i, false)"
@click="x.CategoryName!='行程线路'&&x.Id!=44 ?productSearch(x):''"
:class="[x.CategoryName!='行程线路'&& x.Id!=44?'cursor-pointer':'']">
{{ x.CategoryName }}
{{ x.CategoryName }}
<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 :key="`s3_`+i+`d_`+index" v-for="(item,index) in x.SubList">
......@@ -516,6 +513,9 @@
this.CommonJump("/city/" + item.Id);
},
handleCategoryChage(item, type) {
console.log("item", item);
console.log("type", type);
if (!type) {
this.CommonJump("/search", {
qsearchKey: this.searchKey,
......@@ -534,6 +534,10 @@
this.CommonJump("/searchVisa", {
Name: this.searchKey,
});
} else if (type == 4) {//道旅酒店
this.CommonJump("/searchDida", {
Name: this.searchKey,
});
}
}
setTimeout(() => {
......@@ -543,9 +547,15 @@
}, 300)
},
productSearch(item) {
if (item.CategoryName == '机票') this.handleCategoryChage(item, 0) //this.handleCategoryChage(item,2)
else if (item.CategoryName == '签证') this.handleCategoryChage(item, 3)
else this.handleCategoryChage(item, 0)
if (item.CategoryName == '机票') {
this.handleCategoryChage(item, 0)
} else if (item.CategoryName == '签证') {
this.handleCategoryChage(item, 3)
} else if (item.CategoryName == '住宿') {
this.handleCategoryChage(item, 4)
} else {
this.handleCategoryChage(item, 0)
}
},
mouseenterAddress() {
this.menuFocusAll = 0;
......
......@@ -166,17 +166,17 @@ export default {
this.HomeData = res.data.data;
this.HomeData.forEach(x=>{
if(x.Id=='index_nav'){
let findIndex = x.plugData.BottomList.findIndex(x=>x.LinkTitle.indexOf('邮箱')!=-1)
let findIndexTel = x.plugData.BottomList.findIndex(x=>x.LinkTitle.indexOf('电话')!=-1)
console.log(findIndex,findIndexTel)
if(findIndex==-1) x.plugData.BottomList.push({
LinkTitle:'邮箱:service@oytour.com',
LinkUrl:'',
})
if(findIndexTel==-1) x.plugData.BottomList.push({
LinkTitle:'电话:400-616-5510',
LinkUrl:'',
})
// let findIndex = x.plugData.BottomList.findIndex(x=>x.LinkTitle.indexOf('邮箱')!=-1)
// let findIndexTel = x.plugData.BottomList.findIndex(x=>x.LinkTitle.indexOf('电话')!=-1)
// if(findIndex==-1) x.plugData.BottomList.push({
// LinkTitle:'邮箱:service@oytour.com',
// LinkUrl:'',
// })
// if(findIndexTel==-1) x.plugData.BottomList.push({
// LinkTitle:'电话:400-616-5510',
// LinkUrl:'',
// })
}
})
......
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