user = $this->getUser(); // 分销商用户信息 $this->dealer = DealerUserModel::detail($this->user['user_id']); // 分销商设置 $this->setting = Setting::getAll(); } /** * 获取推广二维码 * @return array * @throws \app\common\exception\BaseException * @throws \think\exception\DbException * @throws \Exception */ public function poster() { $Qrcode = new Poster($this->dealer); return $this->renderSuccess([ // 二维码图片地址 'qrcode' => $Qrcode->getImage(), // 页面文字 'words' => $this->setting['words']['values'], ]); } }