diy.php 4.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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('diy', function () {
  16. //DIY列表
  17. Route::get('get_list', 'v1.diy.Diy/getList')->option(['real_name' => 'Diy模板列表']);
  18. //DIY列表
  19. Route::get('get_info/:id', 'v1.diy.Diy/getInfo')->option(['real_name' => 'Diy模板数据详情']);
  20. //DIY列表
  21. Route::get('get_diy_info/:id', 'v1.diy.Diy/getDiyInfo')->option(['real_name' => 'Diy模板数据详情']);
  22. //删除DIY模板
  23. Route::delete('del/:id', 'v1.diy.Diy/del')->option(['real_name' => '删除DIY模板']);
  24. //使用DIY模板
  25. Route::put('set_status/:id', 'v1.diy.Diy/setStatus')->option(['real_name' => '使用DIY模板']);
  26. //获取添加表单
  27. Route::get('create', 'v1.diy.Diy/create')->option(['real_name' => '添加表单']);
  28. //添加表单
  29. Route::post('create', 'v1.diy.Diy/save')->option(['real_name' => '添加DIY']);
  30. //保存DIY模板
  31. Route::post('save/[:id]', 'v1.diy.Diy/saveData')->option(['real_name' => '添加DIY模板']);
  32. //保存DIY模板
  33. Route::post('diy_save/[:id]', 'v1.diy.Diy/saveDiyData')->option(['real_name' => '添加DIY模板']);
  34. //获取路径
  35. Route::get('get_url', 'v1.diy.Diy/getUrl')->option(['real_name' => '获取前端页面路径']);
  36. //获取商品分类
  37. Route::get('get_category', 'v1.diy.Diy/getCategory')->option(['real_name' => '获取商品分类']);
  38. //获取商品
  39. Route::get('get_product', 'v1.diy.Diy/getProduct')->option(['real_name' => '获取商品列表']);
  40. //获取门店自提开启状态
  41. Route::get('get_store_status', 'v1.diy.Diy/getStoreStatus')->option(['real_name' => '获取门店自提开启状态']);
  42. //还原默认数据
  43. Route::get('recovery/:id', 'v1.diy.Diy/Recovery')->option(['real_name' => '还原Diy默认数据']);
  44. //获取所有二级分类
  45. Route::get('get_by_category', 'v1.diy.Diy/getByCategory')->option(['real_name' => '获取所有二级分类']);
  46. //设置默认数据
  47. Route::get('set_recovery/:id', 'v1.diy.Diy/setRecovery')->option(['real_name' => '设置Diy默认数据']);
  48. //获取商品列表
  49. Route::get('get_product_list', 'v1.diy.Diy/getProductList')->option(['real_name' => '获取商品列表']);
  50. //分类、个人中心、一键换色
  51. Route::get('get_color_change/:type', 'v1.diy.Diy/getColorChange')->option(['real_name' => '获取风格设置']);
  52. //换色和分类保存
  53. Route::put('color_change/:status/:type', 'v1.diy.Diy/colorChange')->option(['real_name' => '换色和分类保存']);
  54. //个人中心菜单获取
  55. Route::get('get_member', 'v1.diy.Diy/getMember')->option(['real_name' => '个人中心详情']);
  56. //获取页面链接分类
  57. Route::get('get_page_category', 'v1.diy.PageLink/getCategory')->option(['real_name' => '获取页面链接分类']);
  58. //获取页面链接
  59. Route::get('get_page_link/:cate_id', 'v1.diy.PageLink/getLinks')->option(['real_name' => '获取页面链接']);
  60. //个人中心菜单保存
  61. Route::post('member_save', 'v1.diy.Diy/memberSaveData')->option(['real_name' => '个人中心保存']);
  62. //获取diy小程序二维码
  63. Route::get('get_routine_code/:id', 'v1.diy.Diy/getRoutineCode')->option(['real_name' => 'diy小程序预览码']);
  64. //开屏广告
  65. Route::get('open_adv/info', 'v1.diy.Diy/getOpenAdv')->option(['real_name' => '获取开屏广告']);
  66. Route::post('open_adv/add', 'v1.diy.Diy/openAdvAdd')->option(['real_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' => 'diy', 'mark_name' => '页面装修']);