common.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. use think\facade\Route;
  12. /**
  13. * 文件下载、导出相关路由
  14. */
  15. Route::group(function () {
  16. //下载备份记录表
  17. Route::get('backup/download', 'v1.system.SystemDatabackup/downloadFile')->option(['real_name' => '下载表备份记录']);
  18. //首页统计数据
  19. Route::get('home/header', 'Common/homeStatics')->option(['real_name' => '首页统计数据']);
  20. //首页订单图表
  21. Route::get('home/order', 'Common/orderChart')->option(['real_name' => '首页订单图表']);
  22. //首页用户图表
  23. Route::get('home/user', 'Common/userChart')->option(['real_name' => '首页用户图表']);
  24. //首页交易额排行
  25. Route::get('home/rank', 'Common/purchaseRanking')->option(['real_name' => '首页交易额排行']);
  26. //消息提醒
  27. Route::get('jnotice', 'Common/jnotice')->option(['real_name' => '消息提醒']);
  28. //验证授权
  29. Route::get('check_auth', 'Common/auth')->option(['real_name' => '验证授权']);
  30. //申请授权
  31. Route::post('auth_apply', 'Common/auth_apply')->option(['real_name' => '申请授权']);
  32. //授权
  33. Route::get('auth', 'Common/auth')->option(['real_name' => '授权信息']);
  34. //获取左侧菜单
  35. Route::get('menus', 'v1.setting.SystemMenus/menus')->option(['real_name' => '左侧菜单']);
  36. //获取搜索菜单列表
  37. Route::get('menusList', 'Common/menusList')->option(['real_name' => '搜索菜单列表']);
  38. //获取logo
  39. Route::get('logo', 'Common/getLogo')->option(['real_name' => '获取logo']);
  40. //查询版权
  41. Route::get('copyright', 'Common/copyright')->option(['real_name' => '申请版权']);
  42. //保存版权
  43. Route::post('copyright', 'Common/saveCopyright')->option(['real_name' => '保存版权']);
  44. })->middleware([
  45. \app\http\middleware\AllowOriginMiddleware::class,
  46. \app\adminapi\middleware\AdminAuthTokenMiddleware::class,
  47. \app\adminapi\middleware\AdminCheckRoleMiddleware::class,
  48. \app\adminapi\middleware\AdminLogMiddleware::class
  49. ])->option(['mark' => 'common', 'mark_name' => '系统数据']);