diff --git a/application/third_party/trainsystem/controllers/innerTrainSearch.php b/application/third_party/trainsystem/controllers/innerTrainSearch.php index 0244e9f6..be6726ad 100644 --- a/application/third_party/trainsystem/controllers/innerTrainSearch.php +++ b/application/third_party/trainsystem/controllers/innerTrainSearch.php @@ -597,6 +597,7 @@ class innerTrainSearch extends CI_Controller{ $return_data->result[$i]->SeatList[$j] = new StdClass(); $return_data->result[$i]->SeatList[$j]->SeatCode = $key; $return_data->result[$i]->SeatList[$j]->SeatName = get_name($key); + $return_data->result[$i]->SeatList[$j]->SeatNameCn = get_name_cn($key); //中文名称 $value = str_replace('¥','',$value); if(in_array($key, array('A3', 'A4', 'A5', 'A6', '3', '4', '5', '6', 'A', 'F', 'S','YDW','EDW'))){ diff --git a/application/third_party/trainsystem/helpers/train_helper.php b/application/third_party/trainsystem/helpers/train_helper.php index 026a8741..ab0b04f4 100644 --- a/application/third_party/trainsystem/helpers/train_helper.php +++ b/application/third_party/trainsystem/helpers/train_helper.php @@ -314,5 +314,55 @@ function get_name($seat_code){ } } +function get_name_cn($seat_code){ + if($seat_code){ + switch($seat_code){ + case 'O' : + return '二等座'; + case 'A8' : + return '二等座'; + case 'A9' : + return '商务座'; + case 'P' : + return '特等座'; + case 'M' : + return '一等座'; + case 'A7' : + return '一等座'; + case 'A6' : + return '高级软卧'; + case 'A' : + return '高级软卧'; + case '5' : + return '硬卧'; + case 'S' : + return '软卧'; + case 'A4' : + return '软卧'; + case 'F' : + return '动卧'; + case 'A3' : + return '硬卧'; + case 'A2' : + return '软座'; + case 'A1' : + return '硬座'; + case 'Q' : + return '观光座'; + case 'H' : + return '其它'; + case 'WZ' : + return '无座'; + case '13' : + return '无座'; + case 'YDW' : + return '一等卧'; + case 'EDW' : + return '二等卧'; + } + } +} + + ?> \ No newline at end of file