marketing.php 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441
  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 think\facade\Route;
  12. use app\common\middleware\AdminAuthMiddleware;
  13. use app\common\middleware\AdminTokenMiddleware;
  14. use app\common\middleware\AllowOriginMiddleware;
  15. use app\common\middleware\LogMiddleware;
  16. Route::group(function () {
  17. //红包米
  18. Route::group('user/integral', function () {
  19. Route::get('config', '.UserIntegral/getConfig')->name('systemUserIntegralConfig')->option([
  20. '_alias' => '红包米配置获取',
  21. '_auth' => false,
  22. '_form' => 'systemUserIntegralConfigSave',
  23. ]);
  24. Route::post('config', '.UserIntegral/saveConfig')->name('systemUserIntegralConfigSave')->option([
  25. '_alias' => '红包米配置保存',
  26. ]);
  27. })->prefix('admin.user')->option([
  28. '_path' => '/marketing/integral/config',
  29. '_auth' => true,
  30. ]);
  31. Route::group('user/integral', function () {
  32. Route::get('title', '.UserIntegral/getTitle')->name('systemUserIntegralTitle')->option([
  33. '_alias' => '红包米统计',
  34. ]);
  35. Route::get('lst', '.UserIntegral/getList')->name('systemUserIntegralLst')->option([
  36. '_alias' => '红包米日志',
  37. ]);
  38. Route::get('excel', '.UserIntegral/excel')->name('systemUserIntegralExcel')->option([
  39. '_alias' => '红包米导出',
  40. ]);
  41. })->prefix('admin.user')->option([
  42. '_path' => '/marketing/integral/log',
  43. '_auth' => true,
  44. '_append'=> [
  45. [
  46. '_name' =>'systemStoreExcelLst',
  47. '_path' =>'/marketing/integral/log',
  48. '_alias' => '导出列表',
  49. '_auth' => true,
  50. ],
  51. [
  52. '_name' =>'systemStoreExcelDownload',
  53. '_path' =>'/marketing/integral/log',
  54. '_alias' => '导出下载',
  55. '_auth' => true,
  56. ],
  57. ]
  58. ]);
  59. //预售商品
  60. Route::group('store/product/presell', function () {
  61. Route::get('lst', 'StoreProductPresell/lst')->name('systemStoreProductPresellLst')->option([
  62. '_alias' => '列表',
  63. ]);
  64. Route::post('is_show/:id', 'StoreProductPresell/switchStatus')->name('systemStoreProductPresellShow')->option([
  65. '_alias' => '显示/隐藏',
  66. ]);
  67. Route::get('detail/:id', 'StoreProductPresell/detail')->name('systemStoreProductPresellDetail')->option([
  68. '_alias' => '详情',
  69. ]);
  70. Route::get('get/:id', 'StoreProductPresell/get')->name('systemStoreProductPresellGet')->option([
  71. '_alias' => '编辑数据',
  72. ]);
  73. Route::post('update/:id', 'StoreProductPresell/update')->name('systemStoreProductPresellUpdate')->option([
  74. '_alias' => '编辑',
  75. ]);
  76. Route::post('status', 'StoreProductPresell/switchAudit')->name('systemStoreProductPresellSwitchStatus')->option([
  77. '_alias' => '审核',
  78. ]);
  79. Route::post('labels/:id', 'StoreProductPresell/setLabels')->name('systemStoreProductPresellLabels')->option([
  80. '_alias' => '设置标签',
  81. ]);
  82. })->prefix('admin.store.')->option([
  83. '_path' => '/marketing/presell/list',
  84. '_auth' => true,
  85. ]);
  86. //助力商品
  87. Route::group('store/product/assist', function () {
  88. Route::get('lst', 'StoreProductAssist/lst')->name('systemStoreProductAssistLst')->option([
  89. '_alias' => '列表',
  90. ]);
  91. Route::post('is_show/:id', 'StoreProductAssist/switchStatus')->name('systemStoreProductAssistShow')->option([
  92. '_alias' => '显示/隐藏',
  93. ]);
  94. Route::get('detail/:id', 'StoreProductAssist/detail')->name('systemStoreProductAssistDetail')->option([
  95. '_alias' => '详情',
  96. ]);
  97. Route::post('update/:id', 'StoreProductAssist/update')->name('systemStoreProductAssistProductUpdate')->option([
  98. '_alias' => '编辑',
  99. ]);
  100. Route::post('status', 'StoreProductAssist/switchAudit')->name('systemStoreProductAssistStatus')->option([
  101. '_alias' => '审核',
  102. ]);
  103. Route::get('get/:id', 'StoreProductAssist/get')->name('systemStoreProductAssistGet')->option([
  104. '_alias' => '编辑数据',
  105. ]);
  106. Route::post('labels/:id', 'StoreProductAssist/setLabels')->name('systemStoreProductAssistLabels')->option([
  107. '_alias' => '设置标签',
  108. ]);
  109. })->prefix('admin.store.')->option([
  110. '_path' => '/marketing/assist/goods_list',
  111. '_auth' => true,
  112. ]);
  113. //助力活动
  114. Route::group('store/product/assist', function () {
  115. Route::get('set/lst', 'StoreProductAssistSet/lst')->name('systemStoreProductAssistSetLst')->option([
  116. '_alias' => '列表',
  117. ]);
  118. Route::get('set/detail/:id', 'StoreProductAssistSet/detail')->name('systemStoreProductAssistSetDetail')->option([
  119. '_alias' => '详情',
  120. ]);
  121. })->prefix('admin.store.')->option([
  122. '_path' => '/marketing/assist/list',
  123. '_auth' => true,
  124. ]);
  125. //拼团商品
  126. Route::group('store/product/group', function () {
  127. Route::get('lst', 'StoreProductGroup/lst')->name('systemStoreProductGroupLst')->option([
  128. '_alias' => '列表',
  129. ]);
  130. Route::post('is_show/:id', 'StoreProductGroup/switchStatus')->name('systemStoreProductGroupShow')->option([
  131. '_alias' => '显示/隐藏',
  132. ]);
  133. Route::get('detail/:id', 'StoreProductGroup/detail')->name('systemStoreProductGroupDetail')->option([
  134. '_alias' => '详情',
  135. ]);
  136. Route::post('update/:id', 'StoreProductGroup/update')->name('systemStoreProductGroupProductUpdate')->option([
  137. '_alias' => '编辑',
  138. ]);
  139. Route::post('status', 'StoreProductGroup/switchAudit')->name('systemStoreProductGroupStatus')->option([
  140. '_alias' => '审核',
  141. ]);
  142. Route::get('get/:id', 'StoreProductGroup/get')->name('systemStoreProductGroupGet')->option([
  143. '_alias' => '编辑数据',
  144. ]);
  145. Route::post('sort/:id', 'StoreProductGroup/updateSort')->name('systemStoreProductGroupSort')->option([
  146. '_alias' => '排序',
  147. ]);
  148. Route::post('labels/:id', 'StoreProductGroup/setLabels')->name('systemStoreProductGroupLabels')->option([
  149. '_alias' => '设置标签',
  150. ]);
  151. })->prefix('admin.store.')->option([
  152. '_path' => '/marketing/combination/combination_goods',
  153. '_auth' => true,
  154. ]);
  155. //拼团活动
  156. Route::group('store/product/group', function () {
  157. Route::get('buying/lst', '/lst')->name('systemStoreProductGroupBuyingLst')->option([
  158. '_alias' => '列表',
  159. ]);
  160. Route::get('buying/detail/:id', '/detail')->name('systemStoreProductGroupBuyingDetail')->option([
  161. '_alias' => '详情',
  162. ]);
  163. })->prefix('admin.store.StoreProductGroupBuying')->option([
  164. '_path' => '/marketing/combination/combination_list',
  165. '_auth' => true,
  166. ]);
  167. Route::group('config/others', function () {
  168. Route::get('group_buying', '/getGroupBuying')->name('configOthersGroupBuyingDetail')->option([
  169. '_alias' => '配置信息',
  170. '_auth' => false,
  171. '_form' => 'configOthersGroupBuyingUpdate',
  172. ]);
  173. Route::post('group_buying', '/setGroupBuying')->name('configOthersGroupBuyingUpdate')->option([
  174. '_alias' => '配置保存',
  175. ]);
  176. })->prefix('admin.system.config.ConfigOthers')->option([
  177. '_path' => '/marketing/combination/combination_set',
  178. '_auth' => true,
  179. ]);
  180. //直播间
  181. Route::group('broadcast/room', function () {
  182. Route::get('lst', '/lst')->name('systemBroadcastRoomLst')->option([
  183. '_alias' => '列表',
  184. ]);
  185. Route::get('detail/:id', '/detail')->name('systemBroadcastRoomDetail')->option([
  186. '_alias' => '详情',
  187. ]);
  188. Route::get('apply/form/:id', '/applyForm')->name('systemBroadcastRoomApplyForm')->option([
  189. '_alias' => '申请审核表单',
  190. '_auth' => false,
  191. '_form' => 'systemBroadcastRoomApply',
  192. ]);
  193. Route::post('apply/:id', '/apply')->name('systemBroadcastRoomApply')->option([
  194. '_alias' => '申请',
  195. ]);
  196. Route::post('status/:id', '/changeStatus')->name('systemBroadcastRoomChangeStatus')->option([
  197. '_alias' => '修改状态',
  198. ]);
  199. Route::post('sort/:id', '/sort')->name('systemBroadcastRoomSort')->option([
  200. '_alias' => '排序',
  201. ]);
  202. Route::post('live_status/:id', '/changeLiveStatus')->name('systemBroadcastRoomChangeLiveStatus')->option([
  203. '_alias' => '修改状态',
  204. ]);
  205. Route::delete('delete/:id', '/delete')->name('systemBroadcastRoomDelete')->option([
  206. '_alias' => '删除',
  207. ]);
  208. Route::get('goods/:id', '/goodsList')->name('systemBroadcastRoomGoods')->option([
  209. '_alias' => '商品列表',
  210. ]);
  211. Route::post('closeKf/:id', '/closeKf')->name('systemBroadcastRoomCloseKf')->option([
  212. '_alias' => '客服开关',
  213. ]);
  214. Route::post('comment/:id', '/banComment')->name('systemBroadcastRoomCloseComment')->option([
  215. '_alias' => '禁言开关',
  216. ]);
  217. Route::post('feedsPublic/:id', '/isFeedsPublic')->name('systemBroadcastRoomClosesFeeds')->option([
  218. '_alias' => '收录开关',
  219. ]);
  220. })->prefix('admin.store.BroadcastRoom')->option([
  221. '_path' => '/marketing/studio/list',
  222. '_auth' => true,
  223. ]);
  224. //直播间商品
  225. Route::group('broadcast/goods', function () {
  226. Route::get('lst', '/lst')->name('systemBroadcastGoodsLst')->option([
  227. '_alias' => '列表',
  228. ]);
  229. Route::get('detail/:id', '/detail')->name('systemBroadcastGoodsDetail')->option([
  230. '_alias' => '详情',
  231. ]);
  232. Route::get('apply/form/:id', '/applyForm')->name('systemBroadcastGoodsApplyForm')->option([
  233. '_alias' => '审核表单',
  234. '_auth' => false,
  235. '_form' => 'systemBroadcastRoomApply',
  236. ]);
  237. Route::post('apply/:id', '/apply')->name('systemBroadcastGoodsApply')->option([
  238. '_alias' => '审核',
  239. ]);
  240. Route::post('status/:id', '/changeStatus')->name('systemBroadcastGoodsChangeStatus')->option([
  241. '_alias' => '修改状态',
  242. ]);
  243. Route::post('sort/:id', '/sort')->name('systemBroadcastGoodsSort')
  244. ->option([
  245. '_alias' => '排序',
  246. ]);
  247. Route::delete('delete/:id', '/delete')->name('systemBroadcastGoodsDelete')->option([
  248. '_alias' => '删除',
  249. ]);
  250. })->prefix('admin.store.BroadcastGoods')->option([
  251. '_path' => '/marketing/broadcast/list',
  252. '_auth' => true,
  253. ]);
  254. //秒杀配置管理
  255. Route::group('seckill/config', function () {
  256. Route::get('lst', '/lst')->name('systemSeckillConfigLst')->option([
  257. '_alias' => '列表',
  258. ]);
  259. Route::get('select', '/select')->option([
  260. '_alias' => '筛选',
  261. '_auth' => false,
  262. ]);
  263. Route::get('create/form', '/createForm')->name('systemSeckillConfigCreateForm')->option([
  264. '_alias' => '添加表单',
  265. '_auth' => false,
  266. '_form' => 'systemSeckillConfigCreate',
  267. ]);
  268. Route::post('create', '/create')->name('systemSeckillConfigCreate')->option([
  269. '_alias' => '添加',
  270. ]);
  271. Route::get('update/:id/form', '/updateForm')->name('systemSeckillConfigUpdateForm')->option([
  272. '_alias' => '编辑表单',
  273. '_auth' => false,
  274. '_form' => 'systemSeckillConfigUpdate',
  275. ]);
  276. Route::post('update/:id', '/update')->name('systemSeckillConfigUpdate')->option([
  277. '_alias' => '编辑',
  278. ]);
  279. Route::post('status/:id', '/switchStatus')->name('systemSeckillConfigStatus')->option([
  280. '_alias' => '排序',
  281. ]);
  282. Route::delete('delete/:id', '/delete')->name('systemSeckillConfigDelete')->option([
  283. '_alias' => '删除',
  284. ]);
  285. })->prefix('admin.store.StoreSeckill')->option([
  286. '_path' => '/marketing/seckill/seckillConfig',
  287. '_auth' => true,
  288. '_append'=> [
  289. [
  290. '_name' =>'uploadImage',
  291. '_path' =>'/marketing/seckill/seckillConfig',
  292. '_alias' => '上传图片',
  293. '_auth' => true,
  294. ],
  295. [
  296. '_name' =>'systemAttachmentLst',
  297. '_path' =>'/marketing/seckill/seckillConfig',
  298. '_alias' => '图片列表',
  299. '_auth' => true,
  300. ],
  301. ]
  302. ]);
  303. //秒杀商品管理
  304. Route::group('seckill/product', function () {
  305. Route::get('mer_select', '/lists')->option([
  306. '_alias' => '列表 ',
  307. '_auth' => false,
  308. ]);
  309. Route::get('lst_filter', '/getStatusFilter')->name('systemStoreSeckillProductLstFilter')->option([
  310. '_alias' => '统计',
  311. ]);
  312. Route::get('lst', '/lst')->name('systemStoreSeckillProductLst')->option([
  313. '_alias' => '列表',
  314. ]);
  315. Route::get('list', '/lst')->option([
  316. '_alias' => '列表',
  317. '_auth' => false,
  318. ]);
  319. Route::get('detail/:id', '/detail')->name('systemStoreSeckillProductDetail')->option([
  320. '_alias' => '权限',
  321. ]);
  322. Route::post('update/:id', '/update')->name('systemStoreSeckillProductUpdate')->option([
  323. '_alias' => '编辑',
  324. ]);
  325. Route::post('status', '/switchStatus')->name('systemStoreSeckillProductSwitchStatus')->option([
  326. '_alias' => '审核',
  327. ]);
  328. Route::post('change/:id', '/changeUsed')->name('systemStoreSeckillProductChangeUsed')->option([
  329. '_alias' => '显示/隐藏',
  330. ]);
  331. Route::post('labels/:id', '/setLabels')->name('systemStoreSeckillProductLabels')->option([
  332. '_alias' => '设置标签',
  333. ]);
  334. })->prefix('admin.store.StoreProductSeckill')->option([
  335. '_path' => '/marketing/seckill/list',
  336. '_auth' => true,
  337. ]);
  338. //商品列表
  339. Route::get('marketing/spu/lst', 'admin.store.marketing.StoreAtmosphere/markLst');
  340. //活动氛围图 - 详情下边框图
  341. Route::group('activity/atmosphere/', function () {
  342. Route::post('create', '/create')->name('systemActivityAtmosphereCreate')->option([
  343. '_alias' => '添加',
  344. ]);
  345. Route::get('lst', '/lst')->name('systemActivityAtmosphereLst')->option([
  346. '_alias' => '列表',
  347. ]);
  348. Route::post('update/:id', '/update')->name('systemActivityAtmosphereUpdate')->option([
  349. '_alias' => '编辑',
  350. ]);
  351. Route::get('detail/:id', '/detail')->name('systemActivityAtmosphereDetail')->option([
  352. '_alias' => '详情',
  353. ]);
  354. Route::delete('delete/:id', '/delete')->name('systemActivityAtmosphereDelete')->option([
  355. '_alias' => '删除',
  356. ]);
  357. Route::post('status/:id', '/statusSwitch')->name('systemActivityAtmosphereStatus')->option([
  358. '_alias' => '修改状态',
  359. ]);
  360. })->prefix('admin.store.marketing.StoreAtmosphere')->option([
  361. '_path' => '/marketing/atmosphere/list',
  362. '_auth' => true,
  363. '_append'=> [
  364. [
  365. '_name' =>'uploadImage',
  366. '_path' =>'/marketing/atmosphere/list',
  367. '_alias' => '上传图片',
  368. '_auth' => true,
  369. ],
  370. [
  371. '_name' =>'systemAttachmentLst',
  372. '_path' =>'/marketing/atmosphere/list',
  373. '_alias' => '图片列表',
  374. '_auth' => true,
  375. ],
  376. ]
  377. ]);
  378. //活动氛围图-列表边框
  379. Route::group('activity/border/', function () {
  380. Route::post('create', '/create')->name('systemActivityBorderCreate')->option([
  381. '_alias' => '添加',
  382. ]);
  383. Route::get('lst', '/lst')->name('systemActivityBorderLst')->option([
  384. '_alias' => '列表',
  385. ]);
  386. Route::post('update/:id', '/update')->name('systemActivityBorderUpdate')->option([
  387. '_alias' => '编辑',
  388. ]);
  389. Route::get('detail/:id', '/detail')->name('systemActivityBorderDetail')->option([
  390. '_alias' => '详情',
  391. ]);
  392. Route::delete('delete/:id', '/delete')->name('systemActivityBorderDelete')->option([
  393. '_alias' => '删除',
  394. ]);
  395. Route::post('status/:id', '/statusSwitch')->name('systemActivityBorderStatus')->option([
  396. '_alias' => '修改状态',
  397. ]);
  398. })->prefix('admin.store.marketing.StoreBorder')->option([
  399. '_path' => '/marketing/border/list',
  400. '_auth' => true,
  401. '_append'=> [
  402. [
  403. '_name' =>'uploadImage',
  404. '_path' =>'/marketing/border/list',
  405. '_alias' => '上传图片',
  406. '_auth' => true,
  407. ],
  408. [
  409. '_name' =>'systemAttachmentLst',
  410. '_path' =>'/marketing/border/list',
  411. '_alias' => '图片列表',
  412. '_auth' => true,
  413. ],
  414. ]
  415. ]);
  416. })->middleware(AllowOriginMiddleware::class)
  417. ->middleware(AdminTokenMiddleware::class, true)
  418. ->middleware(AdminAuthMiddleware::class)
  419. ->middleware(LogMiddleware::class);