收藏
回答

文本内容安全识别结果,怎么提交什么都是pass哦?

{"errcode":0,"errmsg":"ok","detail":[{"strategy":"keyword","errcode":0},{"strategy":"content_model","errcode":0,"suggest":"pass","label":100,"prob":90}],"trace_id":"654201ca-31bc35db-0a5795b3","result":{"suggest":"pass","label":100}}

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

3 个回答

  • 刘林
    刘林
    2023-11-01

    $url = 'https://api.weixin.qq.com/wxa/msg_sec_check?access_token='.$this->getToken();

         

            $json_data = ['version'=>2,

                          'openid'=>$openid,

                          'scene'=>3,

                          'content'=>$content];

               

            $http = new Client();

            $response  = $http->request("POST",$url,[

                                                    'json'=>$json_data

                                                ]);


            if($response->getStatusCode() == 200){

                $body = $response->getBody();

                $body = $body->getContents();

               

                $body = json_decode($body,true);

               

                if($body['result']['suggest'] == 'pass'){

                    return true;

                }else{

                    return false;

                }

            }else{

                return false;

            }


    2023-11-01
    有用
    回复
  • Jianbo
    Jianbo
    2023-11-01

    服务端代码发出来看看

    2023-11-01
    有用
    回复
  • 一笑皆春
    一笑皆春
    2023-11-01

    不是吧

    2023-11-01
    有用
    回复
登录 后发表内容