Authored by 周少峰

add notice

@@ -57,14 +57,9 @@ class IndexController extends AbstractAction @@ -57,14 +57,9 @@ class IndexController extends AbstractAction
57 } 57 }
58 $notice = array(); 58 $notice = array();
59 $data = IndexData::getNotice(); 59 $data = IndexData::getNotice();
60 - do {  
61 - if ($data['code'] != 200 || !isset($data['open']) || $data['open'] != 'Y' || !isset($data['open']) || empty($data['list'])) {  
62 - break; 60 + if (isset($data['code']) && $data['code'] === 200 && isset($data['data']['open']) && $data['data']['open'] == 'Y' && isset($data['data']['list']) && !empty($data['data']['list'])) {
  61 + $notice = $data['data']['list'];
63 } 62 }
64 - foreach ($data['list'] as $key => $val) {  
65 -  
66 - }  
67 - } while(false);  
68 $this->echoJson($notice); 63 $this->echoJson($notice);
69 } 64 }
70 65