BalanceRecharge.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace app\admin\controller;
  3. use app\model\member\BalanceRecharge as BalanceRechargeModel;
  4. class BalanceRecharge extends BaseAdmin
  5. {
  6. /**
  7. * @return array|mixed
  8. * index
  9. */
  10. public function index(){
  11. if (request()->isAjax()) {
  12. $page = input('page', 1);
  13. $limit = input('page_size', PAGE_LIST_ROWS);
  14. $condition = [];
  15. $member_username = input('member_username','');
  16. if($member_username){
  17. $condition[] = ['member_username','like','%'.$member_username.'%'];
  18. }
  19. $notice = new BalanceRechargeModel();
  20. $list = $notice->getBalanceRechargePageList($condition, $page, $limit);
  21. return $list;
  22. }
  23. return $this->fetch('balance_recharge/index');
  24. }
  25. /**
  26. * 公告删除
  27. * @return string[]|mixed[]
  28. */
  29. public function deleteRecommend()
  30. {
  31. if (request()->isAjax()) {
  32. $id = input('id', '');
  33. $notice = new BalanceRechargeModel();
  34. $res = $notice->delete_BalanceRecharge([ [ 'id', 'in', $id ] ]);
  35. return $res;
  36. }
  37. }
  38. }