|
|
|
@ -235,7 +235,7 @@ class VisitController extends CommonController
|
|
|
|
public function askLog()
|
|
|
|
public function askLog()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$type = request('type');
|
|
|
|
$type = request('type');
|
|
|
|
$log = StudyLog::where('type', $type)->orderBy('id', 'desc')->first();
|
|
|
|
$log = StudyLog::where('type', $type)->where('user_id', $this->getUserId())->orderBy('id', 'desc')->first();
|
|
|
|
if (empty($log)) {
|
|
|
|
if (empty($log)) {
|
|
|
|
return $this->fail([ResponseCode::ERROR_BUSINESS, '未学习']);
|
|
|
|
return $this->fail([ResponseCode::ERROR_BUSINESS, '未学习']);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|