Commit f10f61ed authored by shajiaiming's avatar shajiaiming

Merge branch 'master' into feature/issue_coin

parents be8d0365 b340acf5
...@@ -35,8 +35,8 @@ class ZhaobiBuilder extends FactoryService ...@@ -35,8 +35,8 @@ class ZhaobiBuilder extends FactoryService
$explode_arr = explode($coin, $val['symbol']); $explode_arr = explode($coin, $val['symbol']);
if (2 == count($explode_arr) && empty($explode_arr[1])) { if (2 == count($explode_arr) && empty($explode_arr[1])) {
$temp = []; $temp = [];
$temp['symbol'] = strtoupper($explode_arr[0]) . '/' . $coin; $temp['symbol'] = ('BCC' == strtoupper($explode_arr[0])) ? 'BCH' . '/' . $coin : strtoupper($explode_arr[0]) . '/' . $coin;
$temp['currency'] = strtoupper($explode_arr[0]); $temp['currency'] = ('BCC' == strtoupper($explode_arr[0])) ? 'BCH' : strtoupper($explode_arr[0]);
$temp['base_currency'] = strtoupper($coin); $temp['base_currency'] = strtoupper($coin);
$temp['close'] = number_format($val['last'], 6, '.', ''); $temp['close'] = number_format($val['last'], 6, '.', '');
if ('0.000000' == $temp['close']) continue; if ('0.000000' == $temp['close']) continue;
...@@ -86,11 +86,11 @@ class ZhaobiBuilder extends FactoryService ...@@ -86,11 +86,11 @@ class ZhaobiBuilder extends FactoryService
$temp['change'] = (0 == $open) ? 0 : (float)sprintf("%0.2f", ($close - $open) / $open * 100); $temp['change'] = (0 == $open) ? 0 : (float)sprintf("%0.2f", ($close - $open) / $open * 100);
array_push($ticker, $temp); array_push($ticker, $temp);
} }
$ticker_sort_close= $this->arraySort($ticker,'close'); $ticker_sort_close = $this->arraySort($ticker, 'close');
foreach ($ticker_sort_close as $val) { foreach ($ticker_sort_close as $val) {
$this->redis->lpush($this->supported_symbol_close_sort_list, $val['symbol']); $this->redis->lpush($this->supported_symbol_close_sort_list, $val['symbol']);
} }
$ticker_change_close= $this->arraySort($ticker,'change'); $ticker_change_close = $this->arraySort($ticker, 'change');
foreach ($ticker_change_close as $val) { foreach ($ticker_change_close as $val) {
$this->redis->lpush($this->supported_symbol_change_sort_list, $val['symbol']); $this->redis->lpush($this->supported_symbol_change_sort_list, $val['symbol']);
} }
...@@ -107,7 +107,7 @@ class ZhaobiBuilder extends FactoryService ...@@ -107,7 +107,7 @@ class ZhaobiBuilder extends FactoryService
$res['data']['abstract'] = str_replace(' ', '', str_replace(' ', '', $res['data']['abstract'])); $res['data']['abstract'] = str_replace(' ', '', str_replace(' ', '', $res['data']['abstract']));
$res['data']['content'] = str_replace(' ', '', str_replace(' ', '', $res['data']['content'])); $res['data']['content'] = str_replace(' ', '', str_replace(' ', '', $res['data']['content']));
$res['data']['source'] = '找币'; $res['data']['source'] = '找币';
$res['data']['share_url'] = \Yii::$app->params['service']['ZhaobiService']['h5_url']. '/account/help/' . $params['id']; $res['data']['share_url'] = \Yii::$app->params['service']['ZhaobiService']['h5_url'] . '/account/help/' . $params['id'];
return ['code' => $this->code, 'notice' => $res['data']]; return ['code' => $this->code, 'notice' => $res['data']];
} else { } else {
return ['code' => $this->code, 'notice' => $res['data'], 'msg' => $res['message']]; return ['code' => $this->code, 'notice' => $res['data'], 'msg' => $res['message']];
......
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