@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | 'page' => $page, |
31 | 31 | 'pageSize' => $pageSize, |
32 | 32 | ]), 'data', []); |
33 | - $this->_toArrayCall = function ($array) { |
|
33 | + $this->_toArrayCall = function($array) { |
|
34 | 34 | return Arrays::columns($array, [ |
35 | 35 | 'id' => 'd_id', |
36 | 36 | 'name' => 'd_name', |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | 'page' => $page, |
59 | 59 | 'pageSize' => $pageSize, |
60 | 60 | ]), 'data', []); |
61 | - $this->_toArrayCall = function ($array) { |
|
61 | + $this->_toArrayCall = function($array) { |
|
62 | 62 | return Arrays::columns($array, [ |
63 | 63 | 'id' => 'd_id', |
64 | 64 | 'name' => 'd_name', |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | $this->_result = (array)Json::get(Http::get('http://api.jinsapi.com/yingshi/getVodById', [ |
83 | 83 | 'd_id' => $id, |
84 | 84 | ]), 'data', []); |
85 | - $this->_toArrayCall = function ($array) { |
|
85 | + $this->_toArrayCall = function($array) { |
|
86 | 86 | return Arrays::columns($array, [ |
87 | 87 | 'id' => 'd_id', |
88 | 88 | 'name' => 'd_name', |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | public function fetchCitys($provinceCode = null) |
38 | 38 | { |
39 | 39 | $this->_result = (array)Json::decode(Http::get('http://www.nmc.cn/f/rest/province/' . $provinceCode)); |
40 | - $this->_toArrayCall = function ($array) { |
|
40 | + $this->_toArrayCall = function($array) { |
|
41 | 41 | return Arrays::columns($array, ['code', 'city', 'province']); |
42 | 42 | }; |
43 | 43 | |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | public function fetchWeather($cityId) |
71 | 71 | { |
72 | 72 | $this->_result = (array)Json::decode(Http::get('http://www.nmc.cn/f/rest/real/' . $cityId)); |
73 | - $this->_toArrayCall = function ($array) { |
|
73 | + $this->_toArrayCall = function($array) { |
|
74 | 74 | return Arrays::columns($array, [ |
75 | 75 | 'publish_time', |
76 | 76 | 'airpressure' => 'weather.airpressure', |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | public function fetchAirQuality($cityId) |
105 | 105 | { |
106 | 106 | $this->_result = (array)Json::decode(Http::get('http://www.nmc.cn/f/rest/aqi/' . $cityId)); |
107 | - $this->_toArrayCall = function ($array) { |
|
107 | + $this->_toArrayCall = function($array) { |
|
108 | 108 | return Arrays::columns($array, [ |
109 | 109 | 'forecasttime', |
110 | 110 | 'aq', |
@@ -129,9 +129,9 @@ discard block |
||
129 | 129 | * |
130 | 130 | * @return static |
131 | 131 | */ |
132 | - public function fetchToday($cityId){ |
|
132 | + public function fetchToday($cityId) { |
|
133 | 133 | $this->_result = (array)Json::decode(Http::get('http://www.nmc.cn/f/rest/passed/' . $cityId)); |
134 | - $this->_toArrayCall = function ($array) { |
|
134 | + $this->_toArrayCall = function($array) { |
|
135 | 135 | return Arrays::columns($array, [ |
136 | 136 | 'time', |
137 | 137 | 'humidity', |