海南旅游SAAS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.3 KiB

  1. <?php
  2. namespace App\Admin\Forms;
  3. use Dcat\Admin\Widgets\Form;
  4. class Setting extends Form
  5. {
  6. /**
  7. * Handle the form request.
  8. *
  9. * @param array $input
  10. *
  11. * @return mixed
  12. */
  13. public function handle(array $input)
  14. {
  15. // dump($input);
  16. // return $this->response()->error('Your error message.');
  17. admin_setting($input);
  18. return $this->response()->success('保存成功')->refresh();
  19. }
  20. /**
  21. * Build a form here.
  22. */
  23. public function form()
  24. {
  25. $this->tab('支付小程序配置', function () {
  26. $this->text('payee_appid', '收款小程序APPID')->required();
  27. $this->text('payee_appsecret', '收款小程序APP_SECRET')->required();
  28. $this->text('payee_mchid', '收款小程序MCH_ID')->required();
  29. $this->text('payee_mchkey', '收款小程序MCH_KEY')->required();
  30. })->tab('小程序服务商配置', function () {
  31. $this->text('service_appid', '小程序第三方平台APPID');
  32. $this->text('service_appsecret', '小程序第三方平台APP_SECRET');
  33. $this->text('service_binding_appid', '绑定小程序APPID');
  34. });
  35. }
  36. /**
  37. * The data of the form.
  38. *
  39. * @return array
  40. */
  41. public function default()
  42. {
  43. return admin_setting()->toArray();
  44. }
  45. }