12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <?php
- namespace app\api\controller;
- use think\facade\Request;
- use app\api\service\Home as HomeService;
- use app\common\exception\BaseException;
- class Index extends Base {
-
- public function index(){
- try{
- return $this->returnAjax("ok",1,HomeService::getData());
- }catch (\Exception $ex){
- return $this->returnAjax($ex->getMessage(),0);
- }
- }
-
- public function get_list(){
- try{
- return $this->returnAjax("ok",1,HomeService::getList(Request::param()));
- }catch (BaseException $ex){
- return $this->returnAjax($ex->getMessage(),$ex->getCode(),$ex->getRaw());
- }
- }
- }
|