mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-08-04 05:22:59 +08:00
优化分类等必选判断
This commit is contained in:
parent
ebc609ac19
commit
56e04fc3a3
@ -200,7 +200,7 @@ class Article extends Service
|
||||
$data['published'] = $validator->checkPublishStatus($post['published']);
|
||||
}
|
||||
|
||||
if (isset($post['category_id'])) {
|
||||
if (isset($post['category_id']) && !empty($post['category_id'])) {
|
||||
$category = $validator->checkCategory($post['category_id']);
|
||||
$data['category_id'] = $category->id;
|
||||
}
|
||||
|
@ -165,12 +165,12 @@ class Course extends Service
|
||||
$data['published'] = $validator->checkPublishStatus($post['published']);
|
||||
}
|
||||
|
||||
if (isset($post['category_id'])) {
|
||||
if (isset($post['category_id']) && !empty($post['category_id'])) {
|
||||
$category = $validator->checkCategory($post['category_id']);
|
||||
$data['category_id'] = $category->id;
|
||||
}
|
||||
|
||||
if (isset($post['teacher_id'])) {
|
||||
if (isset($post['teacher_id']) && !empty($post['teacher_id'])) {
|
||||
$teacher = $validator->checkTeacher($post['teacher_id']);
|
||||
$data['teacher_id'] = $teacher->id;
|
||||
}
|
||||
|
@ -186,7 +186,7 @@ class Question extends Service
|
||||
$data['published'] = $validator->checkPublishStatus($post['published']);
|
||||
}
|
||||
|
||||
if (isset($post['category_id'])) {
|
||||
if (isset($post['category_id']) && !empty($post['category_id'])) {
|
||||
$category = $validator->checkCategory($post['category_id']);
|
||||
$data['category_id'] = $category->id;
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ class Controller extends \Phalcon\Mvc\Controller
|
||||
$this->view->setVar('websocket_info', $this->websocketInfo);
|
||||
}
|
||||
|
||||
protected function getAuthUser($cache = false)
|
||||
protected function getAuthUser($cache = true)
|
||||
{
|
||||
/**
|
||||
* @var HomeAuth $auth
|
||||
|
@ -85,9 +85,7 @@ layui.use(['jquery', 'layer', 'helper'], function () {
|
||||
});
|
||||
|
||||
$('.icon-reply').on('click', function () {
|
||||
$('html').animate({
|
||||
scrollTop: $('#comment-anchor').offset().top
|
||||
}, 500);
|
||||
$('html').scrollTop($('#comment-anchor').offset().top);
|
||||
});
|
||||
|
||||
});
|
@ -35,9 +35,7 @@ layui.use(['jquery', 'helper'], function () {
|
||||
});
|
||||
|
||||
$('.icon-reply').on('click', function () {
|
||||
$('html').animate({
|
||||
scrollTop: $('#comment-anchor').offset().top
|
||||
}, 500);
|
||||
$('html').scrollTop($('#comment-anchor').offset().top);
|
||||
});
|
||||
|
||||
});
|
@ -85,9 +85,7 @@ layui.use(['jquery', 'helper'], function () {
|
||||
});
|
||||
|
||||
$('.icon-reply').on('click', function () {
|
||||
$('html').animate({
|
||||
scrollTop: $('#answer-anchor').offset().top
|
||||
}, 500);
|
||||
$('html').scrollTop($('#answer-anchor').offset().top);
|
||||
});
|
||||
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user