收藏
回答

音视频图片审核低俗图片也能审核通过?

public function checkImageResult($userId,$imgUrl,$type = 1)
{
    $token = $this->getAccessToken($userId);
    $client = new Client();
    $headers = [];
    //  media_type=1:音频;2:图片
    //  scene=场景枚举值(1 资料;2 评论;3 论坛;4 社交日志)
    $body = [
        'openid' => $this->getOpenId($userId),
        'media_url'=>$imgUrl,
        'media_type'=>2,
        'scene' => $type,
        'version' => 2
    ];
    $request = new Request('POST', 'https://api.weixin.qq.com/wxa/media_check_async?access_token=' . $token,
        $headers, json_encode($body,JSON_UNESCAPED_UNICODE)
    );
    $res = $client->sendAsync($request)->wait();
    $result = $res->getBody()->getContents();
    $result = json_decode($result,1);
    if ($result['errmsg'] == 'ok' && $result['errcode'] == 0) {
        return $result;
    } else {
        throw new Exception("您上传的头像含有敏感信息,无法发布");
    }
}

图片地址:域名 + /uploads/20240926/79f5817fbcb5112c0dd3b5c14112bda4.jpg
接口返回结果:array(3) {
  ["errcode"] => int(0)
  ["errmsg"] => string(2) "ok"
  ["trace_id"] => string(26) "66f522fe-268e228d-3c5deb78"
}

这种也能审核成功正常吗?


回答关注问题邀请回答
收藏

1 个回答

登录 后发表内容