AdminLoginBackstretchPlugin.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2013-2017 http://www.thinkcmf.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Author: Dean <zxxjjforever@163.com>
  8. // +----------------------------------------------------------------------
  9. namespace plugins\admin_login_backstretch;
  10. use cmf\lib\Plugin;
  11. use think\Db;
  12. class AdminLoginBackstretchPlugin extends Plugin
  13. {
  14. public $info = [
  15. 'name' => 'AdminLoginBackstretch',
  16. 'title' => '幻灯后台登陆插件',
  17. 'description' => '幻灯片后台登录页',
  18. 'status' => 1,
  19. 'author' => 'UpStream',
  20. 'version' => '1.0'
  21. ];
  22. public $hasAdmin = 0;//插件是否有后台管理界面
  23. // 插件安装
  24. public function install()
  25. {
  26. return true;//安装成功返回true,失败false
  27. }
  28. // 插件卸载
  29. public function uninstall()
  30. {
  31. return true;//卸载成功返回true,失败false
  32. }
  33. public function adminLogin()
  34. {
  35. $config = $this->getConfig();
  36. $this->assign($config);
  37. return $this->fetch('widget');
  38. }
  39. }