This commit is contained in:
wangjinlei
2022-12-07 10:37:51 +08:00
parent 1271058def
commit c7cdf8a31f
668 changed files with 116142 additions and 20 deletions

View File

@@ -701,6 +701,19 @@ class Reviewer extends Controller
return jsonError("Non repeatable review");
}
//验证字数
$content = $data['qu9contents']." ".$data['qu10contents']." ".$data['qu11contents']." ".$data['qu12contents']." ".$data['qu13contents']." ".$data['qu14contents']." ".$data['qu15contents']." ".$data['comment'];
if(preg_match('/[\x{4e00}-\x{9fa5}]/u', $content)>0){//含有中文
if(mb_strlen($content, 'UTF8')<60){
return jsonError("We encourage you to enrich your comment further to help improve the peer paper (at least 60 words).");
}
}else{//不含中文
$carray = explode(" ", $content);
if(count($carray)<60){
return jsonError("We encourage you to enrich your comment further to help improve the peer paper (at least 60 words).");
}
}
//组合insert数据,存储
$insert_data['art_rev_id'] = $data['art_rev_id'];
$insert_data['qu1'] = $data['qu1'];