没有引入use think\exception\ValidateException;//加入后错误消失,正常了
在这里报错:
try {
validate(ComplaintValidate::class)->scene($scene)->check($post);
} catch (ValidateException $e) {
$this->error($e->getError());
}
查页面js,在error:function(data),data.statusText报错Internal Server Error:
$.ajax({
type: "post",
url:url,
data:data,
dataType:"json",
success:function(data){
if( data.code == 1 ) {
layer.msg(data.msg);
setTimeout(function () {
if( type=='open' ) {
if( data.url != '' ) {
parent.location.