Product.class.php 762 Bytes
<?php
/**
 * 默认控制器
 */
class Controller_Product extends Controller_Abstract
{
    
    public function indexAction()
    {
       return $this->_forward('news/index');
    }
    
    /**
     * 限量推荐
     */
    public function recommendAction()
    {
       $this->_viewname ='/../default/other';
    }
    
    /**
     * 获取限量推荐
     * 
     * @return json
     */    
    public function getrecommendAction()
    {
         $offset = intval($this->_request->query('offset', 0));
         $limit = intval($this->_request->query('limit', 5));
         $recomStatus = 1;
         $products = Facade_Prod::getProd($recomStatus, $offset, $limit);
         return $this->returnJson(true, 200, array_values($products), '');     
    }
}