delivery.php 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. use app\common\middleware\AllowOriginMiddleware;
  12. use app\common\middleware\LogMiddleware;
  13. use app\common\middleware\MerchantAuthMiddleware;
  14. use app\common\middleware\MerchantTokenMiddleware;
  15. use think\facade\Route;
  16. use app\common\middleware\MerchantCheckBaseInfoMiddleware;
  17. Route::group(function () {
  18. //快递公司
  19. Route::group('expr',function(){
  20. Route::get('/lst','/lst')->name('merchantServeExportLst')->option([
  21. '_alias' => '列表',
  22. ]);
  23. Route::get('/options','/options')->option([
  24. '_alias' => '列表',
  25. '_auth' => false,
  26. ]);
  27. Route::get('/partner/:id/form','/partnerForm')->name('merchantExpressPratnerUpdateForm')->option([
  28. '_alias' => '月结账号编辑表单',
  29. '_auth' => false,
  30. '_form' => 'merchantExpressPratnerUpdate',
  31. ]);
  32. Route::post('/partner/:id','/partner')->name('merchantExpressPratnerUpdate')->option([
  33. '_alias' => '月结账号编辑',
  34. ]);
  35. })->prefix('admin.store.Express')->option([
  36. '_path' => '/config/freight/express',
  37. '_auth' => true,
  38. ]);
  39. //同城配送
  40. Route::group('delivery/station', function () {
  41. //获取分类
  42. Route::get('business','/getBusiness')->name('merchantStoreDeliveryBusiness')->option([
  43. '_alias' => '获取分类',
  44. ]);
  45. //添加
  46. Route::post('create','/create')->name('merchantStoreDeliveryCreate')->option([
  47. '_alias' => '添加',
  48. ]);
  49. //编辑
  50. Route::post('update/:id','/update')->name('merchantStoreDeliveryUpdate')->option([
  51. '_alias' => '编辑',
  52. ]);
  53. //编辑状态
  54. Route::post('status/:id','/switchWithStatus')->name('merchantStoreDeliveryStatus')->option([
  55. '_alias' => '编辑状态',
  56. ]);
  57. //列表
  58. Route::get('lst','/lst')->name('merchantStoreDeliveryLst')->option([
  59. '_alias' => '列表',
  60. ]);
  61. //详情
  62. Route::get('detail/:id','/detail')->name('merchantStoreDeliveryDetail')->option([
  63. '_alias' => '详情',
  64. ]);
  65. //删除
  66. Route::delete('delete/:id','/delete')->name('merchantStoreDeliveryDelete')->option([
  67. '_alias' => '删除',
  68. ]);
  69. //备注
  70. Route::get('mark/:id/form','/markForm')->name('merchantStoreDeliveryMarkForm')->option([
  71. '_alias' => '备注表单',
  72. '_auth' => false,
  73. '_form' => 'merchantStoreDeliveryMark',
  74. ]);
  75. Route::post('mark/:id','/mark')->name('merchantStoreDeliveryMark')->option([
  76. '_alias' => '备注',
  77. ]);
  78. Route::get('options','/options')->option([
  79. '_alias' => '列表',
  80. '_auth' => false,
  81. ]);
  82. Route::get('select','/select')->option([
  83. '_alias' => '列表',
  84. '_auth' => false,
  85. ]);
  86. //城市列表
  87. Route::get('getCity','/getCityLst')->name('merchantStoreDeliveryCityList')->option([
  88. '_alias' => '城市列表',
  89. ]);
  90. //充值记录
  91. Route::get('payLst','/payLst')->name('merchantStoreDeliveryPayLst')->option([
  92. '_alias' => '充值记录',
  93. '_path' => '/delivery/recharge_record',
  94. ]);
  95. Route::get('code','/getQrcode')->name('merchantStoreDeliveryGetQrcode')->option([
  96. '_alias' => '充值二维码',
  97. '_path' => '/delivery/recharge_record',
  98. '_auth' => false,
  99. ]);
  100. })->prefix('merchant.store.delivery.DeliveryStation')->option([
  101. '_path' => '/delivery/store_manage',
  102. '_auth' => true,
  103. ]);
  104. //同城配送
  105. Route::group('delivery/order', function () {
  106. //
  107. Route::get('lst','/lst')
  108. ->name('merchantStoreDeliveryOrderLst')->option([
  109. '_alias' => '列表',
  110. ]);
  111. //取消
  112. Route::get('cancel/:id/form','/cancelForm')
  113. ->name('merchantStoreDeliveryOrderCancelForm')->option([
  114. '_alias' => '取消表单',
  115. '_auth' => false,
  116. '_form' => 'merchantStoreDeliveryOrderCancel',
  117. ]);
  118. Route::post('cancel/:id','/cancel')
  119. ->name('merchantStoreDeliveryOrderCancel')->option([
  120. '_alias' => '取消',
  121. ]);
  122. //详情
  123. Route::get('detail/:id','/detail')
  124. ->name('merchantStoreDeliveryOrderDetail')->option([
  125. '_alias' => '详情',
  126. ]);
  127. })->prefix('merchant.store.delivery.DeliveryOrder')->option([
  128. '_path' => '/delivery/usage_record',
  129. '_auth' => true,
  130. ]);
  131. //运费模板
  132. Route::group('store/shipping', function () {
  133. Route::get('lst', '/lst')->name('merchantStoreShippingTemplateLst')->option([
  134. '_alias' => '列表',
  135. '_auth' => false,
  136. ]);
  137. Route::get('list', '/getList')->option([
  138. '_alias' => '列表 ',
  139. ]);
  140. Route::post('create', '/create')->name('merchantStoreShippingTemplateCreate')->option([
  141. '_alias' => '添加 ',
  142. ]);
  143. Route::post('update/:id', '/update')->name('merchantStoreShippingTemplateUpdate')->option([
  144. '_alias' => '编辑',
  145. ]);
  146. Route::get('detail/:id', '/detail')->name('merchantStoreShippingTemplateDetail')->option([
  147. '_alias' => '详情',
  148. ]);
  149. Route::delete('delete/:id', '/delete')->name('merchantStoreShippingTemplateDelete')->option([
  150. '_alias' => '删除',
  151. ]);
  152. })->prefix('merchant.store.shipping.ShippingTemplate')->option([
  153. '_path' => '/config/freight/shippingTemplates',
  154. '_auth' => true,
  155. ]);
  156. //地址信息
  157. Route::get('system/city/lst', 'merchant.store.shipping.City/lst')->option([
  158. '_alias' => '列表',
  159. '_auth' => false,
  160. ]);
  161. Route::get('v2/system/city/lst/:pid', 'merchant.store.shipping.City/lstV2')->option([
  162. '_alias' => '列表',
  163. '_auth' => false,
  164. ]);
  165. })->middleware(AllowOriginMiddleware::class)
  166. ->middleware(MerchantTokenMiddleware::class, true)
  167. ->middleware(MerchantAuthMiddleware::class)
  168. ->middleware(MerchantCheckBaseInfoMiddleware::class)
  169. ->middleware(LogMiddleware::class);