merchant.php 30 KB

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