Commit 032b1f9a authored by 黄奎's avatar 黄奎

页面修改

parent e78cbf11
...@@ -156,7 +156,8 @@ ...@@ -156,7 +156,8 @@
if (JSON.stringify(oldJson) !== "{}" && oldJson) { if (JSON.stringify(oldJson) !== "{}" && oldJson) {
} else { } else {
this.getTripData(); var tripObj = this.getTripData();
console.log("tripObj", tripObj);
this.pageList.forEach(pItem => { this.pageList.forEach(pItem => {
var newObj = this.getDetailsObj(); var newObj = this.getDetailsObj();
newObj.LineName = this.FeatureData.LineName; newObj.LineName = this.FeatureData.LineName;
...@@ -165,16 +166,24 @@ ...@@ -165,16 +166,24 @@
newObj.LineShortName = this.FeatureData.LineShortName; newObj.LineShortName = this.FeatureData.LineShortName;
//首页 //首页
if (pItem.pageType == 1) { if (pItem.pageType == 1) {
newObj.MainName = "大阪 京都 富士山 伊豆 都 H"; //地区1 newObj.MainName = tripObj.cityStr; //地区1
newObj.SubName = "冲绳 大阪城公园湖 伊豆 H"; //地区2 newObj.SubName = tripObj.cityStr2; //地区2
newObj.DetailsName = "浅草寺 Senso-ji Temple"; if (tripObj.scenicArray && tripObj.scenicArray.length > 0) {
newObj.ShadowName = "遇见最美好的自己"; newObj.DetailsName = tripObj.scenicArray[0].MainName;
newObj.SubShadowName = "在古老的日本樱花街道"; newObj.ShadowName = "遇见最美好的自己";
newObj.ImgList = [{ newObj.SubShadowName = "在古老的日本樱花街道";
url: "http://imgfile.oytour.com/Upload/DMC/DsrkBYw5MnQnzk2WzksZ4knrrKFbeP3a.jpg" newObj.ImgList = tripObj.scenicArray[0].ImgList;
}]; newObj.MainDesc = tripObj.scenicArray[0].MainDesc;
newObj.MainDesc = } else {
"东京最著名、最古老的寺庙,也是日本的门脸、浅草的象征。频繁的庙会活动让你零距离感受日本江户风俗。据说寺内有一座在公元628年偶然被当地渔民打捞上来的观音金像,每年都有许多人前来寺庙祈福保平安。院内有雷门、五重塔等著名古迹;还有90余家商铺的仲见世商店街,可以买到当地特产和吉祥物。在浅草寺可以求签问凶吉,如果不走运抽到了“凶”,和当地人一样系在抽签的地方就可以驱散霉运了。"; newObj.DetailsName = "浅草寺 Senso-ji Temple";
newObj.ShadowName = "遇见最美好的自己";
newObj.SubShadowName = "在古老的日本樱花街道";
newObj.ImgList = [{
url: "http://imgfile.oytour.com/Upload/DMC/DsrkBYw5MnQnzk2WzksZ4knrrKFbeP3a.jpg"
}];
newObj.MainDesc =
"东京最著名、最古老的寺庙,也是日本的门脸、浅草的象征。频繁的庙会活动让你零距离感受日本江户风俗。据说寺内有一座在公元628年偶然被当地渔民打捞上来的观音金像,每年都有许多人前来寺庙祈福保平安。院内有雷门、五重塔等著名古迹;还有90余家商铺的仲见世商店街,可以买到当地特产和吉祥物。在浅草寺可以求签问凶吉,如果不走运抽到了“凶”,和当地人一样系在抽签的地方就可以驱散霉运了。";
}
} }
//介绍页面 //介绍页面
else if (pItem.pageType == 2) { else if (pItem.pageType == 2) {
...@@ -188,6 +197,9 @@ ...@@ -188,6 +197,9 @@
} }
//详情页面 //详情页面
else if (pItem.pageType == 3) { else if (pItem.pageType == 3) {
if (tripObj.dinnerArray && tripObj.dinnerArray.length > 0) {
}
var dinnerObj = { var dinnerObj = {
MainName: "特色餐1", MainName: "特色餐1",
ImgList: [{ ImgList: [{
...@@ -195,20 +207,29 @@ ...@@ -195,20 +207,29 @@
}], }],
MainDesc: "特色餐描述" MainDesc: "特色餐描述"
}; };
newObj.SubList.push(dinnerObj); newObj.SubList.push(dinnerObj);
newObj.SubList.push(dinnerObj); newObj.SubList.push(dinnerObj);
newObj.SubList.push(dinnerObj); newObj.SubList.push(dinnerObj);
} }
//酒店 //酒店
else if (pItem.pageType == 4) { else if (pItem.pageType == 4) {
newObj.MainName = "富士山花园酒店"; if (tripObj.hotelArray && tripObj.hotelArray.length > 0) {
newObj.SubName = "特色酒店"; newObj.MainName = tripObj.hotelArray[0].MainName;
newObj.ImgList = [{ newObj.SubName = "特色酒店";
url: "https://imgfile.oytour.com/Upload/DMC/202305290204327370000000012.jpg" newObj.ImgList = tripObj.hotelArray[0].ImgList;
}]; newObj.MainDesc = tripObj.hotelArray[0].MainDesc;
newObj.MainDesc = "新大谷INN东京位于山手线大崎车站徒步一分钟,离品川,涉谷,原宿,都非常近,方便购物 观光,酒店房间干净 舒适,"; } else {
newObj.MainName = "富士山花园酒店";
newObj.SubName = "特色酒店";
newObj.ImgList = [{
url: "https://imgfile.oytour.com/Upload/DMC/202305290204327370000000012.jpg"
}];
newObj.MainDesc = "新大谷INN东京位于山手线大崎车站徒步一分钟,离品川,涉谷,原宿,都非常近,方便购物 观光,酒店房间干净 舒适,";
}
} //餐 } //餐
else if (pItem.pageType == 5) { else if (pItem.pageType == 5) {
newObj.MainName = "箱根湖畔日式料理"; newObj.MainName = "箱根湖畔日式料理";
newObj.SubName = "特色餐食"; newObj.SubName = "特色餐食";
newObj.ImgList = [{ newObj.ImgList = [{
...@@ -234,8 +255,12 @@ ...@@ -234,8 +255,12 @@
//获取行程信息 //获取行程信息
getTripData() { getTripData() {
var cityArray = []; var cityArray = [];
var scenicArray = [];
var hotelArray = [];
var dinnerArray = [];
if (this.FeatureData && this.FeatureData.DayList && this.FeatureData.DayList.length > 0) { if (this.FeatureData && this.FeatureData.DayList && this.FeatureData.DayList.length > 0) {
this.FeatureData.DayList.forEach(dItem => { this.FeatureData.DayList.forEach(dItem => {
//城市
if (dItem.TrafficObj && dItem.TrafficObj.SubTraffic && dItem.TrafficObj.SubTraffic.length > 0) { if (dItem.TrafficObj && dItem.TrafficObj.SubTraffic && dItem.TrafficObj.SubTraffic.length > 0) {
dItem.TrafficObj.SubTraffic.forEach(tItem => { dItem.TrafficObj.SubTraffic.forEach(tItem => {
if (tItem.StartCityName && tItem.StartCityName != '' && !cityArray.includes(tItem if (tItem.StartCityName && tItem.StartCityName != '' && !cityArray.includes(tItem
...@@ -248,13 +273,99 @@ ...@@ -248,13 +273,99 @@
} }
}); });
} }
//景点
if (dItem.ScenicArray && dItem.ScenicArray.length > 0) {
dItem.ScenicArray.forEach(sItem => {
var tempImgList = [];
if (sItem.NewImaArray && sItem.NewImaArray.length > 0) {
sItem.NewImaArray.forEach(iItem => {
tempImgList.push({
url: iItem.Url
});
})
}
var sObj = {
MainName: sItem.CouponsName,
MainDesc: sItem.Description,
ImgList: tempImgList,
SourceType: 6
}
var temoScenic = scenicArray.find(x => x.MainName == sObj.MainName)
if (!temoScenic) {
scenicArray.push(sObj)
}
});
}
if (dItem.HotelArray && dItem.HotelArray.length > 0) {
dItem.HotelArray.forEach(sItem => {
var tempImgList = [];
if (sItem.ImaArray && sItem.ImaArray.length > 0) {
sItem.ImaArray.forEach(iItem => {
tempImgList.push({
url: iItem.Url
});
})
}
var hObj = {
MainName: sItem.HotelName,
MainDesc: sItem.Description,
ImgList: tempImgList,
SourceType: 4
}
var tempHotel = hotelArray.find(x => x.MainName == hObj.MainName)
if (!tempHotel) {
hotelArray.push(hObj);
}
});
}
if (dItem.DinnerArray && dItem.DinnerArray.length > 0) {
dItem.DinnerArray.forEach(sItem => {
if (sItem.DinnerId > 0) {
var tempImgList = [];
if (sItem.ImaArray && sItem.ImaArray.length > 0) {
sItem.ImaArray.forEach(iItem => {
tempImgList.push({
url: iItem.Url
});
})
}
var dObj = {
MainName: sItem.DinnerName,
MainDesc: sItem.Description,
ImgList: tempImgList,
SourceType: 5
};
var tempDinner = dinnerArray.find(x => x.MainName == dObj.MainName)
if (!tempDinner) {
dinnerArray.push(dObj)
}
}
});
}
}); });
} }
var cityStr = "";
var cityStr2 = "";
var cityArray1 = [];
var cityArray2 = [];
if (cityArray && cityArray.length > 0) { if (cityArray && cityArray.length > 0) {
var num = cityArray.length / 2; var num = cityArray.length / 2;
console.log("num", num) for (var i = 0; i < num; i++) {
cityArray1.push(cityArray[i]);
}
cityStr = cityArray1.join(" ");
for (var j = num; j < cityArray.length; j++) {
cityArray2.push(cityArray[j]);
}
cityStr2 = cityArray2.join(" ");
}
return {
cityStr,
cityStr2,
hotelArray,
scenicArray,
dinnerArray,
} }
console.log("cityArray,", cityArray);
} }
}, },
computed: { computed: {
......
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