Skip to content

Commit 47c430b

Browse files
committed
Merge branch 'master' into develop
2 parents 5849c23 + 30d4f87 commit 47c430b

File tree

3 files changed

+103
-40
lines changed

3 files changed

+103
-40
lines changed

laravel/app/Http/Controllers/Bus/IndexController.php

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,19 @@ public function busLine(Request $request)
130130
if (!empty($post['lineID'])) {
131131
$data = NewBusRepository::getInstent()->getLineStatus($post['lineID']);
132132
} elseif (!empty($post) && !empty($post['href']) && !empty($post['LineGuid']) && !empty($post['LineInfo'])) {
133-
// 'href' => string 'APTSLine.aspx?cid=175ecd8d-c39d-4116-83ff-109b946d7cb4' (length=54) 'LineGuid' => string '9d090af5-c5c6-4db8-b34e-2e8af4f63216' (length=36) 'LineInfo' => string '1(公交一路新村)' (length=21)
134-
$parseUrl = parse_url($post['href']);
135-
parse_str($parseUrl['query'], $params);
133+
// ['href' => 'APTSLine.aspx?cid=175ecd8d-c39d-4116-83ff-109b946d7cb4', 'LineGuid' => '9d090af5-c5c6-4db8-b34e-2e8af4f63216', 'LineInfo' => '1(公交一路新村)']
134+
if (isset($post['cid'])) {
135+
$aspUrl = $post['href'] ?? 'APTSLine.aspx';
136+
} else {
137+
$parseUrl = parse_url($post['href']);
138+
$query = $parseUrl['query'] ?? '';
139+
parse_str($query, $params);
140+
$post['cid'] = $params['cid'];
141+
$aspUrl = $parseUrl['path'] ?? 'APTSLine.aspx';
142+
}
136143
unset($post['href']);
137-
$post['cid'] = $params['cid'];
138-
$data = BusRepository::getInstent()->getLine($parseUrl['path'], $post);
144+
145+
$data = BusRepository::getInstent()->getLine($aspUrl, $post);
139146
}
140147

141148
return $this->out(200, $data);

laravel/database/migrations/2019_03_26_180250_create_api_excel_logs_table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public function up()
1717
$table->increments('id');
1818
$table->unsignedInteger('api_excel_id')->default('0')->comment('关联 api_excel 表的 id');
1919
$table->unsignedInteger('sort_index')->default('0')->comment('本次查询的排序');
20-
$table->text('param')->default('')->comment('请求参数');
20+
$table->text('param')->comment('请求参数');
2121
$table->text('result')->comment('响应结果');
2222
$table->timestamp('created_at')->nullable();
2323
$table->index('api_excel_id', 'index_api_excel_id');

laravel/database/seeds/ApiParamTableSeeder.php

Lines changed: 90 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,26 @@ class ApiParamTableSeeder extends Seeder
1212
*/
1313
public function run()
1414
{
15-
15+
1616

1717
\DB::table('api_param')->delete();
18-
18+
1919
\DB::table('api_param')->insert(array (
20-
0 =>
20+
0 =>
2121
array (
2222
'id' => 1,
2323
'website' => 'https://www.guke1.com',
2424
'name' => '999 测试接口',
2525
'method' => 'get',
2626
'url' => 'http://118.25.87.12/token/php/index.php/hello/123',
2727
'param' => 'idcard,name,mobile',
28-
'result' => '',
29-
'is_need' => 1,
28+
'result' => 'isp,code,desc',
29+
'is_need' => 0,
3030
'state' => 1,
31-
'created_at' => '2019-01-29 20:10:08',
32-
'updated_at' => '2019-01-29 20:15:10',
31+
'created_at' => '2019-01-29 12:10:08',
32+
'updated_at' => '2019-03-26 10:30:24',
3333
),
34-
1 =>
34+
1 =>
3535
array (
3636
'id' => 2,
3737
'website' => 'https://www.juhe.cn/docs/api/id/208',
@@ -42,10 +42,10 @@ public function run()
4242
'result' => 'res,resmsg',
4343
'is_need' => 0,
4444
'state' => 1,
45-
'created_at' => '2019-01-29 20:10:08',
46-
'updated_at' => '2019-02-27 14:24:11',
45+
'created_at' => '2019-01-29 12:10:08',
46+
'updated_at' => '2019-02-27 06:24:11',
4747
),
48-
2 =>
48+
2 =>
4949
array (
5050
'id' => 3,
5151
'website' => 'https://www.juhe.cn/docs/api/id/261',
@@ -56,10 +56,10 @@ public function run()
5656
'result' => 'isp,code,desc',
5757
'is_need' => 0,
5858
'state' => 1,
59-
'created_at' => '2019-01-29 20:10:08',
60-
'updated_at' => '2019-01-29 20:15:10',
59+
'created_at' => '2019-01-29 12:10:08',
60+
'updated_at' => '2019-01-29 12:15:10',
6161
),
62-
3 =>
62+
3 =>
6363
array (
6464
'id' => 4,
6565
'website' => 'https://www.juhe.cn/docs/api/id/207',
@@ -70,10 +70,10 @@ public function run()
7070
'result' => 'res,message',
7171
'is_need' => 0,
7272
'state' => 1,
73-
'created_at' => '2019-01-29 20:10:08',
74-
'updated_at' => '2019-01-29 20:15:10',
73+
'created_at' => '2019-01-29 12:10:08',
74+
'updated_at' => '2019-01-29 12:15:10',
7575
),
76-
4 =>
76+
4 =>
7777
array (
7878
'id' => 5,
7979
'website' => 'https://www.juhe.cn/docs/api/id/213',
@@ -84,10 +84,10 @@ public function run()
8484
'result' => 'res,message',
8585
'is_need' => 0,
8686
'state' => 1,
87-
'created_at' => '2019-01-29 20:10:08',
88-
'updated_at' => '2019-01-29 20:15:10',
87+
'created_at' => '2019-01-29 12:10:08',
88+
'updated_at' => '2019-01-29 12:15:10',
8989
),
90-
5 =>
90+
5 =>
9191
array (
9292
'id' => 6,
9393
'website' => 'https://www.juhe.cn/docs/api/id/248',
@@ -98,10 +98,10 @@ public function run()
9898
'result' => 'code,desc',
9999
'is_need' => 0,
100100
'state' => 1,
101-
'created_at' => '2019-01-29 20:10:08',
102-
'updated_at' => '2019-01-29 20:15:10',
101+
'created_at' => '2019-01-29 12:10:08',
102+
'updated_at' => '2019-01-29 12:15:10',
103103
),
104-
6 =>
104+
6 =>
105105
array (
106106
'id' => 7,
107107
'website' => 'https://www.juhe.cn/docs/api/id/249',
@@ -112,10 +112,10 @@ public function run()
112112
'result' => 'state,description',
113113
'is_need' => 0,
114114
'state' => 1,
115-
'created_at' => '2019-01-29 20:10:08',
116-
'updated_at' => '2019-01-29 20:15:10',
115+
'created_at' => '2019-01-29 12:10:08',
116+
'updated_at' => '2019-01-29 12:15:10',
117117
),
118-
7 =>
118+
7 =>
119119
array (
120120
'id' => 8,
121121
'website' => 'https://www.juhe.cn/docs/api/id/354',
@@ -126,10 +126,10 @@ public function run()
126126
'result' => 'data.0.status',
127127
'is_need' => 0,
128128
'state' => 1,
129-
'created_at' => '2019-02-27 06:06:23',
130-
'updated_at' => '2019-02-27 06:06:23',
129+
'created_at' => '2019-02-26 22:06:23',
130+
'updated_at' => '2019-02-26 22:06:23',
131131
),
132-
8 =>
132+
8 =>
133133
array (
134134
'id' => 9,
135135
'website' => 'https://www.juhe.cn/docs/api/id/103',
@@ -140,11 +140,67 @@ public function run()
140140
'result' => 'res',
141141
'is_need' => 0,
142142
'state' => 1,
143-
'created_at' => '2019-03-15 11:27:18',
144-
'updated_at' => '2019-03-15 11:27:18',
143+
'created_at' => '2019-03-15 03:27:18',
144+
'updated_at' => '2019-03-15 03:27:18',
145+
),
146+
9 =>
147+
array (
148+
'id' => 11,
149+
'website' => 'https://www.juhe.cn/docs/api/id/251',
150+
'name' => '251手机二元素',
151+
'method' => 'get',
152+
'url' => 'http://v.juhe.cn/telecom2/query',
153+
'param' => 'mobile,realname',
154+
'result' => 'res,error_code,resmsg',
155+
'is_need' => 0,
156+
'state' => 1,
157+
'created_at' => '2019-03-18 09:01:42',
158+
'updated_at' => '2019-03-18 09:01:42',
159+
),
160+
10 =>
161+
array (
162+
'id' => 12,
163+
'website' => 'https://www.juhe.cn/docs/api/id/336',
164+
'name' => '336 非机动车销售发票',
165+
'method' => 'get',
166+
'url' => 'http://apis.juhe.cn/fp/query',
167+
'param' => 'fpdm,fphm,kprq,jym,je',
168+
'result' => 'xfmc,xfsh,xfdz,xfzh,gfmc,gfsh,gfdz,gfzh,jym,jqbm,je,zfbz,bz,spxx.0.spmc,spxx.0.ggxh,spxx.0.spdw,spxx.0.spsl,spxx.0.spdj,spxx.0.spje,spxx.0.spslv,spxx.0.spse,spxx.0.flbm,spxx.0.cph,spxx.0.type',
169+
'is_need' => 0,
170+
'state' => 1,
171+
'created_at' => '2019-04-08 08:51:03',
172+
'updated_at' => '2019-04-09 06:09:38',
173+
),
174+
11 =>
175+
array (
176+
'id' => 13,
177+
'website' => 'https://www.juhe.cn/docs/api/id/336',
178+
'name' => '336 机动车销售发票',
179+
'method' => 'get',
180+
'url' => 'http://apis.juhe.cn/fp/query',
181+
'param' => 'fpdm,fphm,kprq,jym,je',
182+
'result' => 'orderid,xfmc,xfsh,xfdz,xfzh,gfmc,gfsh,gfdz,gfzh,jym,jqbm,spxx,je,zfbz,bz,cllx,cpxh,cd,hgzh,fdjh,cjh,sl,jshj,se,swjgmc,swjgdm,wsz,dw,xcrs,gfid,fplx',
183+
'is_need' => 0,
184+
'state' => 0,
185+
'created_at' => '2019-04-09 06:15:49',
186+
'updated_at' => '2019-04-09 06:15:57',
187+
),
188+
12 =>
189+
array (
190+
'id' => 14,
191+
'website' => 'https://www.juhe.cn/docs/api/id/188',
192+
'name' => '188银行卡二元素',
193+
'method' => 'get',
194+
'url' => 'http://v.juhe.cn/verifybankcard/query',
195+
'param' => 'realname,bankcard',
196+
'result' => 'res,error_code,reason',
197+
'is_need' => 1,
198+
'state' => 1,
199+
'created_at' => '2019-04-19 07:52:02',
200+
'updated_at' => '2019-04-19 07:52:02',
145201
),
146202
));
147-
148-
203+
204+
149205
}
150-
}
206+
}

0 commit comments

Comments
 (0)