因为还未触发到系统主动获取,因此需要手动来调用接口函数来获取。
public function respond() {
global $_W, $_GPC;
$account_api = WeAccount::create();
$info = $account_api->fansQueryInfo($this->message['from']);
$nickname = $info["nickname"];
return $this->respText('欢迎你 : ' . $nickname);
}