hdeyin

hdeyin

这家伙有点懒,还没写个性签名!

  • 财富值10
  • 威望值0
  • 总积分10

个人信息

  • 回复了 的回复

    在controller的Action中写的绑定事件,之后事件不会执行,

    请问题主的controller继承的是哪个呢?我继承的是yii\web\Controller。
    /**

     * @param string $id the ID of this controller.
     * @param Module $module the module that this controller belongs to.
     * @param array $config name-value pairs that will be used to initialize the object properties.
     */
    public function __construct($id, $module, $config = [])
    {
        $this->id = $id;
        $this->module = $module;
        parent::__construct($config);
    }
    

    根据我自己实测的经验,使用$this->on绑定并不会触发绑定事件,使用yii::$app->user->on的绑定可以正常触发登录事件

  • 根据我自己实测的经验,使用$this->on绑定并不会触发绑定事件,使用yii::$app->user->on的绑定可以正常触发登录事件

实习生 等级规则
10/20
资料完整度
10/100
用户活跃度
0/100

Ta的关注

0

Ta的粉丝

0

Ta的访客

1