$componentInfo->app_id, // 开放平台账号的 appid 'secret' => $componentInfo->secret, // 开放平台账号的 secret 'token' => $componentInfo->token, // 开放平台账号的 token 'aes_key' => $componentInfo->aes_key, // 明文模式请勿填写 EncodingAESKey ]; $app = Factory::openPlatform(array_merge($config, config('easywechat'))); $app->rebind('cache',Cache::store('redis')); return $app; } /** * @param $app Application * @param $appid * @param $refreshToken * @return \EasyWeChat\OfficialAccount\Application */ public static function officialAccount($app, $appid, $refreshToken) { return $app->officialAccount($appid, $refreshToken); } }