PaymentController.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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\Common\MemberPaymentService;
  13. /**
  14. * 收款方式-控制器
  15. * Class PaymentController
  16. * @package App\Http\Controllers
  17. */
  18. class PaymentController extends Backend
  19. {
  20. /**
  21. * 构造函数
  22. * PaymentController constructor.
  23. */
  24. public function __construct()
  25. {
  26. parent::__construct();
  27. $this->service = new MemberPaymentService();
  28. }
  29. /**
  30. * 列表
  31. * @return mixed
  32. */
  33. public function index()
  34. {
  35. $type = request()->get('type', 1);
  36. $pageSize = request()->get('limit', 999);
  37. $list = $this->service->getOptionList($this->userInfo['user_id'], $type, $pageSize);
  38. $message = array(
  39. "msg" => '操作成功',
  40. "code" => 0,
  41. "data" => isset($list['list'])? $list['list']:[],
  42. "count" => isset($list['total'])? $list['total']:0,
  43. );
  44. return $message;
  45. }
  46. /**
  47. * 编辑/新增
  48. * @return array|mixed
  49. */
  50. public function edit(){
  51. return $this->service->saveData($this->userInfo['user_id']);
  52. }
  53. }