productInfo = $this->getProductInfo('XwByxRJnoPx3'); View::share('productInfo', $this->productInfo); // 获取当前的Windows下载版本 product_version $this->windowsVersionInfo = $this->getProductVersion($this->productInfo->id); View::share('windowsVersionInfo', $this->windowsVersionInfo); } /** * 首页 */ public function index() { $title = '星优宝图片处理器-星优宝图片处理器官方正版下载'; $description = '星优宝图片处理器是星优办公软件有限公司开发并发布一款图片处理软件,包含图片格式转换、图片压缩、更改尺寸、美化图片、水印添加、圆角处理、批量命名、批量旋转和图片拼接等九大功能,快速完成图片处理,欢迎大家安装使用。'; $keywords = '星优宝图片处理器,星优宝图片处理器下载,星优宝图片处理器软件'; return view('jimp/index', ['title' => $title, 'description' => $description, 'keywords' => $keywords]); } public function help($cid = '') { $size = 15; $page = Request::input('page', 1); // 获取资讯分类列表 $category = DB::table('news_category')->where('product_id', $this->productInfo->id)->orderBy('id', 'asc')->get(); if (empty($cid) && $category) { $cid = $category[0]->mid; } // 获取资讯列表 $find = DB::table('news')->where('product_id', $this->productInfo->id) ->offset($size * ($page - 1)) ->orderBy('id', 'desc') ->limit($size); if ($cid) { $info = DB::table('news_category')->select('id')->where('mid', $cid)->first(); if ($info) { $find->where('category_id', $info->id); } } $list = $find->get(); $title = '帮助中心-星优宝图片处理器'; return view('jimp/help', ['cid' => $cid, 'category' => $category, 'list' => $list, 'title' => $title]); } /** * 资讯详情 */ public function newsDetail($mid) { // 获取资讯列表 $info = DB::table('news')->where('mid', $mid)->where('is_delete', 0)->first(); // 热门点击 $hotList = DB::table('news')->where('product_id', $this->productInfo->id)->where('category_id', $info->category_id) ->offset(mt_rand(7, 10)) ->orderBy('id', 'desc') ->limit(6) ->get(); // 最近更新 $recentList = DB::table('news')->where('product_id', $this->productInfo->id)->where('category_id', $info->category_id) ->orderBy('id', 'desc') ->limit(6) ->get(); return view('jimp/news_detail', ['info' => $info, 'hotList' => $hotList, 'recentList' => $recentList, 'title' => $info->title, 'description' => $info->introduction, 'keywords' => $info->title]); } public function about() { $title = '关于我们-星优宝图片处理器'; return view('jimp/about', ['title' => $title]); } public function feedback() { return view('jimp/feedback'); } }