PaymentController.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | LARAVEL8.0 框架 [ LARAVEL ][ RXThinkCMF ]
  4. // +----------------------------------------------------------------------
  5. // | 版权所有 2017~2021 LARAVEL研发中心
  6. // +----------------------------------------------------------------------
  7. // | 官方网站: http://www.laravel.cn
  8. // +----------------------------------------------------------------------
  9. // | Author: laravel开发员 <laravel.qq.com>
  10. // +----------------------------------------------------------------------
  11. namespace App\Http\Controllers\Admin;
  12. use App\Services\Api\MemberPaymentService;
  13. use App\Services\Common\NoticeService;
  14. /**
  15. * 收款方式-控制器
  16. * Class PaymentController
  17. * @package App\Http\Controllers
  18. */
  19. class PaymentController extends Backend
  20. {
  21. /**
  22. * 构造函数
  23. * PaymentController constructor.
  24. */
  25. public function __construct()
  26. {
  27. parent::__construct();
  28. $this->service = new MemberPaymentService();
  29. }
  30. /**
  31. * 列表
  32. * @return mixed
  33. */
  34. public function index()
  35. {
  36. $type = request()->get('type', 1);
  37. $pageSize = request()->get('limit', 99);
  38. $list = $this->service->getOptionList($this->userInfo['user_id'], $type, $pageSize);
  39. $message = array(
  40. "msg" => '操作成功',
  41. "code" => 0,
  42. "data" => isset($list['list'])? $list['list']:[],
  43. "count" => isset($list['total'])? $list['total']:0,
  44. );
  45. return $message;
  46. }
  47. /**
  48. * 编辑/新增
  49. * @return array|mixed
  50. */
  51. public function edit(){
  52. return $this->service->edit($this->userInfo['user_id']);
  53. }
  54. }