Collection.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | A3Mall
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2020 http://www.a3-mall.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Author: xzncit <158373108@qq.com>
  8. // +----------------------------------------------------------------------
  9. namespace app\admin\controller\order;
  10. use app\admin\controller\Auth;
  11. use think\facade\Request;
  12. use mall\response\Response;
  13. use think\facade\View;
  14. use app\admin\service\order\Collection as CollectionService;
  15. class Collection extends Auth {
  16. public function index(){
  17. try{
  18. if(Request::isAjax()){
  19. $list = CollectionService::getList(Request::param());
  20. return Response::returnArray("ok",0,$list['data'],$list['count']);
  21. }
  22. return View::fetch();
  23. }catch (\Exception $ex){
  24. return Response::returnArray($ex->getMessage(),1);
  25. }
  26. }
  27. /**
  28. * 详情
  29. * @return string
  30. */
  31. public function detail(){
  32. try{
  33. return View::fetch("",CollectionService::detail(Request::param("id")));
  34. }catch (\Exception $ex){
  35. $this->error($ex->getMessage());
  36. }
  37. }
  38. }