master
cody 2 years ago
parent 35baff73b5
commit 6956335931

@ -391,13 +391,13 @@ class ProjectController extends CommonController
$all = \request()->all();
$project_id = \request('project_id');
$userId = auth()->user()->id;
// $userId = auth()->user()->id;
// 一个月只能提交一次
$has = AskSubmit::where('admin_id', $userId)
->where('project_id', $all['project_id'])
->where('date', 'like', '%' . date('Y-m') . '%')
->first();
if ($has) return $this->error("每个月只能提交一次");
// $has = AskSubmit::where('admin_id', $userId)
// ->where('project_id', $all['project_id'])
// ->where('date', 'like', '%' . date('Y-m') . '%')
// ->first();
// if ($has) return $this->error("每个月只能提交一次");
$content = [];
$socre = 0;
$askList = AskSubmit::$askList;
@ -411,7 +411,7 @@ class ProjectController extends CommonController
];
$socre += $item;
}
$all['admin_id'] = $userId;
// $all['admin_id'] = $userId;
$all['score'] = $socre;
$all['content'] = $content;
$model = AskSubmit::create($all);

Loading…
Cancel
Save