feat: mobile文章详情页
This commit is contained in:
@@ -129,12 +129,14 @@ class Article extends Common
|
||||
|
||||
// 验证字段
|
||||
$validate = Validate::rule([
|
||||
'name' => 'max:64',
|
||||
'email' => 'email'
|
||||
'name' => 'require|max:64',
|
||||
'email' => 'require|email'
|
||||
])
|
||||
->message([
|
||||
'name.max' => '姓名不能超过64个字符',
|
||||
'email' => '请输入正确的邮箱'
|
||||
'name.require' => '姓名不能为空',
|
||||
'name.max' => '姓名不能超过:rule个字符',
|
||||
'email.require' => '邮箱不能为空',
|
||||
'email.email' => '邮箱格式不正确'
|
||||
]);
|
||||
if (!$validate->check($post)) {
|
||||
return error($validate->getError());
|
||||
@@ -148,9 +150,9 @@ class Article extends Common
|
||||
]);
|
||||
$ret = ArticleLeaveMessageModel::create($data);
|
||||
if ($ret->isEmpty()) {
|
||||
return error('留言提交失败');
|
||||
return error(lang('留言提交失败'));
|
||||
}
|
||||
|
||||
return success('留言提交成功');
|
||||
return success(lang('留言提交成功'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user