commit | author | age
|
2207d6
|
1 |
<?php |
W |
2 |
/** |
|
3 |
* Created by IntelliJ IDEA. |
|
4 |
* User: luwei |
|
5 |
* Date: 2019/3/26 |
|
6 |
* Time: 17:40 |
|
7 |
*/ |
|
8 |
|
|
9 |
namespace app\handlers; |
|
10 |
|
|
11 |
use app\forms\common\CommonBuyPrompt; |
|
12 |
|
|
13 |
class AppBuyMessageHandler extends HandlerBase |
|
14 |
{ |
|
15 |
|
|
16 |
/** |
|
17 |
* 事件处理注册 |
|
18 |
*/ |
|
19 |
public function register() |
|
20 |
{ |
|
21 |
\Yii::$app->on(\Yii::$app->appMessage::EVENT_APP_MESSAGE_REQUEST, function ($event) { |
|
22 |
\Yii::$app->appMessage->push('buy_data', (new CommonBuyPrompt())->get()); |
|
23 |
}); |
|
24 |
} |
|
25 |
} |