/** * 取得远程素材的数量. * * @param AccountModel $account 公众号 * @param string $type 素材类型 * * @return int */ private function getRemoteMaterialCount($account, $type) { $mediaService = new MediaService($account->app_id, $account->app_secret); return $mediaService->stats($type); }