cody 2 years ago
parent 3e21c5b77f
commit 729efccd61

@ -25,7 +25,7 @@ class HomeController extends CommonController
public function index()
{
$project_id = request()->project_id;
$projects = (new StatisticsController())->_checkProjects();
$projects = Project::get();
if (empty($project_id)) {
$project_id = Project::first()->id;
}
@ -110,11 +110,11 @@ class HomeController extends CommonController
$roleId = Role::where('name', 'like', '%首页统计%')->where('guard_name', 'admin')->value('id');
$tongji = DB::table('model_has_roles')->where('role_id', $roleId)
->where('model_type', 'App\Admin')->where('model_id', $userId)->count();
if (is_mobile() || empty($tongji)) {
return view($this->bladePath . ".mobile_home");
} else {
return view($this->bladePath . ".home", compact('counts', 'lies', 'saleList', 'orderList'));
return view($this->bladePath . ".home", compact('projects','counts', 'lies', 'saleList', 'orderList'));
}
}

Loading…
Cancel
Save