WebService.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | Niucloud-admin 企业快速开发的多应用管理平台
  4. // +----------------------------------------------------------------------
  5. // | 官方网址:https://www.niucloud.com
  6. // +----------------------------------------------------------------------
  7. // | niucloud团队 版权所有 开源版本可自由商用
  8. // +----------------------------------------------------------------------
  9. // | Author: Niucloud Team
  10. // +----------------------------------------------------------------------
  11. namespace app\service\admin\web;
  12. use app\dict\diy\WebLinkDict;
  13. use core\base\BaseAdminService;
  14. /**
  15. * web端基础服务层
  16. * Class WebService
  17. * @package app\service\admin\web
  18. */
  19. class WebService extends BaseAdminService
  20. {
  21. /**
  22. * 获取web端链接配置
  23. * @return array
  24. */
  25. public function getLink()
  26. {
  27. $link = WebLinkDict::getLink();
  28. foreach ($link as $k => $v) {
  29. $link[ $k ][ 'name' ] = $k;
  30. if (!empty($v[ 'child_list' ])) {
  31. foreach ($v[ 'child_list' ] as $ck => $cv) {
  32. $link[ $k ][ 'child_list' ][ $ck ][ 'parent' ] = $k;
  33. }
  34. }
  35. }
  36. return $link;
  37. }
  38. }