Addon.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. /**
  3. * Niushop商城系统 - 团队十年电商经验汇集巨献!
  4. * =========================================================
  5. * Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
  6. * ----------------------------------------------
  7. * 官方网址: https://www.niushop.com
  8. * =========================================================
  9. */
  10. namespace app\shopapi\controller;
  11. use app\model\system\Addon as AddonModel;
  12. /**
  13. * 插件管理
  14. * @author Administrator
  15. *
  16. */
  17. class Addon extends BaseApi
  18. {
  19. /**
  20. * 列表信息
  21. */
  22. public function lists()
  23. {
  24. $addon = new AddonModel();
  25. $list = $addon->getAddonList();
  26. return $this->response($list);
  27. }
  28. public function addonisexit()
  29. {
  30. $addon_api = new \app\api\controller\Addon();
  31. $res = $addon_api->addonIsExit();
  32. return $res;
  33. }
  34. /**
  35. * 插件是否存在
  36. */
  37. public function isexit()
  38. {
  39. $name = $this->params[ 'name' ] ?? '';
  40. $res = 0;
  41. if (!empty($name)) $res = addon_is_exit($name, $this->site_id);
  42. return $this->response($this->success($res));
  43. }
  44. }