Commit 296e53b4 authored by shajiaiming's avatar shajiaiming

fix bug

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