Commit a5f1716b authored by 华国豪's avatar 华国豪 🙄

新增当地游

parent 919c653a
......@@ -88,12 +88,13 @@ color:rgba(51,51,51,1);
<el-menu-item index="2-2">一日游</el-menu-item>
</el-submenu> -->
<el-menu-item index="0" @click="goUrl('Home',true)"><a href="javascript:void(0);">首页</a></el-menu-item>
<!-- <el-menu-item index="0" @click="goUrl('Home',true)"><a href="javascript:void(0);">首页</a></el-menu-item> -->
<el-menu-item index="2-1" @click="handleSelect('2-1',false)"><a href="javascript:void(0);">跟团游</a></el-menu-item>
<el-menu-item index="2-2" @click="handleSelect('2-2',true)"><a href="javascript:void(0);">当地游</a></el-menu-item>
<el-menu-item index="3" @click="goUrl('TicketHome',true)"><a href="javascript:void(0);">机票</a></el-menu-item>
<el-menu-item index="2-2" @click="handleSelect('2-2',true)"><a href="javascript:void(0);">一日游</a></el-menu-item>
<el-menu-item index="2-3" @click="handleSelect('2-3',true)"><a href="javascript:void(0);">当地游</a></el-menu-item>
<!-- <el-menu-item index="3" @click="goUrl('TicketHome',true)"><a href="javascript:void(0);">机票</a></el-menu-item>
<el-menu-item index="4" @click="goUrl('VisaHomePage',true)"><a href="javascript:void(0);">签证</a></el-menu-item>
<el-menu-item index="5" @click="goUrl('IndependentTravel',true)"><a href="javascript:void(0);">自由行</a></el-menu-item>
<el-menu-item index="5" @click="goUrl('IndependentTravel',true)"><a href="javascript:void(0);">自由行</a></el-menu-item> -->
<!-- <el-menu-item index="5"><a href="javascript:void(0);">机票</a></el-menu-item>
<el-menu-item index="2"><a href="javascript:void(0);">酒店</a></el-menu-item>
......@@ -221,8 +222,10 @@ export default {
if(key === '2-1') {
this.$router.push({ path: '/heel'})
this.ifOneDay = false
} else if(key === '2-2') {
this.$router.push({ path: '/OneDayTour'})
} else if(key === '2-2' || key === '2-3') {
let path = '/OneDayTour'
path = path + (key === '2-3' ? '2' : '')
this.$router.push({ path: path})
this.ifOneDay = true
}
},
......
......@@ -198,7 +198,8 @@ export default {
pageSize:4,
companyId:this.companyId,
lineId:x.id,
lineTeamId:y.id
lineTeamId:y.id,
Is_PacketGroup: 0, //是否小包团1-是0-否
}
this.apipost('b2b_get_GetB2BHomeLineTravelPageList',msg,res=>{
this.recoItems.line[index].lineTeam[sIndex].pageData=res.data.data.pageData
......
<style>
@import '../../assets/mall/heeltour.css';
</style>
<template>
<div class="heel-box">
<swiper />
<template v-for="(item,index) in recoItems.line">
<el-row :style="{'margin-top':`${index>0?'50px':'10px'}`}" v-for="(sItem, sIndex) in item.lineTeam" :key="sIndex">
<el-col :span="20" :offset="2">
<div class="title">
<div class="t1">
<span class="t2" style='font-size:20px'>{{sItem.name}}</span>
</div>
</div>
<div class="item-content-box none-margin">
<el-row style="background:#f1f1f1">
<el-col :span="4" >
<img src="../../assets/img/img-01.png" style="width:100%" v-if='sItem.name.indexOf("日本")!=-1'/>
<img src="../../assets/img/img-03.png" style="width:100%" v-else />
</el-col>
<el-col :span="20" style="padding-left:10px;position:relative;" :style="{'min-height':`${groupHeight}px`}" v-loading='item.pageDate==="undefined"'>
<div class="item-box">
<el-row :gutter="10">
<el-col :span="6" v-for='(data,index) in sItem.pageData' :key="index" >
<div class="group-item" :style="{'height':`${groupHeight}px`}" @click="goUrl('detail',data.id,data)">
<div class="team-item noradius" :style="{'height':`${groupItemHeight}`}">
<img class="notamin" v-if='data.imgCover!=null&&data.imgCover.length' :src='compressImg(JSON.parse(data.imgCover)[0].Url, "filt", 245, "")'/>
<img class="notamin" src="../../assets/img/bg_c2@3x.png" v-else />
<div class="company">
{{data.startCityName}}出发
</div>
<div class="group-new" v-if='index<2'>
新团上市
</div>
</div>
<div class="info none-border">
<div class="item-title"><a href="javascript:" :style="{'font-size':`${groupHeight>400?'16px':'14px'}`}">{{data.title}}</a></div>
<div class="seatinfo" :style="{'margin-top':`${groupHeight>400?'0px':'-10px'}`}">
<div class="seat" style='font-size:12px;'>最近团期:<span style='font-size:14px; color:#795548;'>{{data.startDate}}</span></div>
<div class="day">{{data.dayNum}}</div>
</div>
<div v-if='groupHeight>400 && data.discountPrice>0'>
<el-tag type="danger">早鸟立减{{data.discountPrice}}</el-tag>
</div>
<div class="price">{{isLogin!==1?data.b2CPrice:data.b2BPrice}}<span class="ful"></span></div>
<div class="yuding" v-if='groupHeight>300'>
<el-button type="danger" size="small">预订</el-button>
</div>
</div>
</div>
</el-col>
</el-row>
</div>
</el-col>
</el-row>
</div>
</el-col>
</el-row>
</template>
<!-- <el-row v-loading='loadingIndex==index' v-for="(item,index) in recoItems.line" :key="index" v-if="item.id==115" :style="{'margin-top':`${index>0?'50px':'10px'}`}">
<el-col :span="20" :offset="2">
<div class="title">
<div class="t1">
<span class="t2" style='font-size:20px'>{{item.name}}</span>
</div>
<el-tabs v-model="item.chosenLineTeam" style="max-width:70%" @tab-click="loadModuleDataNoLoop">
<el-tab-pane label="精选" :name="`0_${index}`"></el-tab-pane>
<el-tab-pane :label="lineItem.name" :name="`${lineItem.id}_${index}`" v-for="(lineItem,it) in item.lineTeam" :key="it"></el-tab-pane>
</el-tabs>
</div>
<div class="item-content-box none-margin">
<el-row style="background:#f1f1f1">
<el-col :span="4" >
<img src="../../assets/img/img-01.png" style="width:100%" v-if='item.name.indexOf("日本")!=-1'/>
<img src="../../assets/img/img-02.png" style="width:100%" v-else-if='item.name.indexOf("韩国")!=-1'/>
<img src="../../assets/img/img-03.png" style="width:100%" v-else />
</el-col>
<el-col :span="20" style="padding-left:10px;position:relative;" :style="{'min-height':`${groupHeight}px`}" v-loading='item.pageDate==="undefined"'>
<div class="item-box">
<el-row :gutter="10">
<el-col :span="6" v-for='(data,index) in item.pageData' :key="index" >
<div class="group-item" :style="{'height':`${groupHeight}px`}" @click="goUrl('detail',data.id,data)">
<div class="team-item noradius" :style="{'height':`${groupItemHeight}`}">
<img class="notamin" v-if='data.imgCover!=null&&data.imgCover.length' :src='compressImg(JSON.parse(data.imgCover)[0].Url, "filt", 245, "")'/>
<img class="notamin" src="../../assets/img/bg_c2@3x.png" v-else />
<div class="company">
{{data.startCityName}}出发
</div>
<div class="group-new" v-if='index<2'>
新团上市
</div>
</div>
<div class="info none-border">
<div class="item-title"><a href="javascript:" :style="{'font-size':`${groupHeight>400?'16px':'14px'}`}">{{data.title}}</a></div>
<div class="seatinfo" :style="{'margin-top':`${groupHeight>400?'0px':'-10px'}`}">
<div class="seat" style='font-size:12px;'>最近团期:<span style='font-size:14px; color:#795548;'>{{data.startDate}}</span></div>
<div class="day">{{data.dayNum}}天</div>
</div>
<div v-if='groupHeight>400 && data.discountPrice>0'>
<el-tag type="danger">早鸟立减{{data.discountPrice}}</el-tag>
</div>
<div class="price">¥{{isLogin!==1?data.b2CPrice:data.b2BPrice}}<span class="ful">起</span></div>
<div class="yuding" v-if='groupHeight>300'>
<el-button type="danger" size="small">预订</el-button>
</div>
</div>
</div>
</el-col>
</el-row>
</div>
</el-col>
</el-row>
</div>
</el-col>
</el-row> -->
</div>
</template>
<script>
import swiper from '@/components/mall/OneDaySwiper.vue'
import moment from 'moment'
export default {
components: {
swiper
},
data () {
return {
activeName:'1',
japActiveName:'1',
itemHeight:'0px',
groupItemHeight:'0px',
w:0,
h:0,
groupHeight:0,
site:0,
companyId:-1,
recoItems:[],
tehuis:[],
tiaoshui:[],
imgs:[],
isLogin:1,
loadingIndex:-1
}
},
created(){
this.loadSize();
this.companyId=localStorage.site
this.loadRecoItems();
this.isLogin=this.$store.state.isLogin
},
mounted () {
// this.apiJavaPost('/api/dmc/airticket/getB2BAirticketForMonthMinPrice',{"id":0,"flithtMonthDate":"2019-02","flight_number":"","airLineID":0,"ticketType":0,"lineId":0,"isPayOrder":0,"departure_city":0,"arrival_city":0,"freightSpace":0},res=>{
// console.log(res)
// },null)
},
methods: {
goSearch(txt){
let query={keywords:encodeURIComponent(txt)}
this.$router.push({
path:'OneDaySearch',
query
});
},
goUrl(path,id,obj){
path = 'OneDayDetailTwo'
path=`${path}/${encodeURIComponent(id)}/${obj.tcid}`;
this.$router.push({ path })
},
loadModuleDataNoLoop(tab, event){
let sno=tab.name.split('_')[1],ltId=tab.name.split('_')[0]
this.loadingIndex=sno
let msg={
pageIndex:1,
pageSize:4,
companyId:this.companyId,
lineId:115,
lineTeamId:ltId
}
this.apipost('b2b_get_GetB2BHomeLineTravelPageList',msg,r=>{
this.recoItems.line[sno].pageData=r.data.data.pageData
//this.$set(this.recoItems.line[sno],this.recoItems.line[sno])
this.loadingIndex=-1
},null)
},
loadRecoItems(){
if(this.companyId!=-1){
this.apipost('b2b_get_GetHomeSearchItem',{'companyId':this.companyId, lineDirection: 2, Is_PacketGroup: 1},r=>{
r.data.data.line.forEach(x=>{
x.chosenLineTeam='0'
})
this.recoItems=r.data.data
this.activeName=r.data.data.recommend[0].id.toString()
this.recoItems.line.forEach((x, index)=>{
x.lineTeam.forEach((y, sIndex)=>{
this.loadingIndex=index
let msg={
pageIndex:1,
pageSize:4,
companyId:this.companyId,
lineId:x.id,
lineTeamId:y.id,
Is_PacketGroup: 1, //是否小包团1-是0-否
}
this.apipost('b2b_get_GetB2BHomeLineTravelPageList',msg,res=>{
this.recoItems.line[index].lineTeam[sIndex].pageData=res.data.data.pageData
//this.$set(this.recoItems.line[sno],this.recoItems.line[sno])
this.$forceUpdate()
this.loadingIndex=-1
},null)
})
})
},null)
}
},
loadSize(){
let w=screen.availWidth
w=w/24*20
w=w-(17*5)
w=w/6
this.itemHeight=w/1.5+'px'
this.w=Math.floor(w)
this.h=Math.floor((w/1.5))
// console.log(this.$refs.groupHeightId)
this.groupHeight=Math.floor(screen.availWidth*0.8333*0.1666/0.63)-6
w=screen.availWidth
w=w/24*20
w=w-(10*3)
w=w/4
this.groupItemHeight=w/1.8+'px'
}
}
}
</script>
......@@ -102,6 +102,15 @@ export default new Router({
title: "一日游-印象之旅~感动与世界同步"
}
},
{
path: "/OneDayTour2",
name: "OneDayTour2",
component: resolve =>
require(["@/components/mall/OneDayTour2"], resolve),
meta: {
title: "当地游-印象之旅~感动与世界同步"
}
},
{
path: "/coding",
name: "coding",
......
......@@ -4,8 +4,8 @@
<template>
<div class="home-box" v-if="isPhone">
<!-- <mallHead msg="" @forword='goUrl("2-1")' @siteCity="siteCity"/> -->
<newHead/>
<mallHead msg="" @forword='goUrl("2-1")' @siteCity="siteCity"/>
<!-- <newHead/> -->
<div :style='{"min-height":minHeight+"px"}'>
<transition name="slide">
<router-view :changeCity='changeCity'></router-view>
......
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