File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
laravel/app/Http/Repository Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -237,16 +237,17 @@ public function getListV2($line, $refresh = false)
237
237
}
238
238
try {
239
239
// 新版本直接调用接口
240
- $ url = ' http://www.szjt.gov.cn/BusQu/APTSLine.aspx/GetData ' ;
241
- $ param = '{"num":" ' . $ line . ' "} ' ;
240
+ $ param = http_build_query ([ ' LineName ' => $ line ]) ;
241
+ $ url = 'http://jtj.suzhou.gov.cn/szinf/interfaceJtj/gjxlcx? ' . $ param ;
242
242
$ header = [
243
243
'content-type: Application/json ' ,
244
244
'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36 ' ,
245
245
'Accept: application/json ' ,
246
- 'Host: www.szjt.gov.cn ' ,
247
- 'Origin: http://www.szjt.gov.cn ' ,
246
+ 'Host: jtj.suzhou.gov.cn/ ' ,
247
+ 'Origin: http://jtj.suzhou.gov.cn/ ' ,
248
+ 'X-Requested-With: XMLHttpRequest ' ,
248
249
];
249
- $ data = Http::getInstent ()->post ($ url , $ param , 4 , $ header );
250
+ $ data = Http::getInstent ()->post ($ url , [] , 4 , $ header );
250
251
251
252
if ($ data ['content ' ]) {
252
253
$ res = json_decode ($ data ['content ' ], true );
You can’t perform that action at this time.
0 commit comments