控制台应用,yzncms本身基于tp5.1框架,里面的队列用不了,bug,坑
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Member.php 3.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | Yzncms [ 御宅男工作室 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2018 http://yzncms.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  8. // +----------------------------------------------------------------------
  9. // | Author: 御宅男 <530765310@qq.com>
  10. // +----------------------------------------------------------------------
  11. // +----------------------------------------------------------------------
  12. // | 会员插件
  13. // +----------------------------------------------------------------------
  14. namespace addons\member;
  15. use app\common\library\Menu;
  16. use think\Addons;
  17. class Member extends Addons
  18. {
  19. public $cache_list = [
  20. 'Member_Group' => [
  21. 'name' => '会员组',
  22. 'model' => 'MemberGroup',
  23. 'action' => 'membergroup_cache',
  24. ],
  25. ];
  26. /**
  27. * 插件安装方法
  28. * @return bool
  29. */
  30. public function install()
  31. {
  32. $menu = [
  33. [
  34. "name" => "member",
  35. "title" => "会员管理",
  36. "icon" => "iconfont icon-user-line",
  37. "sublist" => [
  38. [
  39. "name" => "member.member",
  40. "title" => "会员管理",
  41. "icon" => "iconfont icon-user-line",
  42. "listorder" => 99,
  43. "sublist" => [
  44. ["name" => "member.member/index", "title" => "查看"],
  45. ["name" => "member.member/add", "title" => "新增"],
  46. ["name" => "member.member/edit", "title" => "编辑"],
  47. ["name" => "member.member/del", "title" => "删除"],
  48. ["name" => "member.member/pass", "title" => "审核"],
  49. ],
  50. ],
  51. [
  52. "name" => "member.member/userverify",
  53. "title" => "审核会员",
  54. "icon" => "iconfont icon-user-star-line",
  55. "listorder" => 98,
  56. "ismenu" => 1,
  57. ],
  58. [
  59. "name" => "member.group",
  60. "title" => "会员组管理",
  61. "icon" => "iconfont icon-user-settings-line",
  62. "sublist" => [
  63. ["name" => "member.group/index", "title" => "查看"],
  64. ["name" => "member.group/add", "title" => "新增"],
  65. ["name" => "member.group/edit", "title" => "编辑"],
  66. ["name" => "member.group/del", "title" => "删除"],
  67. ],
  68. ],
  69. ],
  70. ],
  71. ];
  72. Menu::create($menu);
  73. return true;
  74. }
  75. /**
  76. * 插件卸载方法
  77. * @return bool
  78. */
  79. public function uninstall()
  80. {
  81. Menu::delete("member");
  82. return true;
  83. }
  84. /**
  85. * 插件启用方法
  86. * @return bool
  87. */
  88. public function enable()
  89. {
  90. Menu::enable("member");
  91. return true;
  92. }
  93. /**
  94. * 插件禁用方法
  95. * @return bool
  96. */
  97. public function disable()
  98. {
  99. Menu::disable("member");
  100. return true;
  101. }
  102. }