Commit 60367fb0 authored by shajiaiming's avatar shajiaiming

fix

parent c7b68635
......@@ -67,8 +67,13 @@ class ExchangeBusiness
public static function getquatation($tag = 'btc')
{
$coin_quotation_disable_items = Yii::$app->params['coin_quotation_disable_items'];
if (strtoupper($tag) == 'CCNY' || strtoupper($tag) == 'CNYT') {
if (strtoupper($tag) == 'CCNY' || strtoupper($tag) == 'CNYT' || strtoupper($tag) == 'ETC') {
$exchange = ExchangeFactory::createExchange("Zhaobi");
if (strtoupper($tag) == 'ETC') {
$quotation = $exchange->getTicker($tag, 'USDT');
$quotation['rmb'] = (float)sprintf("%0.4f", $quotation['last']);
goto doEnd;
}
$rate = $exchange->getTicker("BTY", "USDT");
$rate = (float)$rate['rmb'] / $rate['last'];
$quotation['rmb'] = 1.00;
......@@ -309,7 +314,7 @@ class ExchangeBusiness
$exchange = ExchangeFactory::createExchange("Go");
$rate = $exchange->getTicker("CNY", "USD");
$cny_usd_rate = 1 / $rate['last'];
if (in_array(strtoupper($tag), ['FOLI', 'CIC', 'KPC8', 'BVA', 'DAG', 'BNC', 'GHP', 'DRA'])) {
if (in_array(strtoupper($tag), ['FOLI', 'CIC', 'KPC8', 'BVA', 'DAG', 'BNC', 'GHP', 'DRA', 'ETC'])) {
$quotation['usd'] = (float)sprintf("%0.4f", $quotation['last']);
$quotation['rmb'] = (float)sprintf("%0.4f", $quotation['last'] / $cny_usd_rate);
} else if (in_array(strtoupper($tag), ['SUSD'])) {
......
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