backend.php 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  1. <?php
  2. use addons\WechatVideoShop\common\listeners\GoodsUpdateListener;
  3. use addons\WechatVideoShop\common\listeners\OrderCloseListener;
  4. use addons\WechatVideoShop\common\listeners\OrderCreateListener;
  5. use addons\WechatVideoShop\common\listeners\OrderDeliveryListener;
  6. use addons\WechatVideoShop\common\listeners\OrderFinishListener;
  7. use addons\WechatVideoShop\common\listeners\OrderPaidListener;
  8. use addons\WechatVideoShop\common\listeners\OrderRefundBuyerExpressListener;
  9. use addons\WechatVideoShop\common\listeners\OrderRefundCancelListener;
  10. use addons\WechatVideoShop\common\listeners\OrderRefundFinishListener;
  11. use addons\WechatVideoShop\common\listeners\OrderRefundListener;
  12. use addons\WechatVideoShop\common\listeners\OrderRefundUpdateListener;
  13. use addons\WechatVideoShop\common\listeners\OrderTakeDeliveryListener;
  14. return [
  15. // ----------------------- 菜单配置 ----------------------- //
  16. 'config' => [
  17. // 菜单配置
  18. 'menu' => [
  19. 'location' => 'default', // default:系统顶部菜单;addons:应用中心菜单
  20. 'icon' => 'fa fa-puzzle-piece',
  21. ],
  22. // 子模块配置
  23. 'modules' => [
  24. ],
  25. ],
  26. // ----------------------- 快捷入口 ----------------------- //
  27. 'cover' => [
  28. ],
  29. // ----------------------- 菜单配置 ----------------------- //
  30. 'menu' => [
  31. [
  32. 'title' => '小店入驻',
  33. 'route' => 'default/index',
  34. 'icon' => '',
  35. 'params' => [],
  36. 'child' => [],
  37. ],
  38. [
  39. 'title' => '商品列表',
  40. 'route' => 'goods/index',
  41. 'icon' => '',
  42. 'params' => [],
  43. 'child' => [],
  44. ],
  45. [
  46. 'title' => '商品类目管理',
  47. 'route' => 'cate/index',
  48. 'icon' => '',
  49. 'params' => [],
  50. 'child' => [],
  51. ],
  52. // [
  53. // 'title' => '订单管理',
  54. // 'route' => 'order/index',
  55. // 'icon' => '',
  56. // 'params' => [],
  57. // 'child' => [],
  58. // ],
  59. [
  60. 'title' => '店铺管理',
  61. 'route' => 'shop/index',
  62. 'icon' => '',
  63. 'params' => [],
  64. 'child' => [],
  65. ],
  66. [
  67. 'title' => '基础设置',
  68. 'route' => 'setting/index',
  69. 'icon' => '',
  70. 'params' => [],
  71. 'child' => [],
  72. ],
  73. ],
  74. // ----------------------- 权限配置 ----------------------- //
  75. 'authItem' => [
  76. [
  77. 'title' => '微信视频小店',
  78. 'name' => '',
  79. 'app_id' => 'backend',
  80. 'is_addon' => 1,
  81. 'addons_name' => 'WechatVideoShop',
  82. 'child' => [
  83. [
  84. 'title' => '小店入驻',
  85. 'name' => 'default/index',
  86. 'app_id' => 'backend',
  87. 'is_addon' => 1,
  88. 'addons_name' => 'WechatVideoShop',
  89. ],
  90. [
  91. 'title' => '商品列表',
  92. 'name' => 'goods/index',
  93. 'app_id' => 'backend',
  94. 'is_addon' => 1,
  95. 'addons_name' => 'WechatVideoShop',
  96. ],
  97. [
  98. 'title' => '引流获客',
  99. 'route' => 'sharer/index',
  100. 'icon' => '',
  101. 'params' => [],
  102. 'child' => [
  103. [
  104. 'title' => '分销员管理',
  105. 'route' => 'sharer/list',
  106. 'icon' => '',
  107. 'params' => [],
  108. 'child' => [],
  109. 'addons_name' => 'WechatVideoShop',
  110. ],
  111. [
  112. 'title' => '邀请视频号分销员',
  113. 'route' => 'sharer/invite',
  114. 'icon' => '',
  115. 'params' => [],
  116. 'child' => [],
  117. 'addons_name' => 'WechatVideoShop',
  118. ],
  119. [
  120. 'title' => '奖励明细',
  121. 'route' => 'commission/index',
  122. 'icon' => '',
  123. 'params' => [],
  124. 'child' => [],
  125. 'addons_name' => 'WechatVideoShop',
  126. ],
  127. [
  128. 'title' => '分销员权重',
  129. 'route' => 'level/index',
  130. 'icon' => '',
  131. 'params' => [],
  132. 'child' => [],
  133. 'addons_name' => 'WechatVideoShop',
  134. ]
  135. ],
  136. 'addons_name' => 'WechatVideoShop',
  137. ],
  138. // [
  139. // 'title' => '订单管理',
  140. // 'route' => 'order/index',
  141. // 'icon' => '',
  142. // 'params' => [],
  143. // 'child' => [],
  144. // 'addons_name' => 'WechatVideoShop',
  145. // ],
  146. [
  147. 'title' => '商品类目管理',
  148. 'route' => 'cate/index',
  149. 'icon' => '',
  150. 'params' => [],
  151. 'child' => [],
  152. 'addons_name' => 'WechatVideoShop',
  153. ],
  154. [
  155. 'title' => '店铺管理',
  156. 'name' => 'shop/index',
  157. 'app_id' => 'backend',
  158. 'is_addon' => 1,
  159. 'addons_name' => 'WechatVideoShop',
  160. ],
  161. [
  162. 'title' => '基础设置',
  163. 'name' => 'setting/index',
  164. 'app_id' => 'backend',
  165. 'is_addon' => 1,
  166. 'addons_name' => 'WechatVideoShop',
  167. ],
  168. ],
  169. ],
  170. ],
  171. // ----------------------- APP链接 ----------------------- //
  172. 'links' => [
  173. [
  174. 'title' => '微信视频小店',
  175. 'route' => '/plugins3/WechatVideoShop/index',
  176. 'icon' => '',
  177. 'params' => [],
  178. ],
  179. [
  180. 'title' => '分销员申请',
  181. 'route' => '/plugins3/WechatVideoShop/invite',
  182. 'icon' => '',
  183. 'params' => [],
  184. ],
  185. ],
  186. // ----------------------- 事件处理 ----------------------- //
  187. 'events' => [
  188. // [
  189. // 'event_name' => 'order_create', // 创建订单 - 不需要
  190. // 'listeners' => [
  191. // OrderCreateListener::class,
  192. // ]
  193. // ],
  194. [
  195. 'event_name' => 'order_pay', // 订单支付
  196. 'listeners' => [
  197. OrderPaidListener::class,
  198. ]
  199. ],
  200. [
  201. 'event_name' => 'order_delivery', // 订单发货
  202. 'listeners' => [
  203. OrderDeliveryListener::class,
  204. ]
  205. ],
  206. [
  207. 'event_name' => 'order_take_delivery', // 订单收货
  208. 'listeners' => [
  209. OrderTakeDeliveryListener::class,
  210. ]
  211. ],
  212. [
  213. 'event_name' => 'order_finish', //订单完成
  214. 'listeners' => [
  215. OrderFinishListener::class,
  216. ]
  217. ],
  218. [
  219. 'event_name' => 'order_close', //订单关闭
  220. 'listeners' => [
  221. OrderCloseListener::class,
  222. ]
  223. ],
  224. [
  225. 'event_name' => 'order_refund', //申请售后
  226. 'listeners' => [
  227. OrderRefundListener::class,
  228. ]
  229. ],
  230. [
  231. 'event_name' => 'order_refund_buyer_delivery', //买家邮寄退货商品
  232. 'listeners' => [
  233. OrderRefundBuyerExpressListener::class,
  234. ]
  235. ],
  236. [
  237. 'event_name' => 'order_refund_cancel', //售后取消
  238. 'listeners' => [
  239. OrderRefundCancelListener::class,
  240. ]
  241. ],
  242. [
  243. 'event_name' => 'order_refund_finish', //售后完成
  244. 'listeners' => [
  245. OrderRefundFinishListener::class,
  246. ]
  247. ],
  248. [
  249. 'event_name' => 'order_refund_update', // 售后更新
  250. 'listeners' => [
  251. OrderRefundUpdateListener::class,
  252. ]
  253. ],
  254. [
  255. 'event_name' => 'goods_edit', // 商品更新
  256. 'listeners' => [
  257. GoodsUpdateListener::class,
  258. ]
  259. ]
  260. ],
  261. // ----------------------- 公共调用 ----------------------- //
  262. 'invoker'=>[
  263. ['invoker_id'=>\common\enums\GlobalFuncEnum::GOODS_MODEL,'class'=> \addons\WechatVideoShop\common\service\GoodsSettingService::class,'method'=>'globalGoodsModel'],
  264. ['invoker_id'=>\common\enums\GlobalFuncEnum::GOODS_MODEL_LEVEL,'class'=> \addons\WechatVideoShop\common\service\LevelService::class,'method'=>'globalGoodsModelLevel'],
  265. ['invoker_id'=>\common\enums\GlobalFuncEnum::PROMOTION,'class'=> \addons\WechatVideoShop\common\service\PromotionService::class, 'method'=>'getIncomeInfo'],
  266. ['invoker_id'=>\common\enums\GlobalFuncEnum::GET_INSTALL_ADDONS_LIST, 'class'=>\addons\WechatVideoShop\common\service\PromotionService::class,'method'=>'getAddons']
  267. ],
  268. ];