marketing.php 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2023 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. /**
  13. * 优惠卷,砍价,拼团,秒杀 路由
  14. */
  15. Route::group('marketing', function () {
  16. /** 优惠券 */
  17. Route::group(function () {
  18. //已发布优惠券列表
  19. Route::get('coupon/released', 'v1.marketing.StoreCouponIssue/index')->option(['real_name' => '已发布优惠券列表']);
  20. //添加优惠券
  21. Route::post('coupon/save_coupon', 'v1.marketing.StoreCouponIssue/saveCoupon')->option(['real_name' => '添加优惠券']);
  22. //修改优惠券状态
  23. Route::get('coupon/status/:id/:status', 'v1.marketing.StoreCouponIssue/status')->option(['real_name' => '修改优惠券状态']);
  24. //一键复制优惠券
  25. Route::get('coupon/copy/:id', 'v1.marketing.StoreCouponIssue/copy')->option(['real_name' => '一键复制优惠券']);
  26. //发送优惠券列表
  27. Route::get('coupon/grant', 'v1.marketing.StoreCouponIssue/index')->option(['real_name' => '发送优惠券列表']);
  28. //已发布优惠券删除
  29. Route::delete('coupon/released/:id', 'v1.marketing.StoreCouponIssue/delete')->option(['real_name' => '已发布优惠券删除']);
  30. //已发布优惠券修改状态表单
  31. Route::get('coupon/released/:id/status', 'v1.marketing.StoreCouponIssue/edit')->option(['real_name' => '已发布优惠券修改状态表单']);
  32. //已发布优惠券修改状态
  33. Route::put('coupon/released/status/:id', 'v1.marketing.StoreCouponIssue/status')->option(['real_name' => '已发布优惠券修改状态']);
  34. //已发布优惠券领取记录
  35. Route::get('coupon/released/issue_log/:id', 'v1.marketing.StoreCouponIssue/issue_log')->option(['real_name' => '已发布优惠券领取记录']);
  36. //会员领取记录
  37. Route::get('coupon/user', 'v1.marketing.StoreCouponUser/index')->option(['real_name' => '会员领取记录']);
  38. //发送优惠券
  39. Route::post('coupon/user/grant', 'v1.marketing.StoreCouponUser/grant')->option(['real_name' => '发送优惠券']);
  40. })->option(['parent' => 'marketing', 'cate_name' => '优惠券']);
  41. /** 砍价活动 */
  42. Route::group(function () {
  43. //砍价商品列表
  44. Route::get('bargain', 'v1.marketing.StoreBargain/index')->option(['real_name' => '砍价商品列表']);
  45. //砍价详情
  46. Route::get('bargain/:id', 'v1.marketing.StoreBargain/read')->option(['real_name' => '砍价商品详情']);
  47. //保存新增或编辑砍价
  48. Route::post('bargain/:id', 'v1.marketing.StoreBargain/save')->option(['real_name' => '新增或编辑砍价商品']);
  49. //删除砍价
  50. Route::delete('bargain/:id', 'v1.marketing.StoreBargain/delete')->option(['real_name' => '删除砍价商品']);
  51. //修改砍价状态
  52. Route::put('bargain/set_status/:id/:status', 'v1.marketing.StoreBargain/set_status')->option(['real_name' => '修改砍价商品状态']);
  53. //砍价列表
  54. Route::get('bargain_list', 'v1.marketing.StoreBargain/bargainList')->option(['real_name' => '参与砍价列表']);
  55. //砍价人列表
  56. Route::get('bargain_list_info/:id', 'v1.marketing.StoreBargain/bargainListInfo')->option(['real_name' => '砍价人列表']);
  57. //砍价统计
  58. Route::get('bargain/statistics/head/:id', 'v1.marketing.StoreBargain/bargainStatistics')->option(['real_name' => '砍价统计']);
  59. //砍价列表
  60. Route::get('bargain/statistics/list/:id', 'v1.marketing.StoreBargain/bargainStatisticsList')->option(['real_name' => '砍价统计列表']);
  61. //砍价订单
  62. Route::get('bargain/statistics/order/:id', 'v1.marketing.StoreBargain/bargainStatisticsOrder')->option(['real_name' => '砍价统计订单']);
  63. })->option(['parent' => 'marketing', 'cate_name' => '砍价活动']);
  64. /** 拼团活动 */
  65. Route::group(function () {
  66. //拼团商品列表
  67. Route::get('combination', 'v1.marketing.StoreCombination/index')->option(['real_name' => '拼团商品列表']);
  68. //拼团统计
  69. Route::get('combination/statistics', 'v1.marketing.StoreCombination/statistics')->option(['real_name' => '拼团商品统计']);
  70. //拼团商品详情
  71. Route::get('combination/:id', 'v1.marketing.StoreCombination/read')->option(['real_name' => '拼团商品详情']);
  72. //保存新疆或编辑
  73. Route::post('combination/:id', 'v1.marketing.StoreCombination/save')->option(['real_name' => '新增或编辑拼团商品']);
  74. //删除
  75. Route::delete('combination/:id', 'v1.marketing.StoreCombination/delete')->option(['real_name' => '删除拼团商品']);
  76. //修改拼团状态
  77. Route::put('combination/set_status/:id/:status', 'v1.marketing.StoreCombination/set_status')->option(['real_name' => '修改拼团商品状态']);
  78. //拼团列表
  79. Route::get('combination/combine/list', 'v1.marketing.StoreCombination/combine_list')->option(['real_name' => '参与拼团列表']);
  80. //拼团人列表
  81. Route::get('combination/order_pink/:id', 'v1.marketing.StoreCombination/order_pink')->option(['real_name' => '拼团人列表']);
  82. //拼团统计
  83. Route::get('combination/statistics/head/:id', 'v1.marketing.StoreCombination/combinationStatistics')->option(['real_name' => '拼团统计']);
  84. //拼团列表
  85. Route::get('combination/statistics/list/:id', 'v1.marketing.StoreCombination/combinationStatisticsList')->option(['real_name' => '拼团统计列表']);
  86. //拼团订单
  87. Route::get('combination/statistics/order/:id', 'v1.marketing.StoreCombination/combinationStatisticsOrder')->option(['real_name' => '拼团统计订单']);
  88. })->option(['parent' => 'marketing', 'cate_name' => '拼团活动']);
  89. /** 秒杀活动 */
  90. Route::group(function () {
  91. //秒杀列表
  92. Route::get('seckill', 'v1.marketing.StoreSeckill/index')->option(['real_name' => '秒杀商品列表']);
  93. //秒杀时间段列表
  94. Route::get('seckill/time_list', 'v1.marketing.StoreSeckill/time_list')->option(['real_name' => '秒杀时间段列表']);
  95. //秒杀详情
  96. Route::get('seckill/:id', 'v1.marketing.StoreSeckill/read')->option(['real_name' => '秒杀商品详情']);
  97. //秒杀保存新增或编辑
  98. Route::post('seckill/:id', 'v1.marketing.StoreSeckill/save')->option(['real_name' => '新增或编辑秒杀商品']);
  99. //秒杀删除
  100. Route::delete('seckill/:id', 'v1.marketing.StoreSeckill/delete')->option(['real_name' => '删除秒杀商品']);
  101. //修改秒杀状态
  102. Route::put('seckill/set_status/:id/:status', 'v1.marketing.StoreSeckill/set_status')->option(['real_name' => '修改秒杀商品状态']);
  103. //秒杀统计
  104. Route::get('seckill/statistics/head/:id', 'v1.marketing.StoreSeckill/seckillStatistics')->option(['real_name' => '秒杀统计']);
  105. //参与活动人员
  106. Route::get('seckill/statistics/people/:id', 'v1.marketing.StoreSeckill/seckillPeople')->option(['real_name' => '秒杀参与人']);
  107. //秒杀订单
  108. Route::get('seckill/statistics/order/:id', 'v1.marketing.StoreSeckill/seckillOrder')->option(['real_name' => '秒杀参与人']);
  109. })->option(['parent' => 'marketing', 'cate_name' => '秒杀活动']);
  110. /** 积分活动 */
  111. Route::group(function () {
  112. //积分日志列表
  113. Route::get('integral', 'v1.marketing.UserPoint/index')->option(['real_name' => '积分日志列表']);
  114. //积分日志头部数据
  115. Route::get('integral/statistics', 'v1.marketing.UserPoint/integral_statistics')->option(['real_name' => '积分日志头部数据']);
  116. //积分配置编辑表单
  117. Route::get('integral_config/edit_basics', 'v1.setting.SystemConfig/edit_basics')->option(['real_name' => '积分配置编辑表单']);
  118. //积分配置保存数据
  119. Route::post('integral_config/save_basics', 'v1.setting.SystemConfig/save_basics')->option(['real_name' => '积分配置保存数据']);
  120. //积分商品列表
  121. Route::get('integral_product', 'v1.marketing.integral.StoreIntegral/index')->option(['real_name' => '积分商品列表']);
  122. //积分商品新增或编辑
  123. Route::post('integral/:id', 'v1.marketing.integral.StoreIntegral/save')->option(['real_name' => '积分商品新增或编辑']);
  124. //积分商品详情
  125. Route::get('integral/:id', 'v1.marketing.integral.StoreIntegral/read')->option(['real_name' => '积分商品详情']);
  126. //积分商品删除
  127. Route::delete('integral/:id', 'v1.marketing.integral.StoreIntegral/delete')->option(['real_name' => '积分商品删除']);
  128. //修改积分商品状态
  129. Route::put('integral/set_show/:id/:is_show', 'v1.marketing.integral.StoreIntegral/set_show')->option(['real_name' => '修改积分商品状态']);
  130. //积分商城订单列表
  131. Route::get('integral/order/list', 'v1.marketing.integral.StoreIntegralOrder/lst')->option(['real_name' => '积分商城订单列表']);
  132. //积分商城订单数据
  133. Route::get('integral/order/chart', 'v1.marketing.integral.StoreIntegralOrder/chart')->option(['real_name' => '积分商城订单数据']);
  134. //积分商城订单详情数据
  135. Route::get('integral/order/info/:id', 'v1.marketing.integral.StoreIntegralOrder/order_info')->option(['real_name' => '积分商城订单详情数据']);
  136. //修改积分商品订单备注信息
  137. Route::put('integral/order/remark/:id', 'v1.marketing.integral.StoreIntegralOrder/remark')->option(['real_name' => '修改积分商品订单备注信息']);
  138. //获取积分订单状态
  139. Route::get('integral/order/status/:id', 'v1.marketing.integral.StoreIntegralOrder/status')->option(['real_name' => '获取积分订单状态']);
  140. //删除积分订单
  141. Route::delete('integral/order/del/:id', 'v1.marketing.integral.StoreIntegralOrder/del')->option(['real_name' => '删除积分订单']);
  142. //积分订单发送货
  143. Route::put('integral/order/delivery/:id', 'v1.marketing.integral.StoreIntegralOrder/update_delivery')->option(['real_name' => '积分订单发送货']);
  144. //获取积分订单配送信息表单
  145. Route::get('integral/order/distribution/:id', 'v1.marketing.integral.StoreIntegralOrder/distribution')->option(['real_name' => '获取积分订单配送信息表单']);
  146. //修改积分订单配送信息
  147. Route::put('integral/order/distribution/:id', 'v1.marketing.integral.StoreIntegralOrder/update_distribution')->option(['real_name' => '修改积分订单配送信息']);
  148. //积分订单确认收货
  149. Route::put('integral/order/take/:id', 'v1.marketing.integral.StoreIntegralOrder/take_delivery')->option(['real_name' => '积分订单确认收货']);
  150. //积分订单获取物流公司
  151. Route::get('integral/order/express_list', 'v1.marketing.integral.StoreIntegralOrder/express')->option(['real_name' => '积分订单获取物流公司']);
  152. //积分订单快递公司电子面单模版
  153. Route::get('integral/order/express/temp', 'v1.marketing.integral.StoreIntegralOrder/express_temp')->option(['real_name' => '积分订单快递公司电子面单模版']);
  154. //积分订单获取物流信息
  155. Route::get('integral/order/express/:id', 'v1.marketing.integral.StoreIntegralOrder/get_express')->option(['real_name' => '积分订单获取物流信息']);
  156. //打印积分订单
  157. Route::get('integral/order/print/:id', 'v1.marketing.integral.StoreIntegralOrder/order_print')->option(['real_name' => '打印积分订单']);
  158. //积分订单列表获取配送员
  159. Route::get('integral/order/delivery/list', 'v1.order.DeliveryService/get_delivery_list')->option(['real_name' => '积分订单列表获取配送员']);
  160. //积分订单获取面单默认配置信息
  161. Route::get('integral/order/sheet_info', 'v1.marketing.integral.StoreIntegralOrder/getDeliveryInfo')->option(['real_name' => '积分订单获取面单默认配置信息']);
  162. //积分记录
  163. Route::get('point_record', 'v1.marketing.integral.StorePointRecord/pointRecord')->option(['real_name' => '积分记录列表']);
  164. Route::post('point_record/remark/:id', 'v1.marketing.integral.StorePointRecord/pointRecordRemark')->option(['real_name' => '积分记录列表备注']);
  165. Route::get('point/get_basic', 'v1.marketing.integral.StorePointRecord/getBasic')->option(['real_name' => '积分统计基本信息']);
  166. Route::get('point/get_trend', 'v1.marketing.integral.StorePointRecord/getTrend')->option(['real_name' => '积分统计趋势图']);
  167. //积分来源统计
  168. Route::get('point/get_channel', 'v1.marketing.integral.StorePointRecord/getChannel')->option(['real_name' => '积分来源统计']);
  169. //积分消耗统计
  170. Route::get('point/get_type', 'v1.marketing.integral.StorePointRecord/getType')->option(['real_name' => '积分消耗统计']);
  171. })->option(['parent' => 'marketing', 'cate_name' => '积分活动']);
  172. /** 抽奖活动 */
  173. Route::group(function () {
  174. //抽奖活动列表
  175. Route::get('lottery/list', 'v1.marketing.lottery.LuckLottery/index')->option(['real_name' => '抽奖活动列表']);
  176. //抽奖活动详情
  177. Route::get('lottery/detail/:id', 'v1.marketing.lottery.LuckLottery/detail')->option(['real_name' => '抽奖活动详情']);
  178. //抽奖活动详情
  179. Route::get('lottery/factor_info/:factor', 'v1.marketing.lottery.LuckLottery/factorInfo')->option(['real_name' => '抽奖活动详情']);
  180. //添加抽奖活动
  181. Route::post('lottery/add', 'v1.marketing.lottery.LuckLottery/add')->option(['real_name' => '添加抽奖活动']);
  182. //修改抽奖活动数据
  183. Route::put('lottery/edit/:id', 'v1.marketing.lottery.LuckLottery/edit')->option(['real_name' => '修改抽奖活动数据']);
  184. //删除抽奖活动
  185. Route::delete('lottery/del/:id', 'v1.marketing.lottery.LuckLottery/delete')->option(['real_name' => '删除抽奖活动']);
  186. //设置抽奖活动是否显示
  187. Route::post('lottery/set_status/:id/:status', 'v1.marketing.lottery.LuckLottery/setStatus')->option(['real_name' => '设置抽奖活动是否显示']);
  188. //抽奖记录列表
  189. Route::get('lottery/record/list', 'v1.marketing.lottery.LuckLotteryRecord/index')->option(['real_name' => '抽奖记录列表']);
  190. //抽奖中奖发货、备注处理
  191. Route::post('lottery/record/deliver', 'v1.marketing.lottery.LuckLotteryRecord/deliver')->option(['real_name' => '抽奖中奖发货、备注处理']);
  192. })->option(['parent' => 'marketing', 'cate_name' => '抽奖活动']);
  193. /** 每日签到 */
  194. Route::group(function () {
  195. //签到奖励列表
  196. Route::get('sign/rewards', 'v1.marketing.SignRewards/index')->option(['real_name' => '签到奖励列表']);
  197. //添加签到奖励
  198. Route::get('sign/add_rewards', 'v1.marketing.SignRewards/addRewards')->option(['real_name' => '添加签到奖励']);
  199. //编辑签到奖励
  200. Route::get('sign/edit_rewards/:id', 'v1.marketing.SignRewards/editRewards')->option(['real_name' => '保存签到奖励']);
  201. //保存签到奖励
  202. Route::post('sign/save_rewards/:id', 'v1.marketing.SignRewards/saveRewards')->option(['real_name' => '保存签到奖励']);
  203. //删除签到奖励
  204. Route::delete('sign/del_rewards/:id', 'v1.marketing.SignRewards/delRewards')->option(['real_name' => '删除签到奖励']);
  205. })->option(['parent' => 'marketing', 'cate_name' => '每日签到']);
  206. })->middleware([
  207. \app\http\middleware\AllowOriginMiddleware::class,
  208. \app\adminapi\middleware\AdminAuthTokenMiddleware::class,
  209. \app\adminapi\middleware\AdminCheckRoleMiddleware::class,
  210. \app\adminapi\middleware\AdminLogMiddleware::class
  211. ])->option(['mark' => 'marketing', 'mark_name' => '营销活动']);