mirror of
https://gitee.com/ulthon/ulthon_information.git
synced 2026-03-03 16:24:28 +08:00
优化性能和轮播图;
This commit is contained in:
@@ -18,22 +18,22 @@ class Common extends BaseController
|
||||
parent::initialize();
|
||||
|
||||
|
||||
$list_nav_slide = Nav::where('type', 3)->cache('type_list_3')->order('sort asc')->where('status', 1)->select();
|
||||
$list_nav_slide = Nav::where('type', 3)->cacheAlways('type_list_3')->order('sort asc')->where('status', 1)->select();
|
||||
|
||||
View::assign('list_nav_slide', $list_nav_slide);
|
||||
|
||||
$list_nav_friend_url = Nav::where('type', 2)->cache('type_list_2')->order('sort asc')->where('status', 1)->select();
|
||||
$list_nav_friend_url = Nav::where('type', 2)->cacheAlways('type_list_2')->order('sort asc')->where('status', 1)->select();
|
||||
View::assign('list_nav_friend_url', $list_nav_friend_url);
|
||||
|
||||
$list_header_nav = Nav::where('type', 11)->cache('type_list_11')->order('sort asc')->where('status', 1)->select();
|
||||
$list_header_nav = Nav::where('type', 11)->cacheAlways('type_list_11')->order('sort asc')->where('status', 1)->select();
|
||||
View::assign('list_header_nav', $list_header_nav);
|
||||
|
||||
$list_category_first_level = Category::where('level', 1)->where('status', 1)->where('type', 3)->cache('category_type_list_3')->order('sort asc')->select();
|
||||
$list_category_first_level = Category::where('level', 1)->where('status', 1)->where('type', 3)->cacheAlways('category_type_list_3')->order('sort asc')->select();
|
||||
View::assign('list_category_first_level', $list_category_first_level);
|
||||
$list_nav_more = Nav::where('type', 8)->cache('type_list_8')->order('sort asc')->where('status', 1)->select();
|
||||
$list_nav_more = Nav::where('type', 8)->cacheAlways('type_list_8')->order('sort asc')->where('status', 1)->select();
|
||||
View::assign('list_nav_more', $list_nav_more);
|
||||
|
||||
$top_posts = Post::where('is_top', 1)->limit(8)->where('type', 3)->cache('top_post')->select();
|
||||
$top_posts = Post::where('is_top', 1)->limit(8)->where('type', 3)->cacheAlways('top_post')->select();
|
||||
View::assign('top_posts', $top_posts);
|
||||
|
||||
$this->userHubLogin();
|
||||
|
||||
Reference in New Issue
Block a user