PHP 系统中应该将 json_encode($body),修改为 json_encode($body, JSON_UNESCAPED_UNICODE),我也遇到了这个问题找到了这篇文章有讲 https://kanchuan.com/blog/225
【已解决】文本内容安全识别 是不是不准确啊?接口地址:https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/sec-center/sec-check/msgSecCheck.html [图片] public function checkTextResult($token,$text,$openid) { $client = new Client(); $headers = []; $body = [ 'openid' => $openid, 'scene' => '2', 'content' =>mb_convert_encoding($text,"UTF-8"), 'version' => '2' ]; $request = new Request('POST', 'https://api.weixin.qq.com/wxa/msg_sec_check?access_token=' . $token, $headers, json_encode($body) ); $res = $client->sendAsync($request)->wait(); $result = $res->getBody()->getContents(); $result = json_decode($result,1); if ($result['errmsg'] == 'ok' && $result['result']['suggest'] == 'pass') { return $result; } else { throw new Exception("您的内容含有敏感信息,请修改"); } } 以上是我发布的评论内容,检测结果这也能过吗?
12-09