RechargeController.php 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | likeshop100%开源免费商用商城系统
  4. // +----------------------------------------------------------------------
  5. // | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
  6. // | 开源版本可自由商用,可去除界面版权logo
  7. // | 商业版本务必购买商业授权,以免引起法律纠纷
  8. // | 禁止对系统程序代码以任何目的,任何形式的再发布
  9. // | gitee下载:https://gitee.com/likeshop_gitee
  10. // | github下载:https://github.com/likeshop-github
  11. // | 访问官网:https://www.likeshop.cn
  12. // | 访问社区:https://home.likeshop.cn
  13. // | 访问手册:http://doc.likeshop.cn
  14. // | 微信公众号:likeshop技术社区
  15. // | likeshop团队 版权所有 拥有最终解释权
  16. // +----------------------------------------------------------------------
  17. // | author: likeshopTeam
  18. // +----------------------------------------------------------------------
  19. namespace app\adminapi\controller\recharge;
  20. use app\adminapi\controller\BaseAdminController;
  21. use app\adminapi\logic\recharge\RechargeLogic;
  22. /**
  23. * 充值控制器
  24. * Class RechargeController
  25. * @package app\adminapi\controller\recharge
  26. */
  27. class RechargeController extends BaseAdminController
  28. {
  29. /**
  30. * @notes 获取充值设置
  31. * @return \think\response\Json
  32. * @author Tab
  33. * @date 2021/8/10 17:00
  34. */
  35. public function getConfig()
  36. {
  37. $result = RechargeLogic::getConfig();
  38. return $this->data($result);
  39. }
  40. /**
  41. * @notes 充值设置
  42. * @return \think\response\Json
  43. * @author Tab
  44. * @date 2021/8/10 18:13
  45. */
  46. public function setConfig()
  47. {
  48. $params = $this->request->post();
  49. $result = RechargeLogic::setConfig($params);
  50. if($result) {
  51. return $this->success('设置成功');
  52. }
  53. return $this->fail(RechargeLogic::getError());
  54. }
  55. /**
  56. * @notes 查看充值记录列表
  57. * @return \think\response\Json
  58. * @author Tab
  59. * @date 2021/8/11 15:22
  60. */
  61. public function lists()
  62. {
  63. return $this->dataLists();
  64. }
  65. /**
  66. * @notes 充值数据中心
  67. * @return \think\response\Json
  68. * @author Tab
  69. * @date 2021/8/11 16:43
  70. */
  71. public function dataCenter()
  72. {
  73. $result = RechargeLogic::dataCenter();
  74. return $this->data($result);
  75. }
  76. }