Commit 4dd273be authored by huangyuanyuan's avatar huangyuanyuan

update

parent 79b56567
......@@ -55,11 +55,12 @@ export default {
this.MsgBus.$on('openRaffleTickets', this.openRaffleTickets)
},
methods: {
getLocation() {
let _that = this;
let geolocation = location.initMap("map-container"); //定位
AMap.event.addListener(geolocation, "complete", result => {
console.log(result)
// console.log(result)
});
},
openRaffleTickets: function (val) {
......
......@@ -155,14 +155,18 @@ export default {
loading: true,
lineList:[],
lineLoad:false,
cityId:262,
companyId:0,
}
},
props:['changeCity'],
watch:{
changeCity: {
handler: function(val, oldVal) {
console.log(val)
if(val){
this.cityId=localStorage.cityId;
this.companyId=parseInt(localStorage.site);
this.LineTeam();
this.loadTiaoshui()
this.loadRecoItems()
}
......@@ -170,6 +174,10 @@ export default {
deep: true
},
},
created(){
this.cityId=localStorage.cityId;
this.companyId=parseInt(localStorage.site);
},
methods: {
// 系列
GostartCity(place){
......@@ -188,9 +196,11 @@ export default {
},
LineTeam(){
let msg={companyId:this.companyId,cityId:this.cityId};
this.lineLoad=true;
this.apiJavaPost('/api/b2b/group/getHomeLineSort',{},res=>{
this.apiJavaPost('/api/b2b/group/getHomeLineSort',msg,res=>{
this.lineLoad=false;
console.log(res)
if(res.data.resultCode==1){
this.lineList=res.data.data;
......@@ -226,6 +236,7 @@ export default {
pageIndex: 1,
pageSize: 5,
companyId: this.companyId,
cityId:this.cityId,
lineId: this.recoItems.line[sno].id,
lineTeamId: ltId
}
......@@ -237,7 +248,7 @@ export default {
},
loadRecoItems(){
if (this.companyId!=-1) {
this.apipost('b2b_get_GetHomeSearchItem',{'companyId': this.companyId, lineDirection: 2,}, r=> {
this.apipost('b2b_get_GetHomeSearchItem',{'companyId': this.companyId,cityId:this.cityId, lineDirection: 2,}, r=> {
r.data.data.line.forEach( x => {
x.chosenLineTeam = '0'
})
......@@ -252,6 +263,8 @@ export default {
pageIndex: 1,
pageSize: 12,
groupRecommendType: 1,
companyId:this.companyId,
cityId:this.cityId
}
this.apiJavaPost('/api/b2b/group/getHomeRecommendPrice',msg,res=>{
if(res.data.resultCode==1){
......@@ -282,6 +295,7 @@ export default {
pageIndex: 1,
pageSize: 1,
companyId: this.companyId,
cityId:this.cityId,
recommendType: 1,
}
this.apipost('b2b_get_GetB2BHomeRecommendPageList',msg,r=>{
......
......@@ -373,7 +373,7 @@
</div>
</div>
<div class="tour_right">
<ul class="common_ul_tab">
<ul class="common_ul_tab" style="min-height:32px;">
<li @click="ClickpackageTravel(item,0)" v-for="(item,index) in packageTravel.lineItem" :key="index+50" :class="gotuan.lineId==item.lineId?'li_active':''">{{item.lineShortName}}</li>
<span @click="GoMore('heel')" style="float:right;color:#999999;font-size:12px">查看更多</span>
</ul>
......@@ -775,6 +775,7 @@ export default {
gotuan:{
teamType:0,
lineId:0,
},
TravelPriceList:[],
Travelload:false,
......@@ -830,27 +831,37 @@ export default {
homeTravelSpecialSale:[],
AllTicketList:[],
isLogin:0,
cityId:262,
companyId:0,
};
},
props:['changeCity'],
watch:{
changeCity: {
handler: function(val, oldVal) {
console.log(val)
if(val){
this.InitData()
this.cityId=localStorage.cityId;
this.companyId=parseInt(localStorage.site);
this.NotTuanTravel();
this.Cztm();
}
},
deep: true
},
},
mounted() {},
mounted() {
this.cityId=localStorage.cityId;
this.companyId=parseInt(localStorage.site);
},
created() {
this.loadSize();
this.InitData();
this.isLogin=this.$store.state.isLogin;
},
methods: {
goLocalDes(idDes,obj){
let path = 'detailTwo'
path=`${path}/${encodeURIComponent(idDes)}/${obj.tcid}`;
......@@ -1050,6 +1061,8 @@ export default {
},null)
},
PackageTravel(){
this.gotuan.companyId= this.companyId;
this.gotuan.cityId= this.cityId;
this.Travelload=true;
this.apiJavaPost('/api/b2b/home/getHomeTravelPrice',this.gotuan,res=>{
this.Travelload=false;
......@@ -1061,6 +1074,24 @@ export default {
}
},null)
},
// 站点不是成都时,跟团游筛选项
NotTuanTravel(){
let msg={companyId:this.companyId,cityId:this.cityId};
this.apiJavaPost('/api/b2b/home/getHomeGroupTravelItem',msg,res=>{
if(res.data.resultCode==1){
this.packageTravel=res.data.data;
if(this.packageTravel.lineItem.length>0){
this.gotuan.lineId=this.packageTravel.lineItem[0].lineId;
this.PackageTravel();
}else{
this.TravelPriceList=[];
}
}else{
this.Error(res.data.message);
}
},null)
},
InitData(){
this.PageLoad=true;
this.apiJavaPost('/api/b2b/home/getHomeInitData',{},res=>{
......@@ -1068,6 +1099,8 @@ export default {
if(res.data.resultCode==1){
let data=res.data.data;
this.packageTravel=data.packageTravel;
// 跟团游
if(data.packageTravel.lineItem.length>0){
this.gotuan.lineId=data.packageTravel.lineItem[0].lineId;
this.TravelPriceList=data.packageTravel.lineItem[0].priceList;
......@@ -1113,7 +1146,11 @@ export default {
this.homeTravelSpecialSale=data.homeTravelSpecialSale;
// this.ComputingTime();
}
// 判断当前站点
if(this.companyId!=0){
this.NotTuanTravel();
this.Cztm();
}
}else{
......@@ -1166,6 +1203,8 @@ export default {
let Msg={
pageIndex:1,
pageSize:5,
companyId:this.companyId,
cityId:this.cityId,
};
this.apiJavaPost('/api/b2b/home/getHomeTravelSpecialSale',Msg,res=>{
if(res.data.resultCode==1){
......
......@@ -311,6 +311,7 @@
</el-row>
</template>
<script>
import { location } from "../../assets/utils/getLocation";
import bus from '../../plugins/event-bus'
export default {
data(){
......@@ -323,8 +324,10 @@ export default {
navActive: '',
sites: [],
city: 0,
cityText:'',
}
},methods:{
GoLocalTour(str){
this.$router.push({name: "Localtourhome"});
bus.$emit('Headmsg',str);
......@@ -335,7 +338,14 @@ export default {
},
changeSite(){
window.localStorage.site=this.city
window.localStorage.site=this.city;
console.log(this.city);
this.sites.forEach(item=>{
if(this.city==item.companyId){
window.localStorage.cityId=item.cityId;
}
window.localStorage.site=this.city;
})
this.$emit('siteCity',this.city==0?-1:this.city)
},
loadSites(){
......@@ -344,11 +354,27 @@ export default {
this.apipost(cmd,msg,r=>{
if(r.data.resultCode==1){
this.sites=r.data.data
let cityname=this.cityText.slice(0,this.cityText.length-1);
if(this.sites.length>0){
this.sites.forEach(item=>{
if(item.siteName.indexOf(cityname)!=-1){//出现改字段
this.city=item.companyId;
window.localStorage.site=this.city;
window.localStorage.cityId=item.cityId;
console.log(window.localStorage.cityId)
}else{
}
})
}
this.city=this.sites.length>0?this.city:null
} else {
this.sites=[]
}
window.localStorage.site=this.city
this.$emit('GetCityId',true)
},null)
},
goSearch() {
......@@ -397,13 +423,20 @@ export default {
}
},
},mounted(){
this.loadSites();
},
computed: {
user(){
return this.$store.state.user
},
},created(){
let geolocation = location.initMap("map-container"); //定位
AMap.event.addListener(geolocation, "complete", result => {
if(result.addressComponent.city){
this.cityText=result.addressComponent.city;
}
this.loadSites();
});
if(localStorage.g && localStorage.g!='undefined'){
this.groupInfo = JSON.parse(localStorage.g)
}
......
......@@ -771,6 +771,7 @@ export default {
bus.$on('order-chosen', this.orderChosen)
if(this.$route.query.free){
this.free=1;
this.getAction(3);
}
},
mounted () {
......
......@@ -104,6 +104,7 @@
<el-button size='mini' @click="loadTeamDataInit">确认</el-button>
</div>
</div>
<!-- 列表 -->
<div class="teams" v-loading='isLoading'>
<div class="teams-item" v-for="(item,index) in teamDatas" @mouseover='hoverIndex=index' @mouseout="hoverIndex=-1">
<div class="picbox">
......@@ -182,7 +183,6 @@ export default {
lineChosen:'',
searchItem:[],
keywords:'',
companyId:-1,
lines:[],
xilies:[],
dates:[],
......@@ -200,8 +200,14 @@ export default {
totalCount:0,
isLoading:false,
isLogin:1,
cityId:262,
companyId:0,
}
},
created(){
this.cityId=localStorage.cityId;
this.companyId=parseInt(localStorage.site);
},
mounted () {
this.isLogin=this.$store.state.isLogin;
this.companyId=parseInt(localStorage.site)
......@@ -216,6 +222,20 @@ export default {
this.loadDates()
this.loadDayCount()
},
props:['changeCity'],
watch:{
changeCity: {
handler: function(val, oldVal) {
if(val){
this.cityId=localStorage.cityId;
this.companyId=parseInt(localStorage.site);
this.loadTeamData();
this.loadRecoItems();
}
},
deep: true
},
},
methods: {
goUrl(path,id,tcid){
// detailTwo
......@@ -323,7 +343,7 @@ export default {
pageIndex:this.pageIndex,
pageSize:this.pageSize,
searchKey:this.keywords,
cityId:0,
cityId:this.cityId,
lineId,
lineTeamId,
minTripDay,
......@@ -412,9 +432,10 @@ export default {
})
}
},
// 系列
loadRecoItems(){
if(this.companyId!=-1){
this.apipost('b2b_get_GetGroupSearchItem',{'companyId':this.companyId},r=>{
this.apipost('b2b_get_GetGroupSearchItem',{'companyId':this.companyId,cityId:this.cityId},r=>{
console.log(r)
this.lines=r.data.data.line
......
......@@ -365,6 +365,7 @@ export default {
if(res.data.resultCode==1){
that.Success(res.data.message);
sessionStorage.Visainfo=JSON.stringify(res.data.data)
this.getAction(2);
this.$router.push({
name: "Pay",
query: {
......
......@@ -296,6 +296,7 @@ export default {
};
},
created(){
this.getAction(1);
if(this.$route.query.productId){
this.productId=decodeURIComponent(this.$route.query.productId);
this.GetDetails();
......
......@@ -168,6 +168,7 @@ export default {
}
},
created(){
this.getAction(1);
this.isLogin=this.$store.state.isLogin;
if(this.$route.query.searchKey){
this.listmsg.searchKey=this.$route.query.searchKey;
......
......@@ -19,7 +19,7 @@ export default {
let domainUrl = "https://reborn.oytour.com";
// domainUrl = "http://test.viitto.com"
domainUrl = "http://192.168.2.214:8082"
domainUrl = "http://test.viitto.com"
// domainUrl = "http://test.viitto.com"
let locationName = window.location.hostname;
if (this.isOnline()) {
if (window.location.host.indexOf('viitto.com') != -1)
......@@ -37,6 +37,17 @@ export default {
UploadUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('viitto') !== -1 ? "http://upload.oytour.com" : "http://192.168.2.214:8120",
LocalFileStreamDownLoadUrl: domainUrl + "/api/file/GetFileFromWebApi",
};
// domainUrl = "https://reborn.oytour.com"
// var obj = {
// //主地址
// DomainUrl: domainUrl,
// //常用提交数据URL
// PostUrl: domainUrl + "/api/common/post",
// javaUrl: "http://efficient.oytour.com",
// ViittoFileUrl:"http://imgfile.oytour.com",
// UploadUrl: "http://upload.oytour.com",
// LocalFileStreamDownLoadUrl: domainUrl + "/api/file/GetFileFromWebApi",
// };
return obj;
},
Vue.prototype.GetLocalFile = function (cmd, msg, fileName, successCall) {
......@@ -187,7 +198,8 @@ export default {
"sign": md5Str
}
if (localStorage.g && localStorage.g != 'undefined') {
postData.groupId = parseInt(JSON.parse(localStorage.g).i)
// postData.groupId = parseInt(JSON.parse(localStorage.g).i)
postData.groupId=2;
}
this.$http.post(apiurl, postData, {
headers: {
......@@ -232,7 +244,8 @@ export default {
"sign": md5Str
}
if (localStorage.g && localStorage.g != 'undefined') {
postData.groupId = parseInt(JSON.parse(localStorage.g).i)
// postData.groupId = parseInt(JSON.parse(localStorage.g).i)
postData.groupId=2;
}
this.$http.post(apiurl, postData, {
headers: {
......@@ -255,6 +268,26 @@ export default {
}
}, faildCall)
},
Vue.prototype.getAction = function(actionId,lineId){
if(actionId==1){
console.log("浏览签证产品",actionId)
}
console.log("lineId",lineId)
let msg={};
msg.actionId=actionId;
if(lineId){
msg.lineId=lineId;
}
this.apiJavaPost('/api/b2b/home/getSpecialAction',msg,res=>{
this.Travelload=false;
if(res.data.resultCode==1){
}else{
this.Error(res.data.message);
}
},null)
}
//验证只能输入2位小数
Vue.prototype.checkPrice = function (item, filed) {
......
......@@ -5,10 +5,10 @@
<template>
<div class="home-box" v-if="isPhone">
<!-- <mallHead msg="" @forword='goUrl("2-1")' @siteCity="siteCity"/> -->
<newHead @siteCity="siteCity"/>
<newHead @siteCity="siteCity" @GetCityId="GetCityId"/>
<div :style='{"min-height":minHeight+"px"}'>
<transition name="slide">
<router-view :changeCity='changeCity'></router-view>
<router-view v-if="CityId" :changeCity='changeCity'></router-view>
</transition>
</div>
<foot />
......@@ -32,6 +32,7 @@ export default {
minHeight:0,
changeCity:null,
isPhone:false,
CityId:false,
}
},watch: { // 监听参数变化
changeCity: {
......@@ -64,6 +65,9 @@ export default {
return this.isPhone;
},
methods: {
GetCityId(val){
this.CityId=true;
},
siteCity(key) {
// console.log(key+'methods')
this.changeCity = key;
......
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