Bank.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <?php
  2. namespace app\user\controller;
  3. use library\Controller;
  4. use think\Db;
  5. /**
  6. * 银行账号管理
  7. * Class Bank
  8. * @package app\store\controller
  9. */
  10. class Bank extends Controller
  11. {
  12. /**
  13. * 绑定数据表
  14. * @var string
  15. */
  16. protected $table = 'UserBank';
  17. /**
  18. * 账号管理
  19. * @auth true
  20. * @menu true
  21. * @throws \think\Exception
  22. * @throws \think\db\exception\DataNotFoundException
  23. * @throws \think\db\exception\ModelNotFoundException
  24. * @throws \think\exception\DbException
  25. * @throws \think\exception\PDOException
  26. */
  27. public function index()
  28. {
  29. $this->title = '等级管理';
  30. $where = [] ;
  31. $where[] = ['b.is_deleted','=',0];
  32. $query = $this->_query($this->table)
  33. ->field('b.*,m.headimg')
  34. ->alias('b')
  35. ->join('store_member m','m.id = b.user_id','LEFT')
  36. ->order('b.id asc')->page();
  37. }
  38. /**
  39. * 数据列表处理
  40. * @auth true
  41. * @menu true
  42. * @param array $data
  43. * @throws \think\db\exception\DataNotFoundException
  44. * @throws \think\db\exception\ModelNotFoundException
  45. * @throws \think\exception\DbException
  46. */
  47. protected function _index_page_filter(&$data)
  48. {
  49. }
  50. /**
  51. * 编辑等级
  52. * @auth true
  53. * @menu true
  54. * @throws \think\Exception
  55. * @throws \think\db\exception\DataNotFoundException
  56. * @throws \think\db\exception\ModelNotFoundException
  57. * @throws \think\exception\DbException
  58. * @throws \think\exception\PDOException
  59. */
  60. public function edit()
  61. {
  62. $this->title = '编辑等级';
  63. $this->_form($this->table, 'form');
  64. }
  65. /**
  66. * 表单数据处理
  67. * @auth true
  68. * @menu true
  69. * @param array $data
  70. */
  71. protected function _form_filter(&$data)
  72. {
  73. }
  74. }