Commit 8e3319ee authored by shajiaiming's avatar shajiaiming

Merge branch 'master' into feature/issue_coin

parents fb8f7598 c2a11779
...@@ -22,7 +22,12 @@ class CoinDogController extends BaseController ...@@ -22,7 +22,12 @@ class CoinDogController extends BaseController
$appSecret = $bishijie['AppSecret']; $appSecret = $bishijie['AppSecret'];
$bishijie_service = new BishijieService($appid, $appSecret); $bishijie_service = new BishijieService($appid, $appSecret);
$article = $bishijie_service->getArticleList($page, $size); $article = $bishijie_service->getArticleList($page, $size);
foreach ($article['list'] as &$val) {
if (isset($val['news_id']) && !isset($val['id'])) {
$val['id'] = $val['news_id'];
}
$val['share_url'] = $bishijie['Url'] . '/shendu_' . $val['id'];
}
$data = [ $data = [
'list' => isset($article['list']) ? $article['list'] : [], 'list' => isset($article['list']) ? $article['list'] : [],
'page' => [ 'page' => [
...@@ -50,7 +55,7 @@ class CoinDogController extends BaseController ...@@ -50,7 +55,7 @@ class CoinDogController extends BaseController
$appSecret = $bishijie['AppSecret']; $appSecret = $bishijie['AppSecret'];
$bishijie_service = new BishijieService($appid, $appSecret); $bishijie_service = new BishijieService($appid, $appSecret);
$article = $bishijie_service->getArticleDetail($id); $article = $bishijie_service->getArticleDetail($id);
$article['share_url'] = $bishijie['Url'] . '/shendu_' . $id;
if (@$article['code']) { if (@$article['code']) {
$msg = $article['message']; $msg = $article['message'];
$code = -1; $code = -1;
...@@ -107,6 +112,7 @@ class CoinDogController extends BaseController ...@@ -107,6 +112,7 @@ class CoinDogController extends BaseController
foreach ($list as &$item) { foreach ($list as &$item) {
preg_match_all("/\【(.+?)\】/", $item['content'], $match); preg_match_all("/\【(.+?)\】/", $item['content'], $match);
$item['title'] = $match[1][0]; $item['title'] = $match[1][0];
$item['content'] = str_replace('【' . $item['title'] . '】', '', $item['content']);
} }
$code = 0; $code = 0;
$msg = 'success'; $msg = 'success';
......
...@@ -194,8 +194,14 @@ class ExchangeBusiness ...@@ -194,8 +194,14 @@ class ExchangeBusiness
} }
if (in_array(strtoupper($tag), ['KPC8'])) { if (in_array(strtoupper($tag), ['KPC8'])) {
$exchange = ExchangeFactory::createExchange("Biki"); // $exchange = ExchangeFactory::createExchange("Biki");
$quotation = $exchange->getTicker('KPC8', 'USDT'); // $quotation = $exchange->getTicker('KPC8', 'USDT');
// goto doEnd;
$quotation = [
'low' => 1,
'high' => 1,
'last' => 1,
];
goto doEnd; goto doEnd;
} }
......
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