delivery.php 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2024 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. Route::post('/changeMerStatus/:id','/merStatus')->name('merchantExpressChangeMerStatus')->option([
  36. '_alias' => '修改状态',
  37. ]);
  38. })->prefix('admin.store.Express')->option([
  39. '_path' => '/config/freight/express',
  40. '_auth' => true,
  41. ]);
  42. //同城配送
  43. Route::group('delivery/station', function () {
  44. //获取分类
  45. Route::get('business','/getBusiness')->name('merchantStoreDeliveryBusiness')->option([
  46. '_alias' => '获取分类',
  47. ]);
  48. //添加
  49. Route::post('create','/create')->name('merchantStoreDeliveryCreate')->option([
  50. '_alias' => '添加',
  51. ]);
  52. //编辑
  53. Route::post('update/:id','/update')->name('merchantStoreDeliveryUpdate')->option([
  54. '_alias' => '编辑',
  55. ]);
  56. //编辑状态
  57. Route::post('status/:id','/switchWithStatus')->name('merchantStoreDeliveryStatus')->option([
  58. '_alias' => '编辑状态',
  59. ]);
  60. //列表
  61. Route::get('lst','/lst')->name('merchantStoreDeliveryLst')->option([
  62. '_alias' => '列表',
  63. ]);
  64. //详情
  65. Route::get('detail/:id','/detail')->name('merchantStoreDeliveryDetail')->option([
  66. '_alias' => '详情',
  67. ]);
  68. //删除
  69. Route::delete('delete/:id','/delete')->name('merchantStoreDeliveryDelete')->option([
  70. '_alias' => '删除',
  71. ]);
  72. //备注
  73. Route::get('mark/:id/form','/markForm')->name('merchantStoreDeliveryMarkForm')->option([
  74. '_alias' => '备注表单',
  75. '_auth' => false,
  76. '_form' => 'merchantStoreDeliveryMark',
  77. ]);
  78. Route::post('mark/:id','/mark')->name('merchantStoreDeliveryMark')->option([
  79. '_alias' => '备注',
  80. ]);
  81. Route::get('options','/options')->option([
  82. '_alias' => '列表',
  83. '_auth' => false,
  84. ]);
  85. Route::get('select','/select')->option([
  86. '_alias' => '列表',
  87. '_auth' => false,
  88. ]);
  89. //城市列表
  90. Route::get('getCity','/getCityLst')->name('merchantStoreDeliveryCityList')->option([
  91. '_alias' => '城市列表',
  92. ]);
  93. //充值记录
  94. Route::get('payLst','/payLst')->name('merchantStoreDeliveryPayLst')->option([
  95. '_alias' => '充值记录',
  96. '_path' => '/delivery/recharge_record',
  97. ]);
  98. Route::get('code','/getQrcode')->name('merchantStoreDeliveryGetQrcode')->option([
  99. '_alias' => '充值二维码',
  100. '_path' => '/delivery/recharge_record',
  101. '_auth' => false,
  102. ]);
  103. })->prefix('merchant.store.delivery.DeliveryStation')->option([
  104. '_path' => '/delivery/store_manage',
  105. '_auth' => true,
  106. ]);
  107. Route::group('delivery/service', function () {
  108. Route::get('lst','/lst')->name('merchantDeliveryServiceLst')->option([
  109. '_alias' => '列表',
  110. ]);
  111. Route::post('status/:id','/switchWithStatus')->name('merchantDeliveryServiceStatus')->option([
  112. '_alias' => '修改状态',
  113. ]);
  114. Route::get('create/form','/createForm')->name('merchantDeliveryServiceCreateForm')->option([
  115. '_alias' => '添加表单',
  116. '_auth' => false,
  117. '_form' => 'merchantServiceCreate',
  118. ]);
  119. //添加
  120. Route::post('create','/create')->name('merchantDeliveryServiceCreate')->option([
  121. '_alias' => '添加',
  122. ]);
  123. //编辑
  124. Route::get('update/:id/form','/updateForm')->name('merchantDeliveryServiceUpdateForm')->option([
  125. '_alias' => '编辑',
  126. '_auth' => false,
  127. '_form' => 'merchantServiceUpdate',
  128. ]);
  129. //编辑
  130. Route::post('update/:id','/update')->name('merchantDeliveryServiceUpdate')->option([
  131. '_alias' => '编辑',
  132. ]);
  133. //删除
  134. Route::delete('delete/:id','/delete')->name('merchantDeliveryServiceDelete')->option([
  135. '_alias' => '删除',
  136. ]);
  137. Route::get('options','/options');
  138. })->prefix('merchant.store.delivery.DeliveryService')->option([
  139. '_path' => '/delivery/personnel_manage',
  140. '_auth' => true,
  141. ]);
  142. //同城配送
  143. Route::group('delivery/order', function () {
  144. //
  145. Route::get('lst','/lst')
  146. ->name('merchantStoreDeliveryOrderLst')->option([
  147. '_alias' => '列表',
  148. ]);
  149. //取消
  150. Route::get('cancel/:id/form','/cancelForm')
  151. ->name('merchantStoreDeliveryOrderCancelForm')->option([
  152. '_alias' => '取消表单',
  153. '_auth' => false,
  154. '_form' => 'merchantStoreDeliveryOrderCancel',
  155. ]);
  156. Route::post('cancel/:id','/cancel')
  157. ->name('merchantStoreDeliveryOrderCancel')->option([
  158. '_alias' => '取消',
  159. ]);
  160. //详情
  161. Route::get('detail/:id','/detail')
  162. ->name('merchantStoreDeliveryOrderDetail')->option([
  163. '_alias' => '详情',
  164. ]);
  165. })->prefix('merchant.store.delivery.DeliveryOrder')->option([
  166. '_path' => '/delivery/usage_record',
  167. '_auth' => true,
  168. ]);
  169. //运费模板
  170. Route::group('store/shipping', function () {
  171. Route::get('lst', '/lst')->name('merchantStoreShippingTemplateLst')->option([
  172. '_alias' => '列表',
  173. '_auth' => false,
  174. ]);
  175. Route::get('list', '/getList')->option([
  176. '_alias' => '列表 ',
  177. ]);
  178. Route::post('create', '/create')->name('merchantStoreShippingTemplateCreate')->option([
  179. '_alias' => '添加 ',
  180. ]);
  181. Route::post('update/:id', '/update')->name('merchantStoreShippingTemplateUpdate')->option([
  182. '_alias' => '编辑',
  183. ]);
  184. Route::get('detail/:id', '/detail')->name('merchantStoreShippingTemplateDetail')->option([
  185. '_alias' => '详情',
  186. ]);
  187. Route::delete('delete/:id', '/delete')->name('merchantStoreShippingTemplateDelete')->option([
  188. '_alias' => '删除',
  189. ]);
  190. Route::get('setDefault/:id', '/setDefault')->name('merchantStoreShippingTemplateSetDefault')->option([
  191. '_alias' => '设置默认模板',
  192. ]);
  193. })->prefix('merchant.store.shipping.ShippingTemplate')->option([
  194. '_path' => '/config/freight/shippingTemplates',
  195. '_auth' => true,
  196. ]);
  197. //地址信息
  198. Route::get('system/city/lst', 'merchant.store.shipping.City/lst')->option([
  199. '_alias' => '列表',
  200. '_auth' => false,
  201. ]);
  202. Route::get('v2/system/city/lst/:pid', 'merchant.store.shipping.City/lstV2')->option([
  203. '_alias' => '列表',
  204. '_auth' => false,
  205. ]);
  206. })->middleware(AllowOriginMiddleware::class)
  207. ->middleware(MerchantTokenMiddleware::class, true)
  208. ->middleware(MerchantAuthMiddleware::class)
  209. ->middleware(MerchantCheckBaseInfoMiddleware::class)
  210. ->middleware(LogMiddleware::class);