Authored by whb

common getBanner

1 <?php 1 <?php
2 use Action\WebAction; 2 use Action\WebAction;
3 use Index\HomeModel; 3 use Index\HomeModel;
  4 +use LibModels\Web\Home\IndexData;
4 use Plugin\Cache; 5 use Plugin\Cache;
5 use Configs\CacheConfig; 6 use Configs\CacheConfig;
6 use Api\Yohobuy; 7 use Api\Yohobuy;
@@ -87,8 +88,8 @@ class CommonController extends WebAction @@ -87,8 +88,8 @@ class CommonController extends WebAction
87 'content_code' => $content_code, 88 'content_code' => $content_code,
88 'client_type' => $client_type 89 'client_type' => $client_type
89 ); 90 );
90 - $data = Yohobuy::get($url.http_build_query($params));  
91 - if(empty($data)) 91 + $data = IndexData::getResourceData($content_code);//Yohobuy::get($url.http_build_query($params));
  92 + if(empty($data['data']))
92 { 93 {
93 return $this->helpJsonCallbackResult($callback, 200, '没有数据', ''); 94 return $this->helpJsonCallbackResult($callback, 200, '没有数据', '');
94 } 95 }