Skip to content

Commit

Permalink
index/login页面设置模板view_path
Browse files Browse the repository at this point in the history
  • Loading branch information
ichynul committed Dec 4, 2023
1 parent 83c2560 commit 3fe48fe
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/admin/controller/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,12 @@ public function index()
}
}

return $this->fetch($template);
$config = [];
if (preg_match('/(.+?[\/\\\]view[\/\\\]).+?/', $template, $mch)) {
$config['view_path'] = $mch[1];
}

return $this->fetch($template, [], $config);
}

public function denied()
Expand Down Expand Up @@ -584,7 +589,12 @@ public function login()
}
}
}
return $this->fetch($template);
$config = [];
if (preg_match('/(.+?[\/\\\]view[\/\\\]).+?/', $template, $mch)) {
$config['view_path'] = $mch[1];
}

return $this->fetch($template, [], $config);
}
}

Expand Down

0 comments on commit 3fe48fe

Please sign in to comment.