ProductSubscribe.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <?php
  2. namespace crmeb\subscribes;
  3. /**
  4. * 产品事件
  5. * Class ProductSubscribe
  6. * @package crmeb\subscribes
  7. */
  8. class ProductSubscribe
  9. {
  10. public function handle()
  11. {
  12. }
  13. /**
  14. * 加入购物车成功之后 StoreProductSetCartAfter
  15. * @param $event
  16. */
  17. public function onStoreProductSetCartAfter($event)
  18. {
  19. list($cartInfo, $userInfo) = $event;
  20. //$cartInfo 购物车信息
  21. //$userInfo 用户信息
  22. }
  23. /**
  24. * 用户操作产品点击事件 用户点赞产品 用户收藏产品 StoreProductUserOperationConfirmAfter
  25. * @param $event
  26. */
  27. public function onStoreProductUserOperationConfirmAfter($event)
  28. {
  29. list($category, $productId, $relationType, $uid) = $event;
  30. //$category 产品类型
  31. //$productId 产品编号
  32. //$relationType 操作类型 like 点赞 collect 收藏
  33. //$uid 用户编号
  34. }
  35. /**
  36. * 用户操作产品取消事件 用户取消点赞产品 用户取消收藏产品 StoreProductUserOperationCancelAfter
  37. * @param $event
  38. */
  39. public function onStoreProductUserOperationCancelAfter($event)
  40. {
  41. list($category, $productId, $relationType, $uid) = $event;
  42. //$category 产品类型
  43. //$productId 产品编号
  44. //$relationType 操作类型 like 点赞 collect 收藏
  45. //$uid 用户编号
  46. }
  47. /**
  48. * 添加产品 StoreProductCreated
  49. */
  50. public function onStoreProductCreated($event)
  51. {
  52. }
  53. /**
  54. * 编辑商品 StoreEditProduct
  55. */
  56. public function onStoreEditProduct($event)
  57. {
  58. }
  59. /**
  60. * 删除产品 StoreProductDeleted
  61. */
  62. public function onStoreProductDeleted($event)
  63. {
  64. }
  65. /**
  66. * 上下架产品 StoreProductOnOffShelf
  67. */
  68. public function onStoreProductOnOffShelf($event)
  69. {
  70. }
  71. /**
  72. * 增加分类 StoreCategoryCreated
  73. */
  74. public function onStoreCategoryCreated($event)
  75. {
  76. }
  77. /**
  78. * 删除分类 StoreCategoryDeleted
  79. */
  80. public function onStoreCategoryDeleted($event)
  81. {
  82. }
  83. /**
  84. * 编辑分类 StoreCategoryEdited
  85. */
  86. public function onStoreCategoryEdited($event)
  87. {
  88. }
  89. }