Commit 4a983ad7 authored by shajiaiming's avatar shajiaiming

Merge branch 'master' into feature/oss

parents 0de544a5 c2a11779
......@@ -22,7 +22,12 @@ class CoinDogController extends BaseController
$appSecret = $bishijie['AppSecret'];
$bishijie_service = new BishijieService($appid, $appSecret);
$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 = [
'list' => isset($article['list']) ? $article['list'] : [],
'page' => [
......@@ -50,7 +55,7 @@ class CoinDogController extends BaseController
$appSecret = $bishijie['AppSecret'];
$bishijie_service = new BishijieService($appid, $appSecret);
$article = $bishijie_service->getArticleDetail($id);
$article['share_url'] = $bishijie['Url'] . '/shendu_' . $id;
if (@$article['code']) {
$msg = $article['message'];
$code = -1;
......@@ -107,6 +112,7 @@ class CoinDogController extends BaseController
foreach ($list as &$item) {
preg_match_all("/\【(.+?)\】/", $item['content'], $match);
$item['title'] = $match[1][0];
$item['content'] = str_replace('【' . $item['title'] . '】', '', $item['content']);
}
$code = 0;
$msg = 'success';
......
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