|
@@ -47,15 +47,15 @@ class HelpController extends HttpBaseController
|
|
}
|
|
}
|
|
|
|
|
|
// 获取所有的资讯分类
|
|
// 获取所有的资讯分类
|
|
- $category = DB::table('web_news_category')->get();
|
|
|
|
|
|
+ $category = DB::table('news_category')->get();
|
|
|
|
|
|
- $categoryInfo = DB::table('web_news_category')->select('id')->where('mid', $cid)->first();
|
|
|
|
|
|
+ $categoryInfo = DB::table('news_category')->select('id')->where('mid', $cid)->first();
|
|
if (empty($categoryInfo)) {
|
|
if (empty($categoryInfo)) {
|
|
abort(404);
|
|
abort(404);
|
|
}
|
|
}
|
|
|
|
|
|
// 获取资讯列表
|
|
// 获取资讯列表
|
|
- $find = DB::table('web_news')
|
|
|
|
|
|
+ $find = DB::table('news')
|
|
->where('category_id', $categoryInfo->id)
|
|
->where('category_id', $categoryInfo->id)
|
|
->offset($size * ($page - 1))
|
|
->offset($size * ($page - 1))
|
|
->limit($size);
|
|
->limit($size);
|
|
@@ -71,21 +71,21 @@ class HelpController extends HttpBaseController
|
|
}
|
|
}
|
|
|
|
|
|
// 获取所有的资讯分类
|
|
// 获取所有的资讯分类
|
|
- $category = DB::table('web_news_category')->get();
|
|
|
|
|
|
+ $category = DB::table('news_category')->get();
|
|
|
|
|
|
- $info = DB::table('web_news')->where('mid', $mid)->first();
|
|
|
|
|
|
+ $info = DB::table('news')->where('mid', $mid)->first();
|
|
return view('home/http/newsdetail', ['info' => $info, 'category' => $category]);
|
|
return view('home/http/newsdetail', ['info' => $info, 'category' => $category]);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
private function getNewsCategory()
|
|
private function getNewsCategory()
|
|
{
|
|
{
|
|
- return DB::table('web_news_category')->select(['id', 'mid', 'name', 'logo'])->get();
|
|
|
|
|
|
+ return DB::table('news_category')->select(['id', 'mid', 'name', 'logo'])->get();
|
|
}
|
|
}
|
|
|
|
|
|
private function getNewsList($categoryId)
|
|
private function getNewsList($categoryId)
|
|
{
|
|
{
|
|
- return DB::table('web_news')->where('category_id', $categoryId)->offset(0)->limit(6)->get();
|
|
|
|
|
|
+ return DB::table('news')->where('category_id', $categoryId)->offset(0)->limit(6)->get();
|
|
}
|
|
}
|
|
|
|
|
|
private function getNews()
|
|
private function getNews()
|