|
@@ -35,14 +35,14 @@ class refill_successfulControl extends SystemControl
|
|
|
$url = BASE_SITE_URL . '/plot/paths?time_stamp='.$_GET['timestamp'];
|
|
|
Log::record("successful get where url : {$url}", Log::DEBUG);
|
|
|
$data = http_request($url);
|
|
|
- if(empty($data)){
|
|
|
- echo(json_encode([]));
|
|
|
+ if(empty($conds)) {
|
|
|
+ echo(json_encode(''));
|
|
|
exit;
|
|
|
}
|
|
|
preg_match_all('/\d{10}\/[a-z]+\/\d{1,2}\/\d\/\d{2,4}/', $data, $matches);
|
|
|
$conds = $matches[0];
|
|
|
- if(empty($conds)){
|
|
|
- echo(json_encode([]));
|
|
|
+ if(empty($conds)) {
|
|
|
+ echo(json_encode(''));
|
|
|
exit;
|
|
|
}
|
|
|
foreach ($conds as $cond) {
|
|
@@ -75,4 +75,21 @@ class refill_successfulControl extends SystemControl
|
|
|
echo(json_encode($result));
|
|
|
exit;
|
|
|
}
|
|
|
+
|
|
|
+ private function scard_type(int $card_type)
|
|
|
+ {
|
|
|
+ if ($card_type == 1) { //中石油
|
|
|
+ return '中石油';
|
|
|
+ } elseif ($card_type == 2) { //中石化
|
|
|
+ return '中石化';
|
|
|
+ } elseif ($card_type == 4) { //中国移动
|
|
|
+ return '中国移动';
|
|
|
+ } elseif ($card_type == 5) { //中国联通
|
|
|
+ return '中国联通';
|
|
|
+ } elseif ($card_type == 6) { //中国电信
|
|
|
+ return '中国电信';
|
|
|
+ } else {
|
|
|
+ return 'unknown';
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|