public function actionList() { if (isset($_GET['ajax'])) { $page = isset($_POST['page']) ? $_POST['page'] : 1; $rows = isset($_POST['rows']) ? $_POST['rows'] : 10; $apply_obj = new \app\models\Api_apply(); $data = $apply_obj->get_list([], $page, $rows); if (!$data) { echo '查询失败'; exit; } echo json_encode($data); } else { return $this->render('list'); } }
public function get_secret_key($re) { if (empty($re) || !is_array($re)) { return $re; } $ids = \app\models\common\Assist::get_fields($re, 'id'); // 查询申请记录 $apply_obj = new \app\models\Api_apply(); $apply_info = $apply_obj->get_info_aid($ids); // 查询申请记录的key if (empty($apply_info)) { return $re; } $apply_info = $this->process_allly_info($apply_info); if ($apply_info) { return $apply_info; } return $re; }