hasOne(UserWechat::class); } /** * Notes: 是否关注公众号 * * @Author: 玄尘 * @Date: 2022/8/3 16:23 */ public function isOfficialSubscribe(): bool { return $this->wechat ? $this->wechat->isOfficialSubscribe() : false; } /** * Notes: 获取openids * * @Author: 玄尘 * @Date: 2022/9/27 14:51 * @return string[] */ public function getOpenids() { if ($this->wechat) { $data = $this->wechat->getOpenids(); } else { $data = [ 'mini' => '', 'official' => '', ]; } return $data; } }