Commit ed8a1558 authored by 黄奎's avatar 黄奎

页面修改

parent bff9a50c
......@@ -23,17 +23,21 @@
changeText: function () {
let sel = window.getSelection();
let offset = sel.anchorOffset;
if (this.textLength&&this.$el.innerText.length > this.textLength) {
if (this.textLength && this.$el.innerText.length > this.textLength) {
this.$el.innerText = this.$el.innerText.slice(0, this.textLength);
}
this.$emit("input", this.$el.innerText);
setTimeout(() => {
var range = sel.getRangeAt(0);
var textNode = range.startContainer;
console.log("textNode",textNode.nodeName);
range.setStart(textNode, offset);
sel.removeAllRanges();
sel.addRange(range);
try {
var range = sel.getRangeAt(0);
var textNode = range.startContainer;
console.log("textNode", textNode.nodeName);
range.setStart(textNode, offset);
sel.removeAllRanges();
sel.addRange(range);
} catch (err) {
console.log(err);
}
}, 0);
}
}
......
......@@ -122,7 +122,6 @@
},
//添加页面
AddPages(index, featureDataObj) {
var pageData = this.getPageObj();
pageData.isDeletePage = true;
pageData.pageType = featureDataObj.pageType;
......@@ -153,7 +152,7 @@
} else {
newObj.DetailsName = "景点介绍";
newObj.ImgList = [{
url: "http://imgfile.oytour.com//Static/NewTripFeature/homeBg1.jpg"
url: "http://imgfile.oytour.com//Static/NewTripFeature/homeBg2.jpg"
}];
newObj.MainDesc = "景点描述";
}
......@@ -184,10 +183,13 @@
var oldJson = this.FeatureData.FeatureHtmlJson ?
JSON.parse(JSON.stringify(this.FeatureData.FeatureHtmlJson)) :
"";
console.log("oldJson", oldJson);
if (oldJson && oldJson.length > 0) {
console.log("oldJson", oldJson);
this.pageList = oldJson;
} else {
var tripObj = this.getTripData();
console.log("tropObj", tripObj);
this.pageList.forEach(pItem => {
var newObj = this.getDetailsObj();
newObj.LineName = this.FeatureData.LineName;
......@@ -215,7 +217,7 @@
} else {
newObj.DetailsName = "景点介绍";
newObj.ImgList = [{
url: "http://imgfile.oytour.com//Static/NewTripFeature/homeBg1.jpg"
url: "http://imgfile.oytour.com/Static/NewTripFeature/homeBg2.jpg"
}];
newObj.MainDesc = "景点描述";
}
......@@ -225,19 +227,28 @@
newObj.MainName = "日本旅行专家";
newObj.SubName = "『印象日本』日本豪华游代名词";
newObj.ImgList = [{
url: "http://imgfile.oytour.com/Upload/DMC/a2Fn2zajwMsxNHaWPdD5idKJD8RyCG5H.jpg"
url: "http://imgfile.oytour.com/Static/NewTripFeature/homeBg1.jpg"
}];
newObj.MainDesc = "描述信息";
}
//详情页面
else if (pItem.pageType == 3) {
var dinnerObj = {
MainName: "特色餐1",
MainName: "行程特色餐1",
ImgList: [{
url: "http://imgfile.oytour.com/Upload/DMC/a2Fn2zajwMsxNHaWPdD5idKJD8RyCG5H.jpg"
url: "http://imgfile.oytour.com/Static/NewTripFeature/dinner1.jpg"
}],
MainDesc: "特色餐描述"
MainDesc: "行程特色餐1描述"
};
var dinnerObj2 = JSON.parse(JSON.stringify(dinnerObj));
dinnerObj2.MainName = "行程特色餐2";
dinnerObj2.ImgList[0].url = "http://imgfile.oytour.com/Static/NewTripFeature/dinner2.jpg"
dinnerObj2.MainDesc = "行程特色餐2描述";
var dinnerObj3 = JSON.parse(JSON.stringify(dinnerObj));
dinnerObj3.MainName = "行程特色餐3";
dinnerObj3.ImgList[0].url = "http://imgfile.oytour.com/Static/NewTripFeature/dinner3.jpg"
dinnerObj3.MainDesc = "行程特色餐3描述";
if (tripObj.dinnerArray && tripObj.dinnerArray.length > 0) {
if (tripObj.dinnerArray.length > 2) {
tripObj.dinnerArray.forEach((dItem, dIndex) => {
......@@ -261,8 +272,7 @@
MainDesc: dItem.MainDesc
});
})
newObj.SubList.push(dinnerObj);
newObj.SubList.push(dinnerObj2);
} else if (tripObj.dinnerArray.length > 0) {
tripObj.dinnerArray.forEach(dItem => {
var tempImaList = dItem.ImgList;
......@@ -274,9 +284,13 @@
MainDesc: dItem.MainDesc
});
})
newObj.SubList.push(dinnerObj);
newObj.SubList.push(dinnerObj);
newObj.SubList.push(dinnerObj2);
newObj.SubList.push(dinnerObj3);
}
} else {
newObj.SubList.push(dinnerObj);
newObj.SubList.push(dinnerObj2);
newObj.SubList.push(dinnerObj3);
}
}
//酒店
......@@ -289,9 +303,14 @@
} else {
newObj.MainName = "行程酒店";
newObj.ImgList = [{
url: "https://imgfile.oytour.com/Upload/DMC/202305290204327370000000012.jpg"
url: "https://imgfile.oytour.com/Static/NewTripFeature/homeBg1.jpg"
}];
newObj.MainDesc = "行程酒店描述信息";
newObj.SubList = [{
url: "https://imgfile.oytour.com/Static/NewTripFeature/homeBg3.jpg"
}, {
url: "https://imgfile.oytour.com/Static/NewTripFeature/homeBg3.jpg"
}];
}
} //餐
else if (pItem.pageType == 5) {
......@@ -303,9 +322,14 @@
} else {
newObj.MainName = "行程餐食";
newObj.ImgList = [{
url: "http://imgfile.oytour.com/Upload/DMC/Z4DbAPRPmBPkaJQyxwesEWAz3sbZadNj.jpg"
url: "https://imgfile.oytour.com/Static/NewTripFeature/dinner4.jpg"
}];
newObj.MainDesc = "行程餐食描述";
newObj.SubList = [{
url: "https://imgfile.oytour.com/Static/NewTripFeature/homeBg3.jpg"
}, {
url: "https://imgfile.oytour.com/Static/NewTripFeature/homeBg3.jpg"
}];
}
}
//景点
......@@ -313,27 +337,26 @@
newObj.SubName = "特色景点";
if (tripObj.scenicArray && tripObj.scenicArray.length > 0) {
newObj.MainName = tripObj.scenicArray[0].MainName;
newObj.ImgList = tripObj.scenicArray[0].ImgList;
newObj.MainDesc = tripObj.scenicArray[0].MainDesc;
if (tripObj.scenicArray[0])
newObj.ImgList =
newObj.MainDesc = tripObj.scenicArray[0].MainDesc;
} else {
newObj.MainName = "行程景点";
newObj.ImgList = [{
url: "http://imgfile.oytour.com/Upload/DMC/20200201061804955.jpg"
url: "https://imgfile.oytour.com/Static/NewTripFeature/homeBg1.jpg"
}];
newObj.MainDesc = "行程景点描述信息";
newObj.SubList = [{
url: "https://imgfile.oytour.com/Static/NewTripFeature/homeBg3.jpg"
}, {
url: "https://imgfile.oytour.com/Static/NewTripFeature/homeBg3.jpg"
}];
}
}
if (pItem.pageType == 4 || pItem.pageType == 5 || pItem.pageType == 6) {
newObj.SubList = [{
url: ''
}, {
url: ''
}]
}
pItem.dataObj = newObj;
});
}
},
//获取行程信息
getTripData() {
......@@ -341,6 +364,7 @@
var scenicArray = [];
var hotelArray = [];
var dinnerArray = [];
console.log("this.FeatureData.DayList", this.FeatureData.DayList);
if (this.FeatureData && this.FeatureData.DayList && this.FeatureData.DayList.length > 0) {
this.FeatureData.DayList.forEach(dItem => {
//城市
......@@ -379,10 +403,11 @@
}
});
}
if (dItem.HotelArray && dItem.HotelArray.length > 0) {
dItem.HotelArray.forEach(sItem => {
//排除“温馨的家”和“机场附近酒店”
if (sItem.HotelId != 1568 && sItem.HotelId != 2353) {
if (sItem.HotelId && sItem.HotelId > 0 && sItem.HotelId != 1568 && sItem.HotelId != 2353) {
var tempImgList = [];
if (sItem.ImaArray && sItem.ImaArray.length > 0) {
sItem.ImaArray.forEach(iItem => {
......
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