live.php 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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('live', function () {
  16. /** 主播 */
  17. Route::group(function () {
  18. //主播列表
  19. Route::get('anchor/list', 'v1.marketing.live.LiveAnchor/list')->option(['real_name' => '主播列表']);
  20. //添加修改主播表单
  21. Route::get('anchor/add/:id', 'v1.marketing.live.LiveAnchor/add')->option(['real_name' => '添加修改主播表单']);
  22. //保存主播数据
  23. Route::post('anchor/save', 'v1.marketing.live.LiveAnchor/save')->option(['real_name' => '保存主播数据']);
  24. //删除主播
  25. Route::delete('anchor/del/:id', 'v1.marketing.live.LiveAnchor/delete')->option(['real_name' => '删除主播']);
  26. //设置是否显示
  27. Route::get('anchor/set_show/:id/:is_show', 'v1.marketing.live.LiveAnchor/setShow')->option(['real_name' => '设置主播是否显示']);
  28. })->option(['parent' => 'live', 'cate_name' => '主播']);
  29. /** 直播商品 */
  30. Route::group(function () {
  31. //直播商品列表
  32. Route::get('goods/list', 'v1.marketing.live.LiveGoods/list')->option(['real_name' => '直播商品列表']);
  33. //生成直播商品
  34. Route::post('goods/create', 'v1.marketing.live.LiveGoods/create')->option(['real_name' => '生成直播商品']);
  35. //添加修改商品
  36. Route::post('goods/add', 'v1.marketing.live.LiveGoods/add')->option(['real_name' => '添加修改直播商品']);
  37. //商品详情
  38. Route::get('goods/detail/:id', 'v1.marketing.live.LiveGoods/detail')->option(['real_name' => '直播商品详情']);
  39. //商品重新审核
  40. Route::get('goods/audit/:id', 'v1.marketing.live.LiveGoods/audit')->option(['real_name' => '直播商品重新审核']);
  41. //商品撤回审核
  42. Route::get('goods/resestAudit/:id', 'v1.marketing.live.LiveGoods/resetAudit')->option(['real_name' => '直播商品撤回审核']);
  43. //删除商品
  44. Route::delete('goods/del/:id', 'v1.marketing.live.LiveGoods/delete')->option(['real_name' => '删除直播商品']);
  45. //设置是否显示
  46. Route::get('goods/set_show/:id/:is_show', 'v1.marketing.live.liveGoods/setShow')->option(['real_name' => '设置直播商品是否显示']);
  47. //同步直播商品状态
  48. Route::get('goods/syncGoods', 'v1.marketing.live.liveGoods/syncGoods')->option(['real_name' => '同步直播商品状态']);
  49. })->option(['parent' => 'live', 'cate_name' => '直播商品']);
  50. /** 主播间 */
  51. Route::group(function () {
  52. //直播间列表
  53. Route::get('room/list', 'v1.marketing.live.LiveRoom/list')->option(['real_name' => '直播间列表']);
  54. //直播间添加
  55. Route::post('room/add', 'v1.marketing.live.LiveRoom/add')->option(['real_name' => '直播间添加']);
  56. //直播间详情
  57. Route::get('room/detail/:id', 'v1.marketing.live.LiveRoom/detail')->option(['real_name' => '直播间详情']);
  58. //直播间添加商品
  59. Route::post('room/add_goods', 'v1.marketing.live.LiveRoom/addGoods')->option(['real_name' => '直播间添加商品']);
  60. //删除直播
  61. Route::delete('room/del/:id', 'v1.marketing.live.LiveRoom/delete')->option(['real_name' => '删除直播间']);
  62. //设置是否显示
  63. Route::get('room/set_show/:id/:is_show', 'v1.marketing.live.LiveRoom/setShow')->option(['real_name' => '设置直播间是否显示']);
  64. //同步直播间状态
  65. Route::get('room/syncRoom', 'v1.marketing.live.LiveRoom/syncRoom')->option(['real_name' => '同步直播间状态']);
  66. })->option(['parent' => 'live', 'cate_name' => '直播间']);
  67. })->middleware([
  68. \app\http\middleware\AllowOriginMiddleware::class,
  69. \app\adminapi\middleware\AdminAuthTokenMiddleware::class,
  70. \app\adminapi\middleware\AdminCheckRoleMiddleware::class,
  71. \app\adminapi\middleware\AdminLogMiddleware::class
  72. ])->option(['mark' => 'live', 'mark_name' => '直播管理']);