示例#1
0
 /**
  * Auther:langxi
  *
  * app项目列表
  */
 public function actionProductlist()
 {
     $result = App::AppGet();
     try {
         if ($result['errorNum']) {
             $result = array('errorNum' => $result['errorNum'], 'errorMsg' => $result['errorMsg'], 'data' => null);
         } else {
             $data = $result['data'];
             if (array_key_exists('page', $data) && array_key_exists('page_num', $data)) {
                 $page_num = $data['page_num'];
                 $page = $data['page'];
                 $result = Invest::product_list($page_num, $page);
             } else {
                 $result = array('errorNum' => '1', 'errorMsg' => '参数错误', 'data' => null);
             }
         }
     } catch (ErrorException $e) {
         Yii::error("app项目列表---异常 方法:actionProductlist 参数:" . json_encode($result['data']), "app");
         Yii::trace($e->getMessage(), "app");
         $result = array('errorNum' => '7', 'errorMsg' => '服务器异常,请联系管理员', 'data' => null);
     }
     $result = App::AppReturn($result);
     return $result;
 }
示例#2
0
 public function actionProductlist()
 {
     if ($_REQUEST) {
         $page = intval($_REQUEST[page]);
         $page_num = intval($_REQUEST[num]);
         try {
             $result = Invest::product_list($page_num, $page);
         } catch (Exception $ex) {
             $result = '';
         }
         $datas = json_encode($result[data]);
         echo $datas;
     }
 }