Commit f5111fce authored by shajiaiming's avatar shajiaiming

Merge branch 'master' into develop

parents 2255dfe8 df373183
...@@ -44,8 +44,9 @@ class NoticeController extends BaseController ...@@ -44,8 +44,9 @@ class NoticeController extends BaseController
$size = \Yii::$app->request->get('size', 10); $size = \Yii::$app->request->get('size', 10);
$query = Notice::find() $query = Notice::find()
->select('id, title, content, author, type, is_top, create_time') ->select('id, title, content, author, type, is_top, create_time, update_time')
->where(['status' => Notice::STATUS_ON, 'platform_id' => (int)$platform_id]) ->where(['status' => Notice::STATUS_ON, 'platform_id' => (int)$platform_id])
->groupBy('title')
->orderBy('create_time desc'); ->orderBy('create_time desc');
if (false != $type) { if (false != $type) {
......
...@@ -127,6 +127,12 @@ class ExchangeBusiness ...@@ -127,6 +127,12 @@ class ExchangeBusiness
} }
$f = false; $f = false;
$quotation = []; $quotation = [];
if (in_array(strtoupper($tag), ['PAX'])) {
$exchange = ExchangeFactory::createExchange("HuoBi");
$quotation = $exchange->getTicker($tag, 'husd');
goto doEnd;
}
if (in_array(strtoupper($tag), ['DRA'])) { if (in_array(strtoupper($tag), ['DRA'])) {
$exchange = ExchangeFactory::createExchange("Draex"); $exchange = ExchangeFactory::createExchange("Draex");
$quotation = $exchange->getTicker($tag, 'USDT'); $quotation = $exchange->getTicker($tag, 'USDT');
...@@ -314,7 +320,7 @@ class ExchangeBusiness ...@@ -314,7 +320,7 @@ class ExchangeBusiness
$exchange = ExchangeFactory::createExchange("Go"); $exchange = ExchangeFactory::createExchange("Go");
$rate = $exchange->getTicker("CNY", "USD"); $rate = $exchange->getTicker("CNY", "USD");
$cny_usd_rate = 1 / $rate['last']; $cny_usd_rate = 1 / $rate['last'];
if (in_array(strtoupper($tag), ['FOLI', 'CIC', 'KPC8', 'BVA', 'DAG', 'BNC', 'GHP', 'DRA', 'ETC'])) { if (in_array(strtoupper($tag), ['FOLI', 'CIC', 'KPC8', 'BVA', 'DAG', 'BNC', 'GHP', 'DRA', 'ETC', 'PAX'])) {
$quotation['usd'] = (float)sprintf("%0.4f", $quotation['last']); $quotation['usd'] = (float)sprintf("%0.4f", $quotation['last']);
$quotation['rmb'] = (float)sprintf("%0.4f", $quotation['last'] / $cny_usd_rate); $quotation['rmb'] = (float)sprintf("%0.4f", $quotation['last'] / $cny_usd_rate);
} else if (in_array(strtoupper($tag), ['SUSD'])) { } 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