options()); $this->request = $miniapp->getClient(); $this->utils = $miniapp->getUtils(); } protected function options() { return ['app_id'=>sConf('wechat.mini_appid'),'secret'=>sConf('wechat.mini_secret'),'token'=>'','aes_key'=>'']; } /** * 列表 * @param array $param */ public function getUserInfo(string $code) { try { return $this->utils->codeToSession($code); } catch (\Throwable $throwable) { return error($throwable->getMessage()); } } }