Memberauth.php 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?php
  2. /**
  3. * Niushop商城系统 - 团队十年电商经验汇集巨献!
  4. * =========================================================
  5. * Copy right 2019-2029 山西牛酷信息科技有限公司, 保留所有权利。
  6. * ----------------------------------------------
  7. * 官方网址: https://www.niushop.com.cn
  8. * 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和使用。
  9. * 任何企业和个人不允许对程序代码以任何形式任何目的再发布。
  10. * =========================================================
  11. */
  12. namespace app\admin\controller;
  13. use app\model\member\MemberAuth as MemberAuthModel;
  14. /**
  15. * 实名认证列表
  16. */
  17. class Memberauth extends BaseAdmin
  18. {
  19. /**
  20. * 实名认证列表
  21. */
  22. public function lists()
  23. {
  24. if(request()->isAjax()){
  25. $page = input('page', 1);
  26. $page_size = input('page_size', PAGE_LIST_ROWS);
  27. $search_text = input('search_text', '');
  28. $condition = [];
  29. $condition[] = ['member_username|auth_card_name', 'like', "%". $search_text ."%"];
  30. $field = '*';
  31. $member_auth_model = new MemberAuthModel();
  32. $lists = $member_auth_model->getMemberAuthPageList($condition, $page, $page_size,'', $field);
  33. return $lists;
  34. }else{
  35. return $this->fetch('memberauth/lists');
  36. }
  37. }
  38. /**
  39. * 申请详情
  40. */
  41. public function detail()
  42. {
  43. $auth_id = input('auth_id', 0);
  44. $member_auth_model = new MemberAuthModel();
  45. $detail = $member_auth_model->getMemberAuthInfo([ [ 'auth_id', '=', $auth_id ] ]);
  46. $auth_status_arr = $member_auth_model->getAuthStatus();
  47. $detail['data']['status_name'] = $auth_status_arr[ $detail['data']['status']];
  48. $this->assign('info', $detail['data']);
  49. return $this->fetch('memberauth/detail');
  50. }
  51. /**
  52. * 实名审核通过
  53. */
  54. public function pass()
  55. {
  56. $auth_id = input('auth_id', 0);
  57. $this->addLog("实名审核通过id:".$auth_id);
  58. $member_auth_model = new MemberAuthModel();
  59. return $member_auth_model->authPass($auth_id);
  60. }
  61. /**
  62. * 实名审核拒绝
  63. */
  64. public function reject()
  65. {
  66. $auth_id = input('auth_id', 0);
  67. $reason = input('reason', '');
  68. $this->addLog("实名审核拒绝id:".$auth_id);
  69. $member_auth_model = new MemberAuthModel();
  70. return $member_auth_model->authReject($auth_id, $reason);
  71. }
  72. }