serve.php 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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('serve', function () {
  16. //平台登录
  17. Route::post('login', 'v1.serve.Login/login')->option(['real_name' => '一号通平台登录']);
  18. //验证码
  19. Route::post('captcha', 'v1.serve.Login/captcha')->option(['real_name' => '一号通获取验证码']);
  20. //验证验证码
  21. Route::post('checkCode', 'v1.serve.Login/checkCode')->option(['real_name' => '一号通验证验证码']);
  22. //注册
  23. Route::post('register', 'v1.serve.Login/register')->option(['real_name' => '一号通注册']);
  24. //开通电子面单
  25. Route::post('opn_express', 'v1.serve.Serve/openExpress')->option(['real_name' => '一号通开通电子面单']);
  26. //获取用户信息
  27. Route::get('info', 'v1.serve.Serve/getUserInfo')->option(['real_name' => '一号通账户信息']);
  28. //获取列表模板
  29. Route::get('meal_list', 'v1.serve.Serve/mealList')->option(['real_name' => '一号通支付套餐列表']);
  30. //获取支付
  31. Route::post('pay_meal', 'v1.serve.Serve/payMeal')->option(['real_name' => '一号通支付二维码']);
  32. //开通短信服务
  33. Route::get('sms/open', 'v1.serve.Sms/openServe')->option(['real_name' => '一号通开通短信服务']);
  34. //开通其他服务
  35. Route::get('open', 'v1.serve.Serve/openServe')->option(['real_name' => '一号通开通其他服务']);
  36. //修改签名
  37. Route::put('sms/sign', 'v1.serve.Sms/editSign')->option(['real_name' => '一号通修改签名']);
  38. //获取短信模板
  39. Route::get('sms/temps', 'v1.serve.Sms/temps')->option(['real_name' => '一号通获取短信模板']);
  40. //申请模板
  41. Route::post('sms/apply', 'v1.serve.Sms/apply')->option(['real_name' => '一号通申请模板']);
  42. //获取申请记录
  43. Route::get('sms/apply_record', 'v1.serve.Sms/applyRecord')->option(['real_name' => '一号通获取申请记录']);
  44. //记录
  45. Route::get('record', 'v1.serve.Serve/getRecord')->option(['real_name' => '一号通消费记录']);
  46. //是否开启电子面单打印
  47. Route::get('dump_open', 'v1.serve.Export/dumpIsOpen')->name('dumpIsOpen')->option(['real_name' => '一号通是否开启电子面单打印']);
  48. //获取全部物流公司
  49. Route::get('export_all', 'v1.serve.Export/getExportAll')->option(['real_name' => '一号通获取全部物流公司']);
  50. //获取物流公司模板
  51. Route::get('export_temp', 'v1.serve.Export/getExportTemp')->option(['real_name' => '一号通获取物流公司模板']);
  52. //修改密码
  53. Route::post('modify', 'v1.serve.Serve/modify')->option(['real_name' => '一号通修改密码']);
  54. //修改手机号码
  55. Route::post('update_phone', 'v1.serve.Serve/updatePhone')->option(['real_name' => '一号通修改手机号码']);
  56. //短信配置编辑表单
  57. Route::get('sms_config/edit_basics', 'v1.setting.SystemConfig/edit_basics')->option(['real_name' => '一号通短信配置编辑表单']);
  58. //短信配置保存数据
  59. Route::post('sms_config/save_basics', 'v1.setting.SystemConfig/save_basics')->option(['real_name' => '一号通短信配置保存数据']);
  60. })->middleware([
  61. \app\http\middleware\AllowOriginMiddleware::class,
  62. \app\adminapi\middleware\AdminAuthTokenMiddleware::class,
  63. \app\adminapi\middleware\AdminCheckRoleMiddleware::class,
  64. \app\adminapi\middleware\AdminLogMiddleware::class
  65. ])->option(['mark' => 'serve', 'mark_name' => '一号通']);