freight.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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('freight', function () {
  16. //物流公司资源路由
  17. Route::resource('express', 'v1.freight.Express')->except(['read'])->name('ExpressResource')->option([
  18. 'real_name' => [
  19. 'index' => '获取物流公司列表',
  20. 'create' => '获取物流公司表单',
  21. 'save' => '保存物流公司',
  22. 'edit' => '获取修改物流公司表单',
  23. 'update' => '修改物流公司',
  24. 'delete' => '删除物流公司'
  25. ],
  26. ]);
  27. //修改状态
  28. Route::put('express/set_status/:id/:status', 'v1.freight.Express/set_status')->option(['real_name' => '修改物流公司状态']);
  29. //同步物流快递公司
  30. Route::get('express/sync_express', 'v1.freight.Express/syncExpress')->option(['real_name' => '同步物流公司']);
  31. //物流配置编辑表单
  32. Route::get('config/edit_basics', 'v1.setting.SystemConfig/edit_basics')->option(['real_name' => '物流配置编辑表单']);
  33. //物流配置保存数据
  34. Route::post('config/save_basics', 'v1.setting.SystemConfig/save_basics')->option(['real_name' => '物流配置保存数据']);
  35. })->middleware([
  36. \app\http\middleware\AllowOriginMiddleware::class,
  37. \app\adminapi\middleware\AdminAuthTokenMiddleware::class,
  38. \app\adminapi\middleware\AdminCheckRoleMiddleware::class,
  39. \app\adminapi\middleware\AdminLogMiddleware::class
  40. ])->option(['mark' => 'freight', 'mark_name' => '物流管理']);