app->event->trigger('WechatFansUpdate', $user); foreach ($user as $k => $v) if ($v === '') unset($user[$k]); return !!data_save(WechatFans::class, $user, 'openid'); } /** * 获取粉丝信息 * @param string $openid * @return array */ public function get(string $openid): array { return WechatFans::mk()->where(['openid' => $openid])->findOrEmpty()->toArray(); } }