merchant.php 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564
  1. <?php
  2. use app\common\middleware\AllowOriginMiddleware;
  3. use app\common\middleware\CheckSiteOpenMiddleware;
  4. use app\common\middleware\InstallMiddleware;
  5. use app\common\middleware\LogMiddleware;
  6. use app\common\middleware\MerchantAuthMiddleware;
  7. use app\common\middleware\MerchantTokenMiddleware;
  8. use think\facade\Route;
  9. use app\common\middleware\MerchantCheckBaseInfoMiddleware;
  10. Route::group(config('admin.merchant_prefix'), function () {
  11. Route::miss(function () {
  12. $DB = DIRECTORY_SEPARATOR;
  13. return view(app()->getRootPath() . 'public' . $DB . 'mer.html');
  14. });
  15. })->middleware(InstallMiddleware::class)
  16. ->middleware(CheckSiteOpenMiddleware::class);
  17. Route::group(config('admin.api_merchant_prefix') . '/', function () {
  18. Route::group(function () {
  19. Route::get('menus', 'admin.system.auth.Menu/menus')->append(['merchant' => 1]);
  20. Route::get('logout', 'merchant.system.admin.Login/logout');
  21. //获取版本号
  22. Route::get('version', 'admin.Common/version');
  23. Route::get('info', 'merchant.system.Merchant/info');
  24. //Route::get('user/list', 'merchant.user.User/getUserList');
  25. Route::get('update/form', 'merchant.system.Merchant/updateForm')->name('merchantUpdateForm');
  26. Route::post('upload/certificate', 'merchant.Common/uploadCertificate');
  27. Route::post('upload/video', 'merchant.Common/uploadVideo');
  28. Route::post('info/update', 'merchant.system.Merchant/update')->name('merchantUpdate');
  29. //导出文件
  30. Route::group('excel',function(){
  31. Route::get('/lst', '/lst')->name('merchantStoreExcelLst');
  32. Route::get('/download/:id', '/download')->name('merchantStoreExcelDownload');
  33. Route::get('/download_express', '/downloadExpress')->name('merchantStoreExcelDownloadExpress');
  34. Route::get('/type', '/type')->name('merchantStoreExcelType');
  35. })->prefix('merchant.store.Excel');
  36. //配置
  37. Route::get('config/:key', 'admin.system.config.Config/form')->name('merchantConfigForm');
  38. Route::get('config/others/group_buying', 'admin.system.config.ConfigOthers/getGroupBuying')->name('merchantConfigGroupBuying');
  39. Route::post('config/save/:key', 'admin.system.config.ConfigValue/save')->name('merchantConfigSave');
  40. Route::group('take', function () {
  41. Route::get('info', 'merchant.system.Merchant/takeInfo')->name('merchantTakeInfo');
  42. Route::post('update', 'merchant.system.Merchant/take')->name('merchantTakeUpdate');
  43. });
  44. Route::group('service', function () {
  45. Route::get('list', 'StoreService/lst')->name('merchantServiceLst');
  46. Route::post('create', 'StoreService/create')->name('merchantServiceCreate');
  47. Route::get('create/form', 'StoreService/createForm')->name('merchantServiceCreateForm');
  48. Route::post('update/:id', 'StoreService/update')->name('merchantServiceUpdate');
  49. Route::get('update/form/:id', 'StoreService/updateForm')->name('merchantServiceUpdateForm');
  50. Route::post('status/:id', 'StoreService/changeStatus')->name('merchantServiceSwitchStatus');
  51. Route::delete('delete/:id', 'StoreService/delete')->name('merchantServiceDelete');
  52. Route::get('/:id/user', 'StoreService/serviceUserList')->name('merchantServiceServiceUserList');
  53. Route::get('/:id/:uid/lst', 'StoreService/getUserMsnByService')->name('merchantServiceServiceUserLogLst');
  54. Route::get('mer/:id/user', 'StoreService/merchantUserList')->name('merchantServiceServiceMerchantUserList');
  55. Route::get('/:id/lst', 'StoreService/getUserMsnByMerchant')->name('merchantServiceMerchantUserLogLst');
  56. })->prefix('merchant.store.service.');
  57. //身份规则
  58. Route::group('system/role', function () {
  59. Route::get('lst', '/getList')->name('merchantRoleGetList');
  60. Route::post('create', '/create')->name('merchantRoleCreate');
  61. Route::get('create/form', '/createForm')->name('merchantRoleCreateForm');
  62. Route::post('update/:id', '/update')->name('merchantRoleUpdate');
  63. Route::get('update/form/:id', '/updateForm')->name('merchantRoleUpdateForm');
  64. Route::post('status/:id', '/switchStatus')->name('merchantRoleStatus');
  65. Route::delete('delete/:id', '/delete')->name('merchantRoleDelete');
  66. })->prefix('merchant.system.auth.Role');
  67. //Admin管理
  68. Route::group('system/admin', function () {
  69. Route::get('lst', '/getList')->name('merchantAdminLst');
  70. Route::post('status/:id', '/switchStatus')->name('merchantAdminStatus');
  71. Route::post('create', '/create')->name('merchantAdminCreate');
  72. Route::get('create/form', '/createForm')->name('merchantAdminCreateForm');
  73. Route::post('update/:id', '/update')->name('merchantAdminUpdate');
  74. Route::get('update/form/:id', '/updateForm')->name('merchantAdminUpdateForm');
  75. Route::post('password/:id', '/password')->name('merchantAdminPassword');
  76. Route::get('password/form/:id', '/passwordForm')->name('merchantAdminPasswordForm');
  77. Route::delete('delete/:id', '/delete')->name('merchantAdminDelete');
  78. Route::get('edit/form', '/editForm')->name('merchantAdminEditForm');
  79. Route::post('edit', '/edit')->name('merchantAdminEdit');
  80. Route::get('edit/password/form', '/editPasswordForm')->name('merchantAdminEditPasswordForm');
  81. Route::post('edit/password', '/editPassword')->name('merchantAdminEditPassword');
  82. })->prefix('merchant.system.admin.MerchantAdmin');
  83. //附件管理
  84. Route::group('system/attachment', function () {
  85. Route::get('lst', '/getList')->name('merchantAttachmentLst');
  86. Route::delete('delete', '/delete')->name('merchantAttachmentDelete');
  87. Route::post('category', '/batchChangeCategory')->name('merchantAttachmentBatchChangeCategory');
  88. Route::get('update/:id/form', '/updateForm')->name('merchantAttachmentUpdateForm');
  89. Route::post('update/:id', '/update')->name('merchantAttachmentUpdate');
  90. })->prefix('admin.system.attachment.Attachment');
  91. //上传图片
  92. Route::post('upload/image/:id/:field', 'admin.system.attachment.Attachment/image')->name('merchantUploadImage');
  93. Route::get('system/admin/log', 'admin.system.admin.AdminLog/lst')->name('merchantAdminLog');
  94. //附件分类管理
  95. Route::group('system/attachment/category', function () {
  96. Route::get('formatLst', '/getFormatList')->name('merchantAttachmentCategoryGetFormatList');
  97. Route::get('create/form', '/createForm')->name('merchantAttachmentCategoryCreateForm');
  98. Route::get('update/form/:id', '/updateForm')->name('merchantAttachmentCategoryUpdateForm');
  99. Route::post('create', '/create')->name('merchantAttachmentCategoryCreate');
  100. Route::post('update/:id', '/update')->name('merchantAttachmentCategoryUpdate');
  101. Route::delete('delete/:id', '/delete')->name('merchantAttachmentCategoryDelete');
  102. })->prefix('admin.system.attachment.AttachmentCategory');
  103. //产品规则模板
  104. Route::group('store/attr/template', function () {
  105. Route::get('lst', '/lst')->name('merchantStoreAttrTemplateLst');
  106. Route::get('list', '/getlist');
  107. Route::post('create', '/create')->name('merchantStoreAttrTemplateCreate');
  108. Route::delete(':id', '/delete')->name('merchantStoreAttrTemplateDelete');
  109. Route::post(':id', '/update')->name('merchantStoreAttrTemplateUpdate');
  110. })->prefix('merchant.store.StoreAttrTemplate');
  111. //商品分类
  112. Route::group('store/category', function () {
  113. Route::get('create/form', '/createForm')->name('merchantStoreCategoryCreateForm');
  114. Route::get('update/form/:id', '/updateForm')->name('merchantStoreCategoryUpdateForm');
  115. Route::post('update/:id', '/update')->name('merchantStoreCategoryUpdate');
  116. Route::get('lst', '/lst')->name('merchantStoreCategoryLst');
  117. Route::get('detail/:id', '/detail')->name('merchantStoreCategoryDtailt');
  118. Route::post('create', '/create')->name('merchantStoreCategoryCreate');
  119. Route::delete('delete/:id', '/delete')->name('merchantStoreCategoryDelete');
  120. Route::post('status/:id', '/switchStatus')->name('merchantStoreCategorySwitchStatus');
  121. Route::get('list', '/getList');
  122. Route::get('select', '/getTreeList');
  123. Route::get('brandlist', '/BrandList');
  124. })->prefix('admin.store.StoreCategory');
  125. Route::get('store/coupon/product/:id', 'admin.store.Coupon/product')->name('merchantCouponProduct');
  126. //发送优惠券
  127. Route::group('store/coupon_send', function () {
  128. Route::get('lst', '/lst')->name('merchantCouponSendLst');
  129. })->prefix('merchant.store.coupon.CouponSend');
  130. //优惠券
  131. Route::group('store/coupon', function () {
  132. Route::get('create/form', '/createForm')->name('merchantCouponCreateForm');
  133. Route::get('clone/form/:id', '/cloneForm')->name('merchantCouponIssueCloneForm');
  134. Route::post('create', '/create')->name('merchantCouponCreate');
  135. Route::post('status/:id', '/changeStatus')->name('merchantCouponIssueChangeStatus');
  136. Route::get('lst', '/lst')->name('merchantCouponLst');
  137. Route::get('issue', '/issue')->name('merchantCouponIssue');
  138. Route::get('select', '/select');
  139. Route::post('send', '/send')->name('merchantCouponSendCoupon');
  140. Route::delete('delete/:id', '/delete')->name('merchantCouponDelete');
  141. Route::get('detail/:id', '/detail')->name('merchantCouponDetail');
  142. })->prefix('merchant.store.coupon.Coupon');
  143. //地址信息
  144. Route::get('system/city/lst', 'merchant.store.shipping.City/lst');
  145. Route::get('v2/system/city/lst/:pid', 'merchant.store.shipping.City/lstV2');
  146. //运费模板
  147. Route::group('store/shipping', function () {
  148. Route::get('lst', '/lst')->name('merchantStoreShippingTemplateLst');
  149. Route::get('list', '/getList');
  150. Route::post('create', '/create')->name('merchantStoreShippingTemplateCreate');
  151. Route::post('update/:id', '/update')->name('merchantStoreShippingTemplateUpdate');
  152. Route::get('detail/:id', '/detail')->name('merchantStoreShippingTemplateDetail');
  153. Route::delete('delete/:id', '/delete')->name('merchantStoreShippingTemplateDelete');
  154. })->prefix('merchant.store.shipping.ShippingTemplate');
  155. /* 未使用
  156. Route::group('store/shipping',function(){
  157. Route::delete('region/delete/:id','merchant.store.ShippingTemplateRegion/delete')->name('storeShippingTemplateRegionDelete');
  158. Route::delete('free/delete/:id','merchant.store.ShippingTemplateFree/delete')->name('storeShippingTemplateFreeDelete');
  159. Route::delete('undelive/delete/:id','merchant.store.ShippingTemplateUndelive/delete')->name('storeShippingTemplateUndeliveDelete');
  160. });
  161. */
  162. //商品
  163. Route::group('store/product', function () {
  164. Route::get('config', '/config');
  165. Route::get('lst_filter', '/getStatusFilter')->name('merchantStoreProductLstFilter');
  166. Route::get('lst', '/lst')->name('merchantStoreProductLst');
  167. Route::get('list', '/lst');
  168. Route::post('create', '/create')->name('merchantStoreProductCreate');
  169. Route::get('detail/:id', '/detail')->name('merchantStoreProductDetail');
  170. Route::get('temp_key', '/temp_key')->name('merchantStoreProductTempKey');
  171. Route::post('update/:id', '/update')->name('merchantStoreProductUpdate');
  172. Route::delete('delete/:id', '/delete')->name('merchantStoreProductDelete');
  173. Route::delete('destory/:id', '/destory')->name('merchantStoreProductDestory');
  174. Route::post('restore/:id', '/restore')->name('merchantStoreProductRestore');
  175. Route::post('status/:id', '/switchStatus')->name('merchantStoreProductSwitchStatus');
  176. Route::post('sort/:id', '/updateSort')->name('merchantStoreProductUpdateSort');
  177. Route::post('preview', '/preview')->name('merchantStoreProductPreview');
  178. })->prefix('merchant.store.product.Product');
  179. //秒杀商品
  180. Route::group('store/seckill_product', function () {
  181. Route::get('lst_time', '/lst_time');
  182. Route::get('lst_filter', '/getStatusFilter')->name('merchantStoreSeckillProductLstFilter');
  183. Route::get('lst', '/lst')->name('merchantStoreSeckillProductLst');
  184. Route::post('create', '/create')->name('merchantStoreSeckillProductCreate');
  185. Route::get('detail/:id', '/detail')->name('merchantStoreSeckillProductDetail');
  186. Route::post('update/:id', '/update')->name('merchantStoreSeckillProductUpdate');
  187. Route::delete('delete/:id', '/delete')->name('merchantStoreSeckillProductDelete');
  188. Route::delete('destory/:id', '/destory')->name('merchantStoreSeckillProductDestory');
  189. Route::post('restore/:id', '/restore')->name('merchantStoreSeckillProductRestore');
  190. Route::post('status/:id', '/switchStatus')->name('merchantStoreSeckillProductSwitchStatus');
  191. Route::post('sort/:id', '/updateSort')->name('merchantStoreSeckillProductUpdateSort');
  192. Route::post('preview', '/preview')->name('merchantStoreSeckillProductPreview');
  193. })->prefix('merchant.store.product.ProductSeckill');
  194. //预售商品
  195. Route::group('store/product/presell', function () {
  196. Route::get('lst', '/lst')->name('merchantStoreProductPresellLst');
  197. Route::post('create', '/create')->name('merchantStoreProductPresellCreate');
  198. Route::get('detail/:id', '/detail')->name('merchantStoreProductPresellDetail');
  199. Route::post('update/:id', '/update')->name('merchantStoreProductPresellUpdate');
  200. Route::delete('delete/:id', '/delete')->name('merchantStoreProductPresellDelete');
  201. Route::post('status/:id', '/switchStatus')->name('merchantStoreProductPresellStatus');
  202. Route::get('number', '/number');
  203. Route::post('sort/:id', '/updateSort')->name('merchantStoreProductPresellUpdateSort');
  204. Route::post('preview', '/preview')->name('merchantStoreProductPresellPreview');
  205. })->prefix('merchant.store.product.ProductPresell');
  206. //助力商品
  207. Route::group('store/product/assist', function () {
  208. Route::get('lst', '/lst')->name('merchantStoreProductAssistLst');
  209. Route::post('create', '/create')->name('merchantStoreProductAssistCreate');
  210. Route::get('detail/:id', '/detail')->name('merchantStoreProductAssistDetail');
  211. Route::post('update/:id', '/update')->name('merchantStoreProductAssistUpdate');
  212. Route::delete('delete/:id', '/delete')->name('merchantStoreProductAssistDelete');
  213. Route::post('status/:id', '/switchStatus')->name('merchantStoreProductAssistStatus');
  214. Route::post('sort/:id', '/updateSort')->name('merchantStoreProductAssistUpdateSort');
  215. Route::post('preview', '/preview')->name('merchantStoreProductAssistPreview');
  216. })->prefix('merchant.store.product.ProductAssist');
  217. //助力活动
  218. Route::group('store/product/assist_set', function () {
  219. Route::get('lst', '/lst')->name('merchantStoreProductAssistSetLst');
  220. Route::get('detail/:id', '/detail')->name('merchantStoreProductAssistSetDetail');
  221. })->prefix('merchant.store.product.ProductAssistSet');
  222. //拼团商品
  223. Route::group('store/product/group', function () {
  224. Route::get('lst', '/lst')->name('merchantStoreProductGroupLst');
  225. Route::post('create', '/create')->name('merchantStoreProductGroupCreate');
  226. Route::get('detail/:id', '/detail')->name('merchantStoreProductGroupDetail');
  227. Route::post('update/:id', '/update')->name('merchantStoreProductGroupUpdate');
  228. Route::delete('delete/:id', '/delete')->name('merchantStoreProductGroupDelete');
  229. Route::post('status/:id', '/switchStatus')->name('merchantStoreProductGroupStatus');
  230. Route::post('sort/:id', '/updateSort')->name('merchantStoreProductGroupSort');
  231. Route::post('preview', '/preview')->name('merchantStoreProductGroupPreview');
  232. })->prefix('merchant.store.product.ProductGroup');
  233. //拼团活动
  234. Route::group('store/product/group/buying', function () {
  235. Route::get('lst', '/lst')->name('merchantStoreProductGroupBuyingLst');
  236. Route::get('detail/:id', '/detail')->name('merchantStoreProductGroupBuyingDetail');
  237. })->prefix('merchant.store.product.ProductGroupBuying');
  238. //复制商品
  239. Route::group('store/productcopy', function () {
  240. Route::get('lst', '/lst')->name('merchantStoreProductCopyLst');
  241. Route::get('get', '/get')->name('merchantStoreProductCopyGet');
  242. Route::get('count', '/count')->name('merchantStoreProductCopyCount');
  243. Route::post('save', '/save')->name('merchantStoreProductCopySave');
  244. })->prefix('merchant.store.product.ProductCopy');
  245. //直播间
  246. Route::group('broadcast/room', function () {
  247. Route::get('lst', '/lst')->name('merchantBroadcastRoomLst');
  248. Route::get('detail/:id', '/detail')->name('merchantBroadcastRoomDetail');
  249. Route::get('create/form', '/createForm')->name('merchantBroadcastRoomCreateForm');
  250. Route::post('create', '/create')->name('merchantBroadcastRoomCreate');
  251. Route::get('update/form/:id', '/updateForm')->name('merchantBroadcastRoomUpdateForm');
  252. Route::post('update/:id', '/update')->name('merchantBroadcastRoomUpdate');
  253. Route::post('status/:id', '/changeStatus')->name('merchantBroadcastRoomChangeStatus');
  254. Route::post('export_goods', '/exportGoods')->name('merchantBroadcastRoomExportGoods');
  255. Route::post('rm_goods', '/rmExportGoods')->name('merchantBroadcastRoomRmExportGoods');
  256. Route::post('mark/:id', '/mark')->name('merchantBroadcastRoomMark');
  257. Route::get('goods/:id', '/goodsList')->name('merchantBroadcastRoomGoods');
  258. Route::delete('delete/:id', '/delete')->name('merchantBroadcastRoomDelete');
  259. })->prefix('merchant.store.broadcast.BroadcastRoom');
  260. //直播间商品
  261. Route::group('broadcast/goods', function () {
  262. Route::get('lst', '/lst')->name('merchantBroadcastGoodsLst');
  263. Route::get('detail/:id', '/detail')->name('merchantBroadcastGoodsDetail');
  264. Route::get('create/form', '/createForm')->name('merchantBroadcastGoodsCreateForm');
  265. Route::post('create', '/create')->name('merchantBroadcastGoodsCreate');
  266. Route::get('update/form/:id', '/updateForm')->name('merchantBroadcastGoodsUpdateForm');
  267. Route::post('update/:id', '/update')->name('merchantBroadcastGoodsUpdate');
  268. Route::post('status/:id', '/changeStatus')->name('merchantBroadcastGoodsChangeStatus');
  269. Route::post('mark/:id', '/mark')->name('merchantBroadcastGoodsMark');
  270. Route::delete('delete/:id', '/delete')->name('merchantBroadcastGoodsDelete');
  271. Route::post('batch_create', '/batchCreate')->name('merchantBroadcastGoodsbatchCreate');
  272. })->prefix('merchant.store.broadcast.BroadcastGoods');
  273. // 导入
  274. Route::group('store/import', function () {
  275. Route::post('/:type', 'StoreImport/import')->name('merchantStoreOrderDeliveryImport');
  276. Route::get('lst', 'StoreImport/lst')->name('merchantStoreOrderDeliveryImportLst');
  277. Route::get('detail/:id', 'StoreImport/detail')->name('merchantStoreOrderDeliveryImportDetail');
  278. Route::get('excel/:id', 'StoreImport/export')->name('merchantStoreOrderDeliveryImportExcel');
  279. })->prefix('merchant.store.');
  280. //Order
  281. Route::group('store/order', function () {
  282. Route::get('excel', 'Order/excel')->name('merchantStoreOrderExcel');
  283. Route::get('printer/:id', 'Order/printer')->name('merchantStoreOrderPrinter');
  284. Route::get('chart', 'Order/chart')->name('merchantStoreOrderTitle');
  285. Route::get('takechart', 'Order/takeChart')->name('merchantStoreTakeOrderTitle');
  286. Route::get('filtter', 'Order/orderType')->name('merchantStoreOrderFiltter');
  287. Route::get('lst', 'Order/lst')->name('merchantStoreOrderLst');
  288. Route::get('takelst', 'Order/takeLst')->name('merchantStoreTakeOrderLst');
  289. Route::get('express/:id', 'Order/express')->name('merchantStoreOrderExpress');
  290. Route::get('delivery/:id/form', 'Order/deliveryForm')->name('merchantStoreOrderDeliveryForm');
  291. Route::post('delivery/:id', 'Order/delivery')->name('merchantStoreOrderDelivery');
  292. Route::post('delivery_batch', 'Order/batchDelivery')->name('merchantStoreOrderBatchDelivery');
  293. Route::get('delivery_export', 'Order/deliveryExport')->name('merchantStoreOrderDeliveryExport');
  294. Route::get('title', 'Order/title')->name('merchantStoreOrderStat');
  295. Route::get('take_title', 'Order/takeTitle')->name('merchantStoreOrderTakeTitle');
  296. Route::get('update/:id/form', 'Order/updateForm')->name('merchantStoreOrderUpdateForm');
  297. Route::post('update/:id', 'Order/update')->name('merchantStoreOrderUpdate');
  298. Route::get('detail/:id', 'Order/detail')->name('merchantStoreOrderDetail');
  299. Route::get('log/:id', 'Order/status')->name('merchantStoreOrderLog');
  300. Route::get('remark/:id/form', 'Order/remarkForm')->name('merchantStoreOrderRemarkForm');
  301. Route::post('remark/:id', 'Order/remark')->name('merchantStoreOrderRemark');
  302. Route::post('verify/:code', 'Order/verify')->name('merchantStoreOrderVerify');
  303. Route::post('delete/:id', 'Order/delete')->name('merchantStoreOrderDelete');
  304. Route::get('reconciliation/lst', 'Reconciliation/lst')->name('sysMerchantReconciliationLst');
  305. Route::get('reconciliation/mark/:id/form', 'Reconciliation/markForm')->name('merchantReconciliationMarkForm');
  306. Route::post('reconciliation/mark/:id', 'Reconciliation/mark')->name('merchantReconciliationMark');
  307. Route::post('reconciliation/status/:id', 'Reconciliation/switchStatus')->name('merchantReconciliationSwitchStatus');
  308. Route::get('reconciliation/:id/order', 'Order/reList')->name('merchantReconciliationOrderReList');
  309. Route::get('reconciliation/:id/refund', 'RefundOrder/reList')->name('merchantReconciliationRefundReList');
  310. })->prefix('merchant.store.order.');
  311. //退款订单
  312. Route::group('store/refundorder', function () {
  313. Route::get('lst', '/lst')->name('merchantStoreRefundOrderLst');
  314. Route::get('detail/:id', '/detail')->name('merchantStoreRefundOrderDetail');
  315. Route::get('status/:id/form', '/switchStatusForm')->name('merchantStoreRefundOrderSwitchStatusForm');
  316. Route::post('status/:id', '/switchStatus')->name('merchantStoreRefundOrderSwitchStatus');
  317. Route::post('refund/:id', '/refundPrice')->name('merchantStoreRefundOrderRefund');
  318. Route::delete('delete/:id', '/delete')->name('merchantStoreRefundDelete');
  319. Route::get('mark/:id/form', '/markForm')->name('merchantStoreRefundMarkForm');
  320. Route::post('mark/:id', '/mark')->name('merchantStoreRefundMark');
  321. Route::get('log/:id', '/log')->name('merchantStoreRefundLog');
  322. Route::get('express/:id', '/express')->name('merchantStoreRefundExpress');
  323. Route::get('excel', '/createExcel')->name('merchantStoreRefundCreateExcel');
  324. })->prefix('merchant.store.order.RefundOrder');
  325. Route::group('statistics', function () {
  326. Route::get('main', '/main')->name('merchantStatisticsMain');
  327. Route::get('order', '/order')->name('merchantStatisticsOrder');
  328. Route::get('user', '/user')->name('merchantStatisticsUser');
  329. Route::get('user_rate', '/userRate')->name('merchantStatisticsUserRate');
  330. Route::get('product', '/product')->name('merchantStatisticsProduct');
  331. Route::get('product_visit', '/productVisit')->name('merchantStatisticsProductVisit');
  332. Route::get('product_cart', '/productCart')->name('merchantStatisticsProductCart');
  333. })->prefix('merchant.Common');
  334. //资金明细
  335. Route::group('financial_record', function () {
  336. Route::get('list', '/lst')->name('merchantFinancialRecordList');
  337. Route::get('export', '/export')->name('merchantFinancialRecordExport');
  338. Route::get('lst', '/getList')->name('merchantFinanciaRecordlLst');
  339. Route::get('title', '/getTitle')->name('merchantFinancialTitle');
  340. Route::get('count', '/title')->name('merchantFinancialCount');
  341. Route::get('detail/:type', '/detail')->name('merchantFinancialRecordDetail');
  342. Route::get('detail_export/:type', '/exportDetail')->name('merchantFinancialRecordDetailExport');
  343. })->prefix('admin.system.merchant.FinancialRecord');
  344. //发票
  345. Route::group('store/receipt', function () {
  346. Route::get('lst', '/lst')->name('merchantOrderReceiptLst');
  347. Route::get('detail/:id', '/detail')->name('merchantOrderReceiptDetail');
  348. Route::get('set_recipt', '/setRecipt')->name('merchantOrderReceiptSetRecipt');
  349. Route::post('save_recipt', '/saveRecipt')->name('merchantOrderReceiptSave');
  350. Route::get('mark/:id/form', '/markForm')->name('merchantOrderReceiptMarkForm');
  351. Route::post('mark/:id', '/mark')->name('merchantOrderReceiptMark');
  352. Route::post('update/:id', '/update')->name('merchantOrderReceiptUpdate');
  353. })->prefix('merchant.store.order.OrderReceipt');
  354. //商品评价管理
  355. Route::group('store/reply', function () {
  356. Route::get('lst', '/lst')->name('merchantProductReplyLst');
  357. Route::get('form/:id', '/replyForm')->name('merchantProductReplyForm');
  358. Route::post('reply/:id', '/reply')->name('merchantProductReplyReply');
  359. })->prefix('admin.store.StoreProductReply');
  360. Route::group('store/reply', function () {
  361. Route::post('sort/:id', '/changeSort')->name('merchantProductReplySort');
  362. })->prefix('merchant.store.StoreProductReply');
  363. //用户自动标签
  364. Route::group('auto_label', function () {
  365. Route::get('lst', '/getList')->name('merchantLabelRuleLst');
  366. Route::post('create', '/create')->name('merchantLabelRuleCreate');
  367. Route::post('update/:id', '/update')->name('merchantLabelRuleUpdate');
  368. Route::delete('delete/:id', '/delete')->name('merchantLabelRuleDelete');
  369. Route::post('sync/:id', '/sync')->name('merchantLabelRuleSync');
  370. })->prefix('merchant.user.LabelRule');
  371. //用户标签
  372. Route::group('user/label', function () {
  373. Route::get('lst', '/lst')->name('merchantUserLabelLst');
  374. Route::post('user/label', '/create')->name('merchantUserLabelCreate');
  375. Route::get('form', '/createForm')->name('merchantUserLabelCreateForm');
  376. Route::delete(':id', '/delete')->name('merchantUserLabelDelete');
  377. Route::post(':id', '/update')->name('merchantUserLabelUpdate');
  378. Route::get('form/:id', '/updateForm')->name('merchantUserLabelUpdateForm');
  379. })->prefix('admin.user.UserLabel');
  380. //系统公告
  381. Route::group('notice', function () {
  382. Route::get('lst', '/lst')->name('systemNoticeLogList');
  383. Route::post('read/:id', '/read')->name('systemNoticeLogRead');
  384. Route::delete('del/:id', '/del')->name('systemNoticeLogDel');
  385. Route::get('unread_count', '/unreadCount')->name('systemNoticeLogUnreadCount');
  386. })->prefix('merchant.system.notice.SystemNoticeLog');
  387. //搜索记录
  388. Route::get('user/search_log', 'admin.user.User/SearchLog')->name('merchantUserSearchLog');
  389. //商户用户列表
  390. Route::group('user', function () {
  391. Route::get('lst', '/getList')->name('merchantUserLst');
  392. //修改用户标签
  393. Route::get('change_label/form/:id', '/changeLabelForm')->name('merchantUserChangeLabelForm');
  394. Route::post('change_label/:id', '/changeLabel')->name('merchantUserChangeLabel');
  395. Route::get('order/:uid', '/order')->name('merchantUserOrder');
  396. Route::get('coupon/:uid', '/coupon')->name('merchantUserCoupon');
  397. })->prefix('merchant.user.UserMerchant');
  398. //商户财务
  399. Route::group('financial', function () {
  400. Route::get('lst', 'Financial/lst')->name('merchantFinancialLst');
  401. Route::get('account/form', 'Financial/accountForm')->name('merchantFinancialAccountForm');
  402. Route::post('account', 'Financial/accountSave')->name('merchantFinancialAccountSave');
  403. Route::get('detail/:id', 'Financial/detail')->name('merchantFinancialDetail');
  404. Route::get('create/form', 'Financial/createForm')->name('merchantFinancialCreateForm');
  405. Route::post('create', 'Financial/createSave')->name('merchantFinancialCreateSave');
  406. Route::delete('delete/:id', 'Financial/delete')->name('merchantFinancialDelete');
  407. Route::get('mark/:id/form', 'Financial/markForm')->name('merchantFinancialMarkForm');
  408. Route::post('mark/:id', 'Financial/mark')->name('merchantFinancialMark');
  409. })->prefix('merchant.system.financial.');
  410. //组合数据
  411. Route::get('group/detail/:id', 'admin.system.groupData.Group/get')->name('merchantGroupDetail');
  412. Route::group('group', function () {
  413. Route::get('data/lst/:groupId', '/lst')->name('merchantGroupDataLst');
  414. Route::get('data/create/table/:groupId', '/createTable')->name('merchantGroupDataCreateForm');
  415. Route::post('data/create/:groupId', '/create')->name('merchantGroupDataCreate');
  416. Route::get('data/update/table/:groupId/:id', '/updateTable')->name('merchantGroupDataUpdateForm');
  417. Route::post('data/update/:groupId/:id', '/update')->name('merchantGroupDataUpdate');
  418. Route::delete('data/delete/:id', '/delete')->name('merchantGroupDataDelete');
  419. Route::post('data/status/:id', '/changeStatus')->name('merchantGroupDataChangeStatus');
  420. })->prefix('admin.system.groupData.GroupData');
  421. //保障服务
  422. Route::group('guarantee',function(){
  423. Route::get('list','/list')->name('merchantGuaranteeList');
  424. Route::get('select','/select')->name('merchantGuaranteeSelect');
  425. Route::get('lst','/lst')->name('merchantGuaranteeLst');
  426. Route::post('create','/create')->name('smerchantGuaranteeCreate');
  427. Route::post('update/:id','/update')->name('merchantGuaranteeUpdate');
  428. Route::get('detail/:id','/detail')->name('merchantGuaranteeDetail');
  429. Route::delete('delete/:id','/delete')->name('merchantGuaranteeDelete');
  430. Route::post('sort/:id','/sort')->name('merchantGuaranteeSort');
  431. Route::post('status/:id','/switchStatus')->name('merchantGuaranteeStatus');
  432. })->prefix('merchant.store.guarantee.GuaranteeTemplate');
  433. //积分
  434. Route::group('integral',function(){
  435. Route::get('lst','/getList')->name('merchantIntegralList');
  436. Route::get('title','/getTitle')->name('merchantIntegralTitle');
  437. })->prefix('merchant.user.UserIntegral');
  438. //分账单
  439. Route::group('profitsharing', function () {
  440. Route::get('lst', '/getList')->name('merchantOrderProfitsharingLst');
  441. })->prefix('admin.order.OrderProfitsharing');
  442. //申请分账商户
  443. Route::group('applyments',function(){
  444. Route::post('create','/create')->name('merchantApplymentsCreate');
  445. Route::get('detail','/detail')->name('merchantApplymentsDetail');
  446. Route::post('update/:id','/update')->name('merchantApplymentsUpdate');
  447. Route::post('upload/:field','/uploadImage')->name('merchantApplymentsUpload');
  448. Route::get('check','/check')->name('merchantApplymentsCheck');
  449. })->prefix('merchant.system.MerchantApplyments');
  450. //一号通
  451. Route::group('serve',function(){
  452. Route::get('meal','Serve/meal')->name('merchantServeMeal');
  453. Route::get('code','Serve/getQrCode')->name('merchantServeCode');
  454. Route::get('paylst','Serve/lst')->name('merchantServeLst');
  455. Route::get('detail/:id','Serve/detail')->name('merchantServeDetail');
  456. Route::get('info','Config/info')->name('merchantServeInfo');
  457. Route::get('config','Config/getConfig')->name('merchantServeGetConfig');
  458. Route::post('config','Config/setConfig')->name('merchantServeSetConfig');
  459. })->prefix('merchant.system.serve.');
  460. Route::group('expr',function(){
  461. Route::get('/lst','store.Express/lst')->name('merchantServeExportLst');
  462. Route::get('/options','store.Express/options')->name('merchantServeExportOptions');
  463. Route::get('/temps','system.serve.Export/getExportTemp')->name('merchantServeExportTemps');
  464. Route::get('/dump_lst','system.serve.Export/dumpLst')->name('merchantServeExportDumpLst');
  465. Route::get('/partner/:id/form','store.Express/partnerForm')->name('merchantExpressPratnerUpdateForm');
  466. Route::post('/partner/:id','store.Express/partner')->name('merchantExpressPratnerUpdate');
  467. })->prefix('admin.');
  468. })->middleware(AllowOriginMiddleware::class)
  469. ->middleware(MerchantTokenMiddleware::class, true)
  470. ->middleware(MerchantAuthMiddleware::class)
  471. ->middleware(MerchantCheckBaseInfoMiddleware::class)
  472. ->middleware(LogMiddleware::class);
  473. //不带token认证
  474. Route::group(function () {
  475. Route::get('test', 'merchant.system.admin.Login/test');
  476. //验证码
  477. Route::get('captcha', 'merchant.system.admin.Login/getCaptcha');
  478. //登录
  479. Route::post('login', 'merchant.system.admin.Login/login');
  480. Route::get('login_config', 'admin.Common/loginConfig');
  481. Route::group(function () {
  482. })->middleware(MerchantTokenMiddleware::class, false);
  483. })->middleware(AllowOriginMiddleware::class);
  484. Route::miss(function () {
  485. return app('json')->fail('接口不存在');
  486. })->middleware(AllowOriginMiddleware::class);
  487. })->middleware(InstallMiddleware::class)
  488. ->middleware(CheckSiteOpenMiddleware::class);