Commit 1026d6be authored by shajiaiming's avatar shajiaiming

fix

parent 1945be06
......@@ -52,14 +52,27 @@ class CoinDogController extends BaseController
ksort($signParams);
$signString = http_build_query($signParams);
$httpParams['sign'] = strtolower(md5($signString));
$httpParams['limit'] = $limit;
$httpParams['id'] = $id;
$httpParams['flag'] = $flag;
$httpParams = [
'sign' => strtolower(md5($signString)),
'limit' => $limit,
'id' => $id,
'flag' => $flag
];
$url = $coindog['live'].'?'.http_build_query($httpParams);
$curl = new Curl();
$resp = $curl->get($url, false);
echo json_encode($resp);exit;
if(!isset($resp['list'])) {
$msg = '数据不存在';
$code = -1;
$data = null;
goto doEnd;
}
$list = $resp['list'][0]['lives'];
$code = 0;
$msg = 'success';
doEnd :
return ['code' => $code, 'data' => $list, 'msg' => $msg];
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment