// +---------------------------------------------------------------------- namespace App\Http\Controllers\Admin; use App\Services\Common\MemberPaymentService; /** * 收款方式-控制器 * Class PaymentController * @package App\Http\Controllers */ class PaymentController extends Backend { /** * 构造函数 * PaymentController constructor. */ public function __construct() { parent::__construct(); $this->service = new MemberPaymentService(); } /** * 列表 * @return mixed */ public function index() { $type = request()->get('type', 1); $pageSize = request()->get('limit', 999); $list = $this->service->getOptionList($this->userInfo['user_id'], $type, $pageSize); $message = array( "msg" => '操作成功', "code" => 0, "data" => isset($list['list'])? $list['list']:[], "count" => isset($list['total'])? $list['total']:0, ); return $message; } /** * 编辑/新增 * @return array|mixed */ public function edit(){ return $this->service->saveData($this->userInfo['user_id']); } }