列車情報の頭に記載する列車名をサーバーから動的に取得変更可能に
This commit is contained in:
@@ -1,6 +1,19 @@
|
||||
import dayjs from "dayjs";
|
||||
export const customTrainDataDetector = (TrainNumber: string) => {
|
||||
const trainGetText = `?trainNum=${TrainNumber}&month=${dayjs().format("M")}&day=${dayjs().format("D")}`;
|
||||
export const customTrainDataDetector = (
|
||||
TrainNumber: string,
|
||||
allCustonTrainData?: any[]
|
||||
) => {
|
||||
if (allCustonTrainData && allCustonTrainData.length > 0) {
|
||||
const customTrain = allCustonTrainData.find(
|
||||
(train) => train.TrainNumber === TrainNumber
|
||||
);
|
||||
if (customTrain) {
|
||||
return customTrain;
|
||||
}
|
||||
}
|
||||
const trainGetText = `?trainNum=${TrainNumber}&month=${dayjs().format(
|
||||
"M"
|
||||
)}&day=${dayjs().format("D")}`;
|
||||
switch (TrainNumber) {
|
||||
//しおかぜメイン
|
||||
//8000 ノーマル
|
||||
@@ -24,23 +37,23 @@ export const customTrainDataDetector = (TrainNumber: string) => {
|
||||
return {
|
||||
type: "LTDEXP",
|
||||
trainName: "しおかぜ",
|
||||
trainIcon: "https://storage.haruk.in/s8000nr.png",
|
||||
img: "https://storage.haruk.in/s8000nr.png",
|
||||
infoUrl:
|
||||
"https://www.jr-shikoku.co.jp/01_trainbus/vehicle-info/shiokaze.html",
|
||||
trainNumDistance: 0,
|
||||
info: "いしづちと併結 / 8000系で運転",
|
||||
infogram: "G"
|
||||
infogram: "G",
|
||||
};
|
||||
case "2M":
|
||||
return {
|
||||
type: "LTDEXP",
|
||||
trainName: "しおかぜ",
|
||||
trainIcon: "https://storage.haruk.in/s8000nr.png",
|
||||
img: "https://storage.haruk.in/s8000nr.png",
|
||||
infoUrl:
|
||||
"https://www.jr-shikoku.co.jp/01_trainbus/vehicle-info/shiokaze.html",
|
||||
trainNumDistance: 0,
|
||||
info: "8000系で運転",
|
||||
infogram: "G"
|
||||
infogram: "G",
|
||||
};
|
||||
//8000 アンパン
|
||||
case "10M":
|
||||
@@ -50,11 +63,11 @@ export const customTrainDataDetector = (TrainNumber: string) => {
|
||||
return {
|
||||
type: "LTDEXP",
|
||||
trainName: "しおかぜ",
|
||||
trainIcon: `https://n8n.haruk.in/webhook/anpanman-pictures.png${trainGetText}`,
|
||||
img: `https://n8n.haruk.in/webhook/anpanman-pictures.png${trainGetText}`,
|
||||
infoUrl: "https://www.jr-eki.com/aptrain/naani/yosan/train.html",
|
||||
trainNumDistance: 0,
|
||||
info: "いしづちと併結 / アンパンマン列車で運転",
|
||||
infogram: "G"
|
||||
infogram: "G",
|
||||
};
|
||||
//8600
|
||||
case "8M":
|
||||
@@ -68,12 +81,12 @@ export const customTrainDataDetector = (TrainNumber: string) => {
|
||||
return {
|
||||
type: "LTDEXP",
|
||||
trainName: "しおかぜ",
|
||||
trainIcon: "https://storage.haruk.in/s8600.png",
|
||||
img: "https://storage.haruk.in/s8600.png",
|
||||
infoUrl:
|
||||
"https://www.jr-shikoku.co.jp/01_trainbus/vehicle-info/shiokaze.html",
|
||||
trainNumDistance: 0,
|
||||
info: "いしづちと併結 / 8600系で運転",
|
||||
infogram: "G"
|
||||
infogram: "G",
|
||||
};
|
||||
|
||||
//いしづちメイン
|
||||
@@ -99,12 +112,12 @@ export const customTrainDataDetector = (TrainNumber: string) => {
|
||||
return {
|
||||
type: "LTDEXP",
|
||||
trainName: "いしづち",
|
||||
trainIcon: "https://storage.haruk.in/s8000no.png",
|
||||
img: "https://storage.haruk.in/s8000no.png",
|
||||
infoUrl:
|
||||
"https://www.jr-shikoku.co.jp/01_trainbus/vehicle-info/ishizuchi.html",
|
||||
trainNumDistance: 1000,
|
||||
info: "しおかぜと併結 / 8000系で運転",
|
||||
infogram: ""
|
||||
infogram: "",
|
||||
};
|
||||
|
||||
//8000 アンパン
|
||||
@@ -115,11 +128,11 @@ export const customTrainDataDetector = (TrainNumber: string) => {
|
||||
return {
|
||||
type: "LTDEXP",
|
||||
trainName: "いしづち",
|
||||
trainIcon: `https://n8n.haruk.in/webhook/anpanman-pictures.png${trainGetText}`,
|
||||
img: `https://n8n.haruk.in/webhook/anpanman-pictures.png${trainGetText}`,
|
||||
infoUrl: "https://www.jr-eki.com/aptrain/naani/yosan/train.html",
|
||||
trainNumDistance: 1000,
|
||||
info: "しおかぜと併結 / アンパンマン列車で運転",
|
||||
infogram: ""
|
||||
infogram: "",
|
||||
};
|
||||
|
||||
//8600
|
||||
@@ -134,12 +147,12 @@ export const customTrainDataDetector = (TrainNumber: string) => {
|
||||
return {
|
||||
type: "LTDEXP",
|
||||
trainName: "いしづち",
|
||||
trainIcon: "https://storage.haruk.in/s8600_isz.png",
|
||||
img: "https://storage.haruk.in/s8600_isz.png",
|
||||
infoUrl:
|
||||
"https://www.jr-shikoku.co.jp/01_trainbus/vehicle-info/ishizuchi.html",
|
||||
trainNumDistance: 1000,
|
||||
info: "しおかぜと併結 / 8600系で運転",
|
||||
infogram: ""
|
||||
infogram: "",
|
||||
};
|
||||
|
||||
//MEXP
|
||||
@@ -148,24 +161,24 @@ export const customTrainDataDetector = (TrainNumber: string) => {
|
||||
return {
|
||||
type: "LTDEXP",
|
||||
trainName: "モーニングEXP高松",
|
||||
trainIcon: "https://storage.haruk.in/s8000nr.png",
|
||||
img: "https://storage.haruk.in/s8000nr.png",
|
||||
infoUrl:
|
||||
"https://www.jr-shikoku.co.jp/01_trainbus/vehicle-info/morning.html",
|
||||
trainNumDistance: null,
|
||||
info: "8000系で運転",
|
||||
infogram: "G"
|
||||
infogram: "G",
|
||||
};
|
||||
//8600
|
||||
case "1091M":
|
||||
return {
|
||||
type: "LTDEXP",
|
||||
trainName: "モーニングEXP松山",
|
||||
trainIcon: "https://storage.haruk.in/s8600_isz.png",
|
||||
img: "https://storage.haruk.in/s8600_isz.png",
|
||||
infoUrl:
|
||||
"https://www.jr-shikoku.co.jp/01_trainbus/vehicle-info/morning.html",
|
||||
trainNumDistance: null,
|
||||
info: "8600系で運転",
|
||||
infogram: "G"
|
||||
infogram: "G",
|
||||
};
|
||||
//三桁いしづち
|
||||
//8000 アンパン
|
||||
@@ -174,11 +187,11 @@ export const customTrainDataDetector = (TrainNumber: string) => {
|
||||
return {
|
||||
type: "LTDEXP",
|
||||
trainName: "いしづち",
|
||||
trainIcon: `https://n8n.haruk.in/webhook/anpanman-pictures.png${trainGetText}`,
|
||||
img: `https://n8n.haruk.in/webhook/anpanman-pictures.png${trainGetText}`,
|
||||
infoUrl: "https://www.jr-eki.com/aptrain/naani/yosan/train.html",
|
||||
trainNumDistance: 940,
|
||||
info: "アンパンマン列車で運転",
|
||||
infogram: "G"
|
||||
infogram: "G",
|
||||
};
|
||||
//8600
|
||||
case "1043M":
|
||||
@@ -186,23 +199,23 @@ export const customTrainDataDetector = (TrainNumber: string) => {
|
||||
return {
|
||||
type: "LTDEXP",
|
||||
trainName: "いしづち",
|
||||
trainIcon: "https://storage.haruk.in/s8600_isz.png",
|
||||
img: "https://storage.haruk.in/s8600_isz.png",
|
||||
infoUrl:
|
||||
"https://www.jr-shikoku.co.jp/01_trainbus/vehicle-info/ishizuchi.html",
|
||||
trainNumDistance: 940,
|
||||
info: "8600系で運転",
|
||||
infogram: ""
|
||||
infogram: "",
|
||||
};
|
||||
case "1046M":
|
||||
return {
|
||||
type: "LTDEXP",
|
||||
trainName: "いしづち",
|
||||
trainIcon: "https://storage.haruk.in/s8600_isz.png",
|
||||
img: "https://storage.haruk.in/s8600_isz.png",
|
||||
infoUrl:
|
||||
"https://www.jr-shikoku.co.jp/01_trainbus/vehicle-info/ishizuchi.html",
|
||||
trainNumDistance: 940,
|
||||
info: "8600系で運転",
|
||||
infogram: "G"
|
||||
infogram: "G",
|
||||
};
|
||||
|
||||
//南風 2700ノーマル
|
||||
@@ -227,11 +240,12 @@ export const customTrainDataDetector = (TrainNumber: string) => {
|
||||
return {
|
||||
type: "LTDEXP",
|
||||
trainName: "南風",
|
||||
trainIcon: "https://storage.haruk.in/s2700.png",
|
||||
infoUrl: "https://www.jr-shikoku.co.jp/01_trainbus/vehicle-info/nanpu.html",
|
||||
img: "https://storage.haruk.in/s2700.png",
|
||||
infoUrl:
|
||||
"https://www.jr-shikoku.co.jp/01_trainbus/vehicle-info/nanpu.html",
|
||||
trainNumDistance: 30,
|
||||
info: "2700系で運転",
|
||||
infogram: "G"
|
||||
infogram: "G",
|
||||
};
|
||||
|
||||
//2700アンパン
|
||||
@@ -248,11 +262,11 @@ export const customTrainDataDetector = (TrainNumber: string) => {
|
||||
return {
|
||||
type: "LTDEXP",
|
||||
trainName: "南風",
|
||||
trainIcon: `https://n8n.haruk.in/webhook/anpanman-pictures.png${trainGetText}`,
|
||||
img: `https://n8n.haruk.in/webhook/anpanman-pictures.png${trainGetText}`,
|
||||
infoUrl: "https://www.jr-eki.com/aptrain/naani/dosan/train.html",
|
||||
trainNumDistance: 30,
|
||||
info: "アンパンマン列車で運転",
|
||||
infogram: "G"
|
||||
infogram: "G",
|
||||
};
|
||||
|
||||
//うずしお
|
||||
@@ -273,12 +287,12 @@ export const customTrainDataDetector = (TrainNumber: string) => {
|
||||
return {
|
||||
type: "LTDEXP",
|
||||
trainName: "うずしお",
|
||||
trainIcon: "https://storage.haruk.in/s2700_uzu.png",
|
||||
img: "https://storage.haruk.in/s2700_uzu.png",
|
||||
infoUrl:
|
||||
"https://www.jr-shikoku.co.jp/01_trainbus/vehicle-info/uzushio.html",
|
||||
trainNumDistance: 3000,
|
||||
info: "2700系で運転",
|
||||
infogram: ""
|
||||
infogram: "",
|
||||
};
|
||||
|
||||
//2700 二両編成
|
||||
@@ -295,12 +309,12 @@ export const customTrainDataDetector = (TrainNumber: string) => {
|
||||
return {
|
||||
type: "LTDEXP",
|
||||
trainName: "うずしお",
|
||||
trainIcon: "https://storage.haruk.in/s2700_uzu.png",
|
||||
img: "https://storage.haruk.in/s2700_uzu.png",
|
||||
infoUrl:
|
||||
"https://www.jr-shikoku.co.jp/01_trainbus/vehicle-info/uzushio.html",
|
||||
trainNumDistance: 3000,
|
||||
info: "2700系で運転",
|
||||
infogram: ""
|
||||
infogram: "",
|
||||
};
|
||||
|
||||
//2600
|
||||
@@ -317,15 +331,14 @@ export const customTrainDataDetector = (TrainNumber: string) => {
|
||||
return {
|
||||
type: "LTDEXP",
|
||||
trainName: "うずしお",
|
||||
trainIcon: "https://storage.haruk.in/s2600.png",
|
||||
img: "https://storage.haruk.in/s2600.png",
|
||||
infoUrl:
|
||||
"https://www.jr-shikoku.co.jp/01_trainbus/vehicle-info/uzushio.html",
|
||||
trainNumDistance: 3000,
|
||||
info: "2600系で運転",
|
||||
infogram: ""
|
||||
infogram: "",
|
||||
};
|
||||
|
||||
|
||||
//マリンライナー
|
||||
case "3104M":
|
||||
case "3106M":
|
||||
@@ -398,11 +411,12 @@ export const customTrainDataDetector = (TrainNumber: string) => {
|
||||
return {
|
||||
type: "Rapid",
|
||||
trainName: "マリンライナー",
|
||||
trainIcon: "https://storage.haruk.in/s5001.png",
|
||||
infoUrl: "https://www.jr-shikoku.co.jp/01_trainbus/vehicle-info/marine.html",
|
||||
img: "https://storage.haruk.in/s5001.png",
|
||||
infoUrl:
|
||||
"https://www.jr-shikoku.co.jp/01_trainbus/vehicle-info/marine.html",
|
||||
trainNumDistance: 3100,
|
||||
info: "",
|
||||
infogram: "G"
|
||||
infogram: "G",
|
||||
};
|
||||
case "3102M":
|
||||
case "3101M":
|
||||
@@ -412,22 +426,23 @@ export const customTrainDataDetector = (TrainNumber: string) => {
|
||||
return {
|
||||
type: "Rapid",
|
||||
trainName: "マリンライナー",
|
||||
trainIcon: "https://storage.haruk.in/s5001k.png",
|
||||
infoUrl: "https://www.jr-shikoku.co.jp/01_trainbus/vehicle-info/marine.html",
|
||||
img: "https://storage.haruk.in/s5001k.png",
|
||||
infoUrl:
|
||||
"https://www.jr-shikoku.co.jp/01_trainbus/vehicle-info/marine.html",
|
||||
trainNumDistance: 3100,
|
||||
info: "",
|
||||
infogram: ""
|
||||
infogram: "",
|
||||
};
|
||||
//下りサンポート
|
||||
case "1219M":
|
||||
return {
|
||||
type: "Normal",
|
||||
trainName: "南風リレー",
|
||||
trainIcon: "",
|
||||
img: "",
|
||||
infoUrl: "",
|
||||
trainNumDistance: null,
|
||||
info: " 土曜・休日は多度津-琴平間運休",
|
||||
infogram: ""
|
||||
infogram: "",
|
||||
};
|
||||
|
||||
case "111M":
|
||||
@@ -443,11 +458,11 @@ export const customTrainDataDetector = (TrainNumber: string) => {
|
||||
return {
|
||||
type: "Rapid",
|
||||
trainName: "サンポート南風リレー",
|
||||
trainIcon: null,
|
||||
img: null,
|
||||
infoUrl: null,
|
||||
trainNumDistance: null,
|
||||
info: null,
|
||||
infogram: ""
|
||||
infogram: "",
|
||||
};
|
||||
case "5109M":
|
||||
case "5135M":
|
||||
@@ -455,32 +470,32 @@ export const customTrainDataDetector = (TrainNumber: string) => {
|
||||
return {
|
||||
type: "OneManRapid",
|
||||
trainName: "サンポート南風リレー",
|
||||
trainIcon: null,
|
||||
img: null,
|
||||
infoUrl: null,
|
||||
trainNumDistance: null,
|
||||
info: null,
|
||||
infogram: ""
|
||||
infogram: "",
|
||||
};
|
||||
case "137M":
|
||||
return {
|
||||
type: "Rapid",
|
||||
trainName: "サンポート",
|
||||
trainIcon: null,
|
||||
img: null,
|
||||
infoUrl: null,
|
||||
trainNumDistance: null,
|
||||
info: "土曜・休日運休",
|
||||
infogram: ""
|
||||
infogram: "",
|
||||
};
|
||||
//上りサンポート
|
||||
case "116M":
|
||||
return {
|
||||
type: "Normal",
|
||||
trainName: "南風リレー",
|
||||
trainIcon: null,
|
||||
img: null,
|
||||
infoUrl: null,
|
||||
trainNumDistance: null,
|
||||
info: null,
|
||||
infogram: ""
|
||||
infogram: "",
|
||||
};
|
||||
|
||||
case "130M":
|
||||
@@ -494,11 +509,11 @@ export const customTrainDataDetector = (TrainNumber: string) => {
|
||||
return {
|
||||
type: "Rapid",
|
||||
trainName: "サンポート南風リレー",
|
||||
trainIcon: "",
|
||||
img: "",
|
||||
infoUrl: "",
|
||||
trainNumDistance: null,
|
||||
info: "",
|
||||
infogram: ""
|
||||
infogram: "",
|
||||
};
|
||||
case "5118M":
|
||||
case "5120M":
|
||||
@@ -508,11 +523,11 @@ export const customTrainDataDetector = (TrainNumber: string) => {
|
||||
return {
|
||||
type: "OneManRapid",
|
||||
trainName: "サンポート南風リレー",
|
||||
trainIcon: null,
|
||||
img: null,
|
||||
infoUrl: null,
|
||||
trainNumDistance: null,
|
||||
info: null,
|
||||
infogram: ""
|
||||
infogram: "",
|
||||
};
|
||||
|
||||
//サンライズ瀬戸
|
||||
@@ -521,24 +536,24 @@ export const customTrainDataDetector = (TrainNumber: string) => {
|
||||
return {
|
||||
type: "NightLTDEXP",
|
||||
trainName: "サンライズ瀬戸",
|
||||
trainIcon: "https://storage.haruk.in/w285.png",
|
||||
img: "https://storage.haruk.in/w285.png",
|
||||
infoUrl:
|
||||
"https://www.jr-odekake.net/train/sunriseseto_izumo/index.html",
|
||||
trainNumDistance: null,
|
||||
info: "",
|
||||
infogram: "ブ"
|
||||
infogram: "ブ",
|
||||
};
|
||||
case "8041M": //琴平延長高松迄
|
||||
case "8031M": //琴平延長高松以降
|
||||
return {
|
||||
type: "NightLTDEXP",
|
||||
trainName: "サンライズ瀬戸",
|
||||
trainIcon: "https://storage.haruk.in/w285.png",
|
||||
img: "https://storage.haruk.in/w285.png",
|
||||
infoUrl:
|
||||
"https://www.jr-odekake.net/train/sunriseseto_izumo/index.html",
|
||||
trainNumDistance: null,
|
||||
info: "琴平延長運転日",
|
||||
infogram: "ブ"
|
||||
infogram: "ブ",
|
||||
};
|
||||
|
||||
//宇和海
|
||||
@@ -572,11 +587,12 @@ export const customTrainDataDetector = (TrainNumber: string) => {
|
||||
return {
|
||||
type: "LTDEXP",
|
||||
trainName: "宇和海",
|
||||
trainIcon: "https://storage.haruk.in/s2000_uwa.png",
|
||||
infoUrl: "https://www.jr-shikoku.co.jp/01_trainbus/vehicle-info/uwakai.html",
|
||||
img: "https://storage.haruk.in/s2000_uwa.png",
|
||||
infoUrl:
|
||||
"https://www.jr-shikoku.co.jp/01_trainbus/vehicle-info/uwakai.html",
|
||||
trainNumDistance: 1050,
|
||||
info: "2000系で運転",
|
||||
infogram: ""
|
||||
infogram: "",
|
||||
};
|
||||
//2000 アンパン込み
|
||||
case "1058D":
|
||||
@@ -588,11 +604,11 @@ export const customTrainDataDetector = (TrainNumber: string) => {
|
||||
return {
|
||||
type: "LTDEXP",
|
||||
trainName: "宇和海",
|
||||
trainIcon: `https://n8n.haruk.in/webhook/anpanman-pictures.png${trainGetText}`,
|
||||
img: `https://n8n.haruk.in/webhook/anpanman-pictures.png${trainGetText}`,
|
||||
infoUrl: "https://www.jr-eki.com/aptrain/naani/yosan/train.html",
|
||||
trainNumDistance: 1050,
|
||||
info: "アンパン列車で運転",
|
||||
infogram: ""
|
||||
infogram: "",
|
||||
};
|
||||
//しまんと
|
||||
case "2002D":
|
||||
@@ -602,12 +618,12 @@ export const customTrainDataDetector = (TrainNumber: string) => {
|
||||
return {
|
||||
type: "LTDEXP",
|
||||
trainName: "しまんと",
|
||||
trainIcon: "https://storage.haruk.in/s2700_smn.png",
|
||||
img: "https://storage.haruk.in/s2700_smn.png",
|
||||
infoUrl:
|
||||
"https://www.jr-shikoku.co.jp/01_trainbus/vehicle-info/shimanto.html",
|
||||
trainNumDistance: 2000,
|
||||
info: "2700系で運転",
|
||||
infogram: ""
|
||||
infogram: "",
|
||||
};
|
||||
|
||||
//あしずり 2000
|
||||
@@ -622,12 +638,12 @@ export const customTrainDataDetector = (TrainNumber: string) => {
|
||||
return {
|
||||
type: "LTDEXP",
|
||||
trainName: "あしずり",
|
||||
trainIcon: `https://n8n.haruk.in/webhook/anpanman-pictures.png${trainGetText}`,
|
||||
img: `https://n8n.haruk.in/webhook/anpanman-pictures.png${trainGetText}`,
|
||||
infoUrl:
|
||||
"https://www.jr-eki.com/aptrain/naani/first-generation/jikoku.html",
|
||||
trainNumDistance: 2070,
|
||||
info: "2000系で運転",
|
||||
infogram: ""
|
||||
infogram: "",
|
||||
};
|
||||
|
||||
//あしずり 2700
|
||||
@@ -638,24 +654,24 @@ export const customTrainDataDetector = (TrainNumber: string) => {
|
||||
return {
|
||||
type: "LTDEXP",
|
||||
trainName: "あしずり",
|
||||
trainIcon: "https://storage.haruk.in/s2700_asi.png",
|
||||
img: "https://storage.haruk.in/s2700_asi.png",
|
||||
infoUrl:
|
||||
"https://www.jr-shikoku.co.jp/01_trainbus/vehicle-info/ashizuri.html",
|
||||
trainNumDistance: 2070,
|
||||
info: "2700系で運転",
|
||||
infogram: ""
|
||||
infogram: "",
|
||||
};
|
||||
case "2072D":
|
||||
case "2083D":
|
||||
return {
|
||||
type: "LTDEXP",
|
||||
trainName: "あしずり",
|
||||
trainIcon: "https://storage.haruk.in/s2700_asi.png",
|
||||
img: "https://storage.haruk.in/s2700_asi.png",
|
||||
infoUrl:
|
||||
"https://www.jr-shikoku.co.jp/01_trainbus/vehicle-info/ashizuri.html",
|
||||
trainNumDistance: 2070,
|
||||
info: "2700系で運転",
|
||||
infogram: "G"
|
||||
infogram: "G",
|
||||
};
|
||||
|
||||
//剣山
|
||||
@@ -669,12 +685,12 @@ export const customTrainDataDetector = (TrainNumber: string) => {
|
||||
return {
|
||||
type: "LTDEXP",
|
||||
trainName: "剣山",
|
||||
trainIcon: "https://storage.haruk.in/s185tu.png",
|
||||
img: "https://storage.haruk.in/s185tu.png",
|
||||
infoUrl:
|
||||
"https://www.jr-shikoku.co.jp/01_trainbus/vehicle-info/tsurugisan.html",
|
||||
trainNumDistance: 4000,
|
||||
info: "キハ185系で運転",
|
||||
infogram: ""
|
||||
infogram: "",
|
||||
};
|
||||
|
||||
//よしのがわトロッコ
|
||||
@@ -683,12 +699,12 @@ export const customTrainDataDetector = (TrainNumber: string) => {
|
||||
return {
|
||||
type: "LTDEXP",
|
||||
trainName: "よしのがわトロッコ",
|
||||
trainIcon: "https://storage.haruk.in/s185to_ai.png",
|
||||
img: "https://storage.haruk.in/s185to_ai.png",
|
||||
infoUrl:
|
||||
"https://www.jr-shikoku.co.jp/01_trainbus/event_train/yoshino_torokko.html",
|
||||
trainNumDistance: null,
|
||||
info: "",
|
||||
infogram: ""
|
||||
infogram: "",
|
||||
};
|
||||
|
||||
//岡山高松アントロ
|
||||
@@ -700,12 +716,12 @@ export const customTrainDataDetector = (TrainNumber: string) => {
|
||||
return {
|
||||
type: "LTDEXP",
|
||||
trainName: "アンパンマントロッコ",
|
||||
trainIcon: "https://storage.haruk.in/s32to4.png",
|
||||
img: "https://storage.haruk.in/s32to4.png",
|
||||
infoUrl:
|
||||
"https://www.jr-eki.com/aptrain/naani/torokko_seto/jikoku.html",
|
||||
trainNumDistance: null,
|
||||
info: "",
|
||||
infogram: "G"
|
||||
infogram: "G",
|
||||
};
|
||||
|
||||
//伊予灘ものがたり
|
||||
@@ -714,22 +730,22 @@ export const customTrainDataDetector = (TrainNumber: string) => {
|
||||
return {
|
||||
type: "LTDEXP",
|
||||
trainName: "伊予灘ものがたり",
|
||||
trainIcon: "https://storage.haruk.in/s185iyor.png",
|
||||
img: "https://storage.haruk.in/s185iyor.png",
|
||||
infoUrl: "https://iyonadamonogatari.com/",
|
||||
trainNumDistance: null,
|
||||
info: "",
|
||||
infogram: "G"
|
||||
infogram: "G",
|
||||
};
|
||||
case "8092D":
|
||||
case "8094D":
|
||||
return {
|
||||
type: "LTDEXP",
|
||||
trainName: "伊予灘ものがたり",
|
||||
trainIcon: "https://storage.haruk.in/s185iyoy.png",
|
||||
img: "https://storage.haruk.in/s185iyoy.png",
|
||||
infoUrl: "https://iyonadamonogatari.com/",
|
||||
trainNumDistance: null,
|
||||
info: "",
|
||||
infogram: "G"
|
||||
infogram: "G",
|
||||
};
|
||||
|
||||
//千年ものがたり
|
||||
@@ -738,11 +754,11 @@ export const customTrainDataDetector = (TrainNumber: string) => {
|
||||
return {
|
||||
type: "LTDEXP",
|
||||
trainName: "四国まんなか千年ものがたり",
|
||||
trainIcon: "https://storage.haruk.in/s185mm1.png",
|
||||
img: "https://storage.haruk.in/s185mm1.png",
|
||||
infoUrl: "https://www.jr-shikoku.co.jp/sennenmonogatari/",
|
||||
trainNumDistance: null,
|
||||
info: "",
|
||||
infogram: "G"
|
||||
infogram: "G",
|
||||
};
|
||||
|
||||
//夜明けものがたり
|
||||
@@ -753,67 +769,67 @@ export const customTrainDataDetector = (TrainNumber: string) => {
|
||||
return {
|
||||
type: "LTDEXP",
|
||||
trainName: "時代の夜明けのものがたり",
|
||||
trainIcon: "https://storage.haruk.in/s185ym1.png",
|
||||
img: "https://storage.haruk.in/s185ym1.png",
|
||||
infoUrl: "https://www.jr-shikoku.co.jp/yoakenomonogatari/index.html",
|
||||
trainNumDistance: null,
|
||||
info: "",
|
||||
infogram: "G"
|
||||
infogram: "G",
|
||||
};
|
||||
case "9174M":
|
||||
return {
|
||||
type: "SPCL_Rapid",
|
||||
trainName: "マリンライナー94号",
|
||||
trainIcon: "https://storage.haruk.in/s5001.png",
|
||||
infoUrl: "https://www.jr-shikoku.co.jp/01_trainbus/vehicle-info/marine.html",
|
||||
img: "https://storage.haruk.in/s5001.png",
|
||||
infoUrl:
|
||||
"https://www.jr-shikoku.co.jp/01_trainbus/vehicle-info/marine.html",
|
||||
trainNumDistance: null,
|
||||
info: "臨時列車 4/12,13,19のみ運転",
|
||||
infogram: "G"
|
||||
infogram: "G",
|
||||
};
|
||||
case "9395D":
|
||||
return {
|
||||
type: "SPCL_Normal",
|
||||
trainName: "",
|
||||
trainIcon: "https://storage.haruk.in/s1500.png",
|
||||
img: "https://storage.haruk.in/s1500.png",
|
||||
infoUrl: null,
|
||||
trainNumDistance: null,
|
||||
info: "臨時列車 4/12,13,19のみ運転",
|
||||
infogram: ""
|
||||
infogram: "",
|
||||
};
|
||||
case "9662D":
|
||||
case "9665D":
|
||||
return {
|
||||
type: "SPCL_Normal",
|
||||
trainName: "れんげ号",
|
||||
img: "",
|
||||
infoUrl: null,
|
||||
trainNumDistance: null,
|
||||
info: "臨時列車 4/29のみ運転",
|
||||
infogram: "",
|
||||
};
|
||||
case "9664D":
|
||||
case "9663D":
|
||||
return {
|
||||
type: "SPCL_Normal",
|
||||
trainName: "わらぐろ号",
|
||||
img: "",
|
||||
infoUrl: null,
|
||||
trainNumDistance: null,
|
||||
info: "臨時列車 4/29のみ運転",
|
||||
infogram: "",
|
||||
};
|
||||
case "9662D":
|
||||
case "9665D":
|
||||
return {
|
||||
type: "SPCL_Normal",
|
||||
trainName: "れんげ号",
|
||||
trainIcon: "",
|
||||
infoUrl: null,
|
||||
trainNumDistance: null,
|
||||
info: "臨時列車 4/29のみ運転",
|
||||
infogram: ""
|
||||
};
|
||||
case "9664D":
|
||||
case "9663D":
|
||||
return {
|
||||
type: "SPCL_Normal",
|
||||
trainName: "わらぐろ号",
|
||||
trainIcon: "",
|
||||
infoUrl: null,
|
||||
trainNumDistance: null,
|
||||
info: "臨時列車 4/29のみ運転",
|
||||
infogram: ""
|
||||
};
|
||||
default:
|
||||
if(getJRF(TrainNumber) !== null){
|
||||
if (getJRF(TrainNumber) !== null) {
|
||||
return {
|
||||
type: "Freight",
|
||||
trainName: getJRF(TrainNumber),
|
||||
trainIcon: "https://storage.haruk.in/ef210a.png",
|
||||
img: "https://storage.haruk.in/ef210a.png",
|
||||
infoUrl: null,
|
||||
trainNumDistance: null,
|
||||
info: "",
|
||||
infogram: "",
|
||||
};
|
||||
}
|
||||
else if (
|
||||
} else if (
|
||||
new RegExp(/^4[1-9]\d\d[DM]$/).test(TrainNumber) ||
|
||||
new RegExp(/^5[1-7]\d\d[DM]$/).test(TrainNumber) ||
|
||||
new RegExp(/^3[2-9]\d\d[DM]$/).test(TrainNumber)
|
||||
@@ -821,38 +837,38 @@ export const customTrainDataDetector = (TrainNumber: string) => {
|
||||
return {
|
||||
type: "OneMan",
|
||||
trainName: "",
|
||||
trainIcon: null,
|
||||
img: null,
|
||||
infoUrl: null,
|
||||
trainNumDistance: null,
|
||||
info: null,
|
||||
infogram: ""
|
||||
infogram: "",
|
||||
};
|
||||
else if (
|
||||
new RegExp(/^[1-9]\d\d[DM]$/).test(TrainNumber) ||
|
||||
new RegExp(/^1[26]\d\d[DM]$/).test(TrainNumber) ||
|
||||
new RegExp(/^58\d\d[DM]$/).test(TrainNumber) ||
|
||||
new RegExp(/^6\d\d\d[DM]$/).test(TrainNumber)
|
||||
){
|
||||
return {
|
||||
type: "Normal",
|
||||
trainName: "",
|
||||
trainIcon: null,
|
||||
infoUrl: null,
|
||||
trainNumDistance: null,
|
||||
info: null,
|
||||
infogram: ""
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
type: "Other",
|
||||
trainName: "",
|
||||
trainIcon: null,
|
||||
infoUrl: null,
|
||||
trainNumDistance: null,
|
||||
info: null,
|
||||
infogram: ""
|
||||
};
|
||||
}
|
||||
) {
|
||||
return {
|
||||
type: "Normal",
|
||||
trainName: "",
|
||||
img: null,
|
||||
infoUrl: null,
|
||||
trainNumDistance: null,
|
||||
info: null,
|
||||
infogram: "",
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
type: "Other",
|
||||
trainName: "",
|
||||
img: null,
|
||||
infoUrl: null,
|
||||
trainNumDistance: null,
|
||||
info: null,
|
||||
infogram: "",
|
||||
};
|
||||
}
|
||||
}
|
||||
};
|
||||
export const getJRF = (num: string) => {
|
||||
|
Reference in New Issue
Block a user