Delivery.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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\Delivery as DeliveryService;
  15. class Delivery extends Auth {
  16. /**
  17. * 列表
  18. * @return string|\think\response\Json
  19. */
  20. public function index(){
  21. try{
  22. if(Request::isAjax()){
  23. $list = DeliveryService::getList(Request::param());
  24. return Response::returnArray("ok",0,$list["data"],$list['count']);
  25. }
  26. return View::fetch();
  27. }catch (\Exception $ex){
  28. return Response::returnArray($ex->getMessage(),1);
  29. }
  30. }
  31. /**
  32. * 详情
  33. * @return string
  34. */
  35. public function detail(){
  36. try{
  37. return View::fetch("",DeliveryService::detail(Request::param("id")));
  38. }catch (\Exception $ex){
  39. $this->error($ex->getMessage());
  40. }
  41. }
  42. }