Config.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. namespace app\admin\controller\pay;
  3. use app\common\controller\Backend;
  4. use app\common\Enum\PayEnum;
  5. /**
  6. * 支付配置
  7. *
  8. * @icon fa fa-circle-o
  9. */
  10. class Config extends Backend
  11. {
  12. /**
  13. * Config模型对象
  14. * @var \app\admin\model\pay\Config
  15. */
  16. protected $model = null;
  17. public function _initialize()
  18. {
  19. parent::_initialize();
  20. $this->model = new \app\admin\model\pay\Config;
  21. $this->view->assign("statusList", $this->model->getStatusList());
  22. $this->assignconfig("statusList", json_encode($this->model->getStatusList()));
  23. $this->assignconfig("methodList", json_encode(PayEnum::getPayMethodList()));
  24. $this->view->assign("methodList", PayEnum::getPayMethodList());
  25. $this->view->assign("merchantTypeList", PayEnum::getMerchantTypeList());
  26. $this->assignconfig("merchantTypeList", json_encode(PayEnum::getMerchantTypeList()));
  27. }
  28. /**
  29. * 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
  30. * 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
  31. * 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
  32. */
  33. }