Commit e3504ff2 authored by 黄奎's avatar 黄奎

页面修改

parent 2b5daf78
...@@ -6,7 +6,8 @@ import md5 from 'js-md5' ...@@ -6,7 +6,8 @@ import md5 from 'js-md5'
Vue.prototype.domainManager = function () { Vue.prototype.domainManager = function () {
let domainUrl = ''; let domainUrl = '';
domainUrl = "http://192.168.2.214:8082"; domainUrl = "http://192.168.2.214:8082";
domainUrl = "http://192.168.0.110"; domainUrl = "http://127.0.0.1";
//domainUrl = "http://reborn.oytour.com";
//let locationName = location.hostname; //let locationName = location.hostname;
// if (locationName.indexOf('testerp.oytour') !== -1) { // if (locationName.indexOf('testerp.oytour') !== -1) {
// domainUrl = "http://testapi.oytour.com"; // domainUrl = "http://testapi.oytour.com";
...@@ -161,24 +162,28 @@ Vue.prototype.formatDate = function (year, month, day) { ...@@ -161,24 +162,28 @@ Vue.prototype.formatDate = function (year, month, day) {
} }
//格式化日期二 //格式化日期二
Vue.prototype.formatDate2=function(dateStr) Vue.prototype.formatDate2 = function (dateStr) {
{ var date = new Date(dateStr);
var date=new Date(dateStr);
return { return {
CYear:date.getFullYear(), CYear: date.getFullYear(),
CMonth:(date.getMonth()+1), CMonth: (date.getMonth() + 1),
CDay:date.getDate(), CDay: date.getDate(),
} }
} }
//添加月份 //添加月份
Vue.prototype.AddMonth=function(dateStr,month) Vue.prototype.AddMonth = function (dateStr, month) {
{
var v = new Date(dateStr); var v = new Date(dateStr);
if (v) { if (v) {
var t = new Date(v.getFullYear(), v.getMonth(), v.getDate(), v.getHours(), v.getMinutes(), v.getSeconds(), v.getMilliseconds()); var t = new Date(v.getFullYear(), v.getMonth(), v.getDate(), v.getHours(), v.getMinutes(), v.getSeconds(), v.getMilliseconds());
t.setMonth(v.getMonth() + month); t.setMonth(v.getMonth() + month);
if (t.getDate() != v.getDate()) { t.setDate(0); } if (t.getDate() != v.getDate()) {
t.setDate(0);
}
return t; return t;
} }
} }
Vue.prototype.getUrlKey = function (name, url) {
return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(url) || [, ""])[1].replace(/\+/g, '%20')) || null
}
...@@ -273,7 +273,7 @@ ...@@ -273,7 +273,7 @@
tl: "", tl: "",
ful: "" ful: ""
}, },
RB_Group_Id:0, RB_Group_Id: 0,
}; };
}, },
mounted() { mounted() {
...@@ -352,17 +352,22 @@ ...@@ -352,17 +352,22 @@
this.showCompPannel = false; this.showCompPannel = false;
}, },
goSearchHandler() { goSearchHandler() {
if (this.searchKey == "") { // if (this.searchKey == "") {
this.$q.notify({ // this.$q.notify({
color: "negative", // color: "negative",
textColor: "#FFF", // textColor: "#FFF",
icon: "report_problem", // icon: "report_problem",
message: "尊敬的客人,請選擇一個目的地吧", // message: "尊敬的客人,請選擇一個目的地吧",
position: "top", // position: "top",
timeout: 3000 // timeout: 3000
}); // });
} // }
this.CommonJump('/search', {})
this.CommonJump('/search', {
qsearchKey: this.searchKey,
qsearchDate: this.searchDate,
qsearchEndDate: this.searchEndDate,
})
} }
} }
}; };
......
...@@ -354,17 +354,21 @@ ...@@ -354,17 +354,21 @@
this.showCompPannel = false; this.showCompPannel = false;
}, },
goSearchHandler() { goSearchHandler() {
if (this.searchKey == "") { // if (this.searchKey == "") {
this.$q.notify({ // this.$q.notify({
color: "negative", // color: "negative",
textColor: "#FFF", // textColor: "#FFF",
icon: "report_problem", // icon: "report_problem",
message: "尊敬的客人,請選擇一個目的地吧", // message: "尊敬的客人,請選擇一個目的地吧",
position: "top", // position: "top",
timeout: 3000 // timeout: 3000
}); // });
} // }
this.CommonJump('/search', {}) this.CommonJump('/search', {
qsearchKey: this.searchKey,
qsearchDate: this.searchDate,
qsearchEndDate: this.searchEndDate,
})
} }
} }
}; };
......
...@@ -273,7 +273,7 @@ ...@@ -273,7 +273,7 @@
tl: "", tl: "",
ful: "" ful: ""
}, },
RB_Group_Id:0, RB_Group_Id: 0,
}; };
}, },
mounted() { mounted() {
...@@ -302,7 +302,7 @@ ...@@ -302,7 +302,7 @@
getAera() { getAera() {
this.apipost( this.apipost(
"ws_get_GetSearchArea", { "ws_get_GetSearchArea", {
RB_Group_Id:this.RB_Group_Id RB_Group_Id: this.RB_Group_Id
}, },
res => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
...@@ -357,17 +357,21 @@ ...@@ -357,17 +357,21 @@
this.showCompPannel = false; this.showCompPannel = false;
}, },
goSearchHandler() { goSearchHandler() {
if (this.searchKey == "") { // if (this.searchKey == "") {
this.$q.notify({ // this.$q.notify({
color: "negative", // color: "negative",
textColor: "#FFF", // textColor: "#FFF",
icon: "report_problem", // icon: "report_problem",
message: "尊敬的客人,請選擇一個目的地吧", // message: "尊敬的客人,請選擇一個目的地吧",
position: "top", // position: "top",
timeout: 3000 // timeout: 3000
}); // });
} // }
this.CommonJump('/search', {}) this.CommonJump('/search', {
qsearchKey: this.searchKey,
qsearchDate: this.searchDate,
qsearchEndDate: this.searchEndDate,
})
} }
} }
}; };
......
...@@ -638,11 +638,13 @@ ...@@ -638,11 +638,13 @@
</div> </div>
</div> </div>
{{ShowType}}
<template v-if="ShowType==0"> <template v-if="ShowType==0">
<!--豆腐格-->
<searchBlock :DataList="DataList" :PageCount="PageCount"></searchBlock> <searchBlock :DataList="DataList" :PageCount="PageCount"></searchBlock>
</template> </template>
<template v-else> <template v-else>
<!--列表-->
<searchList :DataList="DataList" :PageCount="PageCount"></searchList> <searchList :DataList="DataList" :PageCount="PageCount"></searchList>
</template> </template>
...@@ -863,8 +865,24 @@ ...@@ -863,8 +865,24 @@
//行程列表 //行程列表
DataList: [], DataList: [],
PageCount: 0, PageCount: 0,
TotalCount: 0,
}; };
}, },
created() {
var qsearchKey = this.getUrlKey("qsearchKey", window.location.href);
var qsearchDate = this.getUrlKey("qsearchDate", window.location.href);
var qsearchEndDate = this.getUrlKey("qsearchEndDate", window.location.href);
if (qsearchKey) {
this.qMsg.searchKey = qsearchKey;
}
if (qsearchDate) {
this.qMsg.startDate = qsearchDate;
}
if (qsearchEndDate) {
this.qMsg.endDate = qsearchEndDate;
}
},
mounted() { mounted() {
if (localStorage.baseifo) { if (localStorage.baseifo) {
var jObj = JSON.parse(localStorage.baseifo); var jObj = JSON.parse(localStorage.baseifo);
...@@ -873,7 +891,6 @@ ...@@ -873,7 +891,6 @@
} else { } else {
this.getAera() this.getAera()
} }
document.addEventListener("click", this.clickHandler); document.addEventListener("click", this.clickHandler);
}, },
methods: { methods: {
...@@ -916,16 +933,18 @@ ...@@ -916,16 +933,18 @@
this.showSplitPannel = false; this.showSplitPannel = false;
} }
}, },
chosenAreaHandler() { chosenAreaHandler(name) {
this.qMsg.searchKey = name; this.qMsg.searchKey = name;
this.showSplitPannel = false; this.showSplitPannel = false;
}, },
goSearchHandler() { goSearchHandler() {
console.log("this.qMsg",this.qMsg);
this.apipost( this.apipost(
"b2b_get_GetB2BTravelPageList", this.qMsg, "b2b_get_GetB2BTravelPageList", this.qMsg,
res => { 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.total;
var tempArray = res.data.data.pageData; var tempArray = res.data.data.pageData;
if (tempArray && tempArray.length > 0) { if (tempArray && tempArray.length > 0) {
tempArray.forEach(item => { tempArray.forEach(item => {
...@@ -937,8 +956,7 @@ ...@@ -937,8 +956,7 @@
} else { } else {
item.newCoverImg = ""; item.newCoverImg = "";
} }
} catch (e) { } catch (e) {}
}
} }
}); });
this.DataList = tempArray; this.DataList = tempArray;
......
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