@@ -240,18 +240,26 @@ public function getListV2($line, $refresh = false)
240240 // 处理数组
241241 $ return = [];
242242 if ($ arr ['Document ' ]) {
243- $ lName = $ arr ['Document ' ]['LName ' ] ?? '' ;
244- $ lDir = $ arr ['Document ' ]['LDirection ' ] ?? '' ;
245- $ return ['to ' ] = $ lName .'- ' .$ lDir ;
246-
247- foreach ($ arr ['Document ' ]['StandInfo ' ] as $ item ) {
248- $ return ['line ' ][] = [
249- 'stationName ' => $ item ['SName ' ] ?? '' ,
250- 'stationCode ' => $ item ['SCode ' ] ?? '' ,
251- 'carCode ' => $ item ['BusInfo ' ] ?? '' ,
252- 'ArrivalTime ' => str_replace ('/ ' , '- ' , $ item ['InTime ' ] ?? '' ),
253- 'OutTime ' => str_replace ('/ ' , '- ' , $ item ['OutTime ' ] ?? '' ),
254- 'SGuid ' => $ item ['SGuid ' ] ?? '' ,
243+ foreach ($ arr ['Document ' ]['LineInfo ' ] as $ item ) {
244+ // "Guid": "921f91ad-757e-49d6-86ae-8e5f205117be",
245+ // "LName": "快线1号",
246+ // "LDirection": "星塘公交中心首末站",
247+ // "LFStdFTime": "06:00:00",
248+ // "LFStdETime": "21:00:00",
249+ // "LFStdName": "木渎公交换乘枢纽站",
250+ // "LEStdName": "星塘公交中心",
251+ // "LineType": ""
252+ $ fromTo = $ item ['LDirection ' ] ?? '' ;
253+ $ bus = $ item ['LName ' ] ?? '' ;
254+ $ Guid = $ item ['Guid ' ] ?? '' ;
255+ $ link = 'APTSLine.aspx?cid=&LineInfo= ' .$ bus .'( ' .$ fromTo .') ' .'&Guid= ' .$ Guid ;
256+ $ return [] = [
257+ 'FromTo ' => $ fromTo ,
258+ 'bus ' => $ bus ,
259+ 'link ' => $ link ,
260+ 'start_time ' => $ item ['LFStdFTime ' ] ?? '' ,
261+ 'end_time ' => $ item ['LFStdETime ' ] ?? '' ,
262+ 'line_type ' => $ item ['LineType ' ] ?? '' ,
255263 ];
256264 }
257265 return $ return ;
0 commit comments