审核加上传oss
/**
* 图片审核
*/
public function imageAudit()
{
$file = request()->file('img');
$name=$file->getPathname();
//apikey 这里使用百度云的接口
$apikey="";
//SecretKey
$SecretKey="";
//获取url
$url= "https://aip.baidubce.com/oauth/2.0/token?grant_type=client_credentials&client_id={$apikey}&client_secret={$SecretKey}";
//获取到token;
$info= curlGet($url);
$token=$info['access_token'];
$url = 'https://aip.baidubce.com/rest/2.0/solution/v1/img_censor/v2/user_defined?access_token=' . $token;
$img = file_get_contents($name);
$img = base64_encode($img);
$bodys = array(
'image' => $img
);
$res = json_decode($this->curlPost($url, $bodys),true);
//根据自己的业务逻辑进行处理
if