航班明细航线全称显示
This commit is contained in:
@@ -1143,10 +1143,12 @@ onmessage = function (dynamicData) {
|
||||
//航线处理
|
||||
let erutCodeArray = item['renderFlight']['ERUT'].split(' - ');
|
||||
let erutChnArray = []
|
||||
let erutAirportArray = []
|
||||
for (let i = 0; i < erutCodeArray.length; i++) {
|
||||
try {
|
||||
let airportIndex = airports.findIndex(val => val.airportCodeIata === erutCodeArray[i]);
|
||||
if (airportIndex > -1) {
|
||||
erutAirportArray.push(airports[airportIndex].airportNameChn);
|
||||
if (airports[airportIndex].briefNameChn) {
|
||||
erutChnArray.push(airports[airportIndex].briefNameChn);
|
||||
} else {
|
||||
@@ -1159,6 +1161,7 @@ onmessage = function (dynamicData) {
|
||||
erutChnArray.push(erutCodeArray[i]);
|
||||
}
|
||||
}
|
||||
item['renderFlight']['ERUTCHN'] = erutAirportArray.join(' - ');
|
||||
item['renderFlight']['ERUT'] = erutChnArray.join(' - ');
|
||||
//航空公司处理
|
||||
let airlineIndex = airlines.findIndex(val => val.airlineCode === item['renderFlight']['ALCD']);
|
||||
@@ -1171,10 +1174,12 @@ onmessage = function (dynamicData) {
|
||||
//航线处理
|
||||
let erutLinkCodeArray = item['renderFlight']['ERUT'].split(' - ');
|
||||
let erutLinkChnArray = []
|
||||
let erutLinkAirportArray = [];
|
||||
for (let i = 0; i < erutLinkCodeArray.length; i++) {
|
||||
try {
|
||||
let airportIndex = airports.findIndex(val => val.airportCodeIata === erutLinkCodeArray[i]);
|
||||
if (airportIndex > -1) {
|
||||
erutLinkAirportArray.push(airports[airportIndex].airportNameChn);
|
||||
if (airports[airportIndex].briefNameChn) {
|
||||
erutLinkChnArray.push(airports[airportIndex].briefNameChn);
|
||||
} else {
|
||||
@@ -1187,6 +1192,7 @@ onmessage = function (dynamicData) {
|
||||
erutLinkChnArray.push(erutLinkCodeArray[i]);
|
||||
}
|
||||
}
|
||||
item['renderFlight']['ERUTCHN'] = erutLinkAirportArray.join(' - ');
|
||||
item['renderFlight']['ERUT'] = erutLinkChnArray.join(' - ');
|
||||
//航空公司处理
|
||||
let airlineLinkIndex = airlines.findIndex(val => val.airlineCode === item['renderFlight']['ALCD']);
|
||||
@@ -1210,10 +1216,12 @@ onmessage = function (dynamicData) {
|
||||
//航线处理
|
||||
let erutPreCodeArray = item['renderPreFlight']['ERUT'].split(' - ');
|
||||
let erutPreChnArray = []
|
||||
let erutPreAirportArray = [];
|
||||
for (let i = 0; i < erutPreCodeArray.length; i++) {
|
||||
try {
|
||||
let airportIndex = airports.findIndex(val => val.airportCodeIata === erutPreCodeArray[i]);
|
||||
if (airportIndex > -1) {
|
||||
erutPreAirportArray.push(airports[airportIndex].airportNameChn);
|
||||
if (airports[airportIndex].briefNameChn) {
|
||||
erutPreChnArray.push(airports[airportIndex].briefNameChn);
|
||||
} else {
|
||||
@@ -1226,6 +1234,7 @@ onmessage = function (dynamicData) {
|
||||
erutPreChnArray.push(erutPreCodeArray[i]);
|
||||
}
|
||||
}
|
||||
item['renderPreFlight']['ERUTCHN'] = erutPreAirportArray.join(' - ');
|
||||
item['renderPreFlight']['ERUT'] = erutPreChnArray.join(' - ');
|
||||
//航空公司处理
|
||||
let airlinePreIndex = airlines.findIndex(val => val.airlineCode === item['renderPreFlight']['ALCD']);
|
||||
@@ -1238,11 +1247,13 @@ onmessage = function (dynamicData) {
|
||||
|
||||
//航线处理
|
||||
let erutReaCodeArray = item['renderReaFlight']['ERUT'].split(' - ');
|
||||
let erutReaChnArray = []
|
||||
let erutReaChnArray = [];
|
||||
let erutReaAirportArray = [];
|
||||
for (let i = 0; i < erutReaCodeArray.length; i++) {
|
||||
try {
|
||||
let airportIndex = airports.findIndex(val => val.airportCodeIata === erutReaCodeArray[i]);
|
||||
if (airportIndex > -1) {
|
||||
erutReaAirportArray.push(airports[airportIndex].airportNameChn);
|
||||
if (airports[airportIndex].briefNameChn) {
|
||||
erutReaChnArray.push(airports[airportIndex].briefNameChn);
|
||||
} else {
|
||||
@@ -1255,6 +1266,7 @@ onmessage = function (dynamicData) {
|
||||
erutReaChnArray.push(erutReaCodeArray[i]);
|
||||
}
|
||||
}
|
||||
item['renderReaFlight']['ERUTCHN'] = erutReaAirportArray.join(' - ');
|
||||
item['renderReaFlight']['ERUT'] = erutReaChnArray.join(' - ');
|
||||
//航空公司处理
|
||||
let airlineReaIndex = airlines.findIndex(val => val.airlineCode === item['renderReaFlight']['ALCD']);
|
||||
|
||||
Reference in New Issue
Block a user