Commit 0ca6e2b5 authored by shajiaiming's avatar shajiaiming

Merge branch 'master' into feature/jinse

parents 1026d6be 2e5d2f44
...@@ -151,10 +151,6 @@ class CoinController extends BaseController ...@@ -151,10 +151,6 @@ class CoinController extends BaseController
if ($coin_infos) { if ($coin_infos) {
array_shift($select); array_shift($select);
foreach ($coin_recommends as $key => &$value) { foreach ($coin_recommends as $key => &$value) {
if(!isset($coin_infos[$value['cid']]['name'])) {
unset($coin_recommends[$key]);
continue;
}
$temp_key = $coin_infos[$value['cid']]['name']; $temp_key = $coin_infos[$value['cid']]['name'];
foreach ($select as $item) { foreach ($select as $item) {
$value[$item] = $coin_infos[$value['cid']][$item]; $value[$item] = $coin_infos[$value['cid']][$item];
......
...@@ -54,10 +54,6 @@ class CoinRecommend extends BaseActiveRecord ...@@ -54,10 +54,6 @@ class CoinRecommend extends BaseActiveRecord
$coin_info = Coin::getCoinInfoByIds($coin_ids, $select, 'id'); $coin_info = Coin::getCoinInfoByIds($coin_ids, $select, 'id');
} }
foreach ($data as $key => &$value) { foreach ($data as $key => &$value) {
if(!isset($coin_info[$value['cid']]['name'])){
unset($data[$key]);
continue;
};
$value['coin'] = $coin_info[$value['cid']]['name']; $value['coin'] = $coin_info[$value['cid']]['name'];
} }
unset($key, $value); unset($key, $value);
......
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