conf = ConfServiceFacade::groupGet('system.ai'); $this->client = new \AipImageCensor($this->conf['app_id'],$this->conf['api_key'],$this->conf['secret_key']); } /** * 人脸检测 * @param $image //图片链接 */ public function imageCensorUserDefined($image) { return $this->client->imageCensorUserDefined($image); } /** * 营业执照识别接口 * @param $image //图片链接 */ public function textCensorUserDefined($image) { if(empty($this->conf['app_id'])){ return true; } return $this->client->textCensorUserDefined($image); } }