控制台应用,yzncms本身基于tp5.1框架,里面的队列用不了,bug,坑
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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\area;
  15. use app\common\library\Menu;
  16. use think\Addons;
  17. class Area extends Addons
  18. {
  19. /**
  20. * 插件安装方法
  21. * @return bool
  22. */
  23. public function install()
  24. {
  25. $menu = [
  26. [
  27. "name" => "area",
  28. "title" => "地区管理",
  29. "sublist" => [
  30. ["name" => "area/index", "title" => "查看"],
  31. ["name" => "area/add", "title" => "新增"],
  32. ["name" => "area/edit", "title" => "编辑"],
  33. ["name" => "area/del", "title" => "删除"],
  34. ["name" => "area/refresh", "title" => "刷新"],
  35. ],
  36. ],
  37. ];
  38. Menu::create($menu);
  39. return true;
  40. }
  41. /**
  42. * 插件卸载方法
  43. * @return bool
  44. */
  45. public function uninstall()
  46. {
  47. Menu::delete("area");
  48. return true;
  49. }
  50. /**
  51. * 插件启用方法
  52. * @return bool
  53. */
  54. public function enable()
  55. {
  56. Menu::enable("area");
  57. return true;
  58. }
  59. /**
  60. * 插件禁用方法
  61. * @return bool
  62. */
  63. public function disable()
  64. {
  65. Menu::disable("area");
  66. return true;
  67. }
  68. }