liyinglin 2 years ago
parent e5349386b7
commit 0dcd468cd8

@ -310,7 +310,7 @@ class ProjectController extends CommonController
->where(function ($qeury) use ($hushizhang, $userId) {
if ($hushizhang) $qeury->where('admin_id', $userId);
})->where('project_id', $project_id)->paginate(10);
return view($this->bladePath . ".asksubmit_index", compact("data","project_id"));
return view($this->bladePath . ".asksubmit_index", compact("data", "project_id"));
}
@ -330,13 +330,16 @@ class ProjectController extends CommonController
{
$all = \request()->all();
$content = [];
$socre = 0;
foreach ($all['ask'] as $key => $item) {
$content[] = [
'ask' => AskSubmit::$askList[$key],
'socre' => $item
];
$socre += $item;
}
$all['admin_id'] = auth()->id;
$all['score'] = $socre;
$model = AskSubmit::create($all);
$url = $request->_previous ? $request->_previous : url($this->urlPrefix);
return $this->success("新增成功", $url, $model);

Loading…
Cancel
Save