common.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. use common\enums\EventNameEnum;
  3. return [
  4. // ----------------------- APP链接 ----------------------- //
  5. 'links' => [
  6. [
  7. 'title' => '电子券管理',
  8. 'route' => '/plugins2/ElectronCoupon/index',
  9. 'icon' => '',
  10. 'params' => []
  11. ],
  12. [
  13. 'title' => '领券中心',
  14. 'route' => '/plugins2/ElectronCoupon/center',
  15. 'icon' => '',
  16. 'params' => []
  17. ],
  18. ],
  19. // ----------------------- 事件处理 ----------------------- //
  20. 'events' => [
  21. [
  22. 'event_name' => 'order_pay',
  23. 'listeners' => [
  24. 'addons\ElectronCoupon\common\listeners\OrderPaidListener',
  25. ]
  26. ],
  27. [
  28. 'event_name' => 'order_finish',//订单完成
  29. 'listeners' => [
  30. 'addons\ElectronCoupon\common\listeners\OrderFinishListener',
  31. ]
  32. ],
  33. [
  34. 'event_name' => EventNameEnum::GET_ADDONS_CONFIG,
  35. 'listeners' => [
  36. \addons\ElectronCoupon\common\listeners\GetAdsCfgListener::class,
  37. ]
  38. ],
  39. ],
  40. // ----------------------- 公共调用 ----------------------- //
  41. 'invoker'=>[
  42. ['invoker_id'=>\common\enums\GlobalFuncEnum::ORDER_DETAIL,'class'=>'addons\ElectronCoupon\common\models\ElectronCoupon','method'=>'isInstall'],
  43. ['invoker_id'=>\common\enums\GlobalFuncEnum::GOODS_DETAIL_EDIT,'class'=>'addons\ElectronCoupon\common\models\ElectronCoupon','method'=>'getGoodSetting'],
  44. ['invoker_id' => \common\enums\GlobalFuncEnum::INVOKE_CLERK, 'class' => 'addons\ElectronCoupon\common\global_func\Clerk', 'method' => 'clerk'],
  45. ],
  46. ];