Commit 1ac2f377 authored by 章建武's avatar 章建武

dep

parent 7691b8fb
...@@ -32,24 +32,24 @@ class HelperController ...@@ -32,24 +32,24 @@ class HelperController
$zh = $zh_url; $zh = $zh_url;
$en = $en_url; $en = $en_url;
$navigation = IndexNavigation::query() $navigation = IndexNavigation::query()
->where('is_link',0) ->where('is_link',0)
->where('parent_id',0) ->where('parent_id',0)
->where('is_show',0) ->where('is_show',0)
->where('language_type',$language_type) ->where('language_type',$language_type)
->orderBy('id', 'asc') ->orderBy('id', 'asc')
->get() ->get()
->toArray(); ->toArray();
foreach ($navigation as $k => &$v){ foreach ($navigation as $k => &$v){
$children = IndexNavigation::query() $children = IndexNavigation::query()
->where('is_link',0) ->where('is_link',0)
->where('is_show',0) ->where('is_show',0)
->where('parent_id',$v['id']) ->where('parent_id',$v['id'])
->get() ->get()
->toArray(); ->toArray();
$v['children'] = $children; $v['children'] = $children;
} }
$setting = IndexSetting::query()->first(); $setting = IndexSetting::query()->first();
return $view return $view
->with('IndexNav',$navigation) ->with('IndexNav',$navigation)
......
...@@ -69,21 +69,177 @@ class AboutController extends Controller ...@@ -69,21 +69,177 @@ class AboutController extends Controller
public function groupStrategy() public function groupStrategy()
{ {
return view('index.about.group_strategy'); $url = url()->full();
$pathinfo = parse_url($url);
$path = $pathinfo['path'];
$en = substr($path,1,2);
if($en == 'en'){
$language_type = 1;
$en_url = $_SERVER['REQUEST_URI'];
$zh_url = substr($_SERVER['REQUEST_URI'],3);
}else{
$language_type = 0;
$en_url = '/en'.$_SERVER['REQUEST_URI'];
$zh_url = $_SERVER['REQUEST_URI'];
}
$zh = $zh_url;
$en = $en_url;
$navigation = IndexNavigation::query()
->where('is_link',0)
->where('parent_id',0)
->where('is_show',0)
->where('language_type',$language_type)
->orderBy('id', 'asc')
->get()
->toArray();
foreach ($navigation as $k => &$v){
$children = IndexNavigation::query()
->where('is_link',0)
->where('is_show',0)
->where('parent_id',$v['id'])
->get()
->toArray();
$v['children'] = $children;
}
return view('Index.about.group_strategy')
->with('IndexNav',$navigation)
->with('language_type',$language_type)
->with('zh',$zh)
->with('en',$en);
} }
public function coreStrengths() public function coreStrengths()
{ {
return view('index.about.core_strengths'); $url = url()->full();
$pathinfo = parse_url($url);
$path = $pathinfo['path'];
$en = substr($path,1,2);
if($en == 'en'){
$language_type = 1;
$en_url = $_SERVER['REQUEST_URI'];
$zh_url = substr($_SERVER['REQUEST_URI'],3);
}else{
$language_type = 0;
$en_url = '/en'.$_SERVER['REQUEST_URI'];
$zh_url = $_SERVER['REQUEST_URI'];
}
$zh = $zh_url;
$en = $en_url;
$navigation = IndexNavigation::query()
->where('is_link',0)
->where('parent_id',0)
->where('is_show',0)
->where('language_type',$language_type)
->orderBy('id', 'asc')
->get()
->toArray();
foreach ($navigation as $k => &$v){
$children = IndexNavigation::query()
->where('is_link',0)
->where('is_show',0)
->where('parent_id',$v['id'])
->get()
->toArray();
$v['children'] = $children;
}
return view('Index.about.core_strengths')
->with('IndexNav',$navigation)
->with('language_type',$language_type)
->with('zh',$zh)
->with('en',$en);
} }
public function devHistory() public function devHistory()
{ {
return view('index.about.dev_history'); $url = url()->full();
$pathinfo = parse_url($url);
$path = $pathinfo['path'];
$en = substr($path,1,2);
if($en == 'en'){
$language_type = 1;
$en_url = $_SERVER['REQUEST_URI'];
$zh_url = substr($_SERVER['REQUEST_URI'],3);
}else{
$language_type = 0;
$en_url = '/en'.$_SERVER['REQUEST_URI'];
$zh_url = $_SERVER['REQUEST_URI'];
}
$zh = $zh_url;
$en = $en_url;
$navigation = IndexNavigation::query()
->where('is_link',0)
->where('parent_id',0)
->where('is_show',0)
->where('language_type',$language_type)
->orderBy('id', 'asc')
->get()
->toArray();
foreach ($navigation as $k => &$v){
$children = IndexNavigation::query()
->where('is_link',0)
->where('is_show',0)
->where('parent_id',$v['id'])
->get()
->toArray();
$v['children'] = $children;
}
return view('Index.about.dev_history')
->with('IndexNav',$navigation)
->with('language_type',$language_type)
->with('zh',$zh)
->with('en',$en);
} }
public function achievement() public function achievement()
{ {
return view('index.about.achievement'); $url = url()->full();
$pathinfo = parse_url($url);
$path = $pathinfo['path'];
$en = substr($path,1,2);
if($en == 'en'){
$language_type = 1;
$en_url = $_SERVER['REQUEST_URI'];
$zh_url = substr($_SERVER['REQUEST_URI'],3);
}else{
$language_type = 0;
$en_url = '/en'.$_SERVER['REQUEST_URI'];
$zh_url = $_SERVER['REQUEST_URI'];
}
$zh = $zh_url;
$en = $en_url;
$navigation = IndexNavigation::query()
->where('is_link',0)
->where('parent_id',0)
->where('is_show',0)
->where('language_type',$language_type)
->orderBy('id', 'asc')
->get()
->toArray();
foreach ($navigation as $k => &$v){
$children = IndexNavigation::query()
->where('is_link',0)
->where('is_show',0)
->where('parent_id',$v['id'])
->get()
->toArray();
$v['children'] = $children;
}
return view('Index.about.achievement')
->with('IndexNav',$navigation)
->with('language_type',$language_type)
->with('zh',$zh)
->with('en',$en);
} }
} }
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
namespace App\Http\Controllers\Index; namespace App\Http\Controllers\Index;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use App\Listeners\browserModel; use App\Listeners\browserModel;
use Moell\LayuiAdmin\Models\IndexNavigation;
use Moell\LayuiAdmin\Models\ArticleInfo; use Moell\LayuiAdmin\Models\ArticleInfo;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use App\Enum\NewsType; use App\Enum\NewsType;
...@@ -23,9 +24,15 @@ class ArticleController extends Controller ...@@ -23,9 +24,15 @@ class ArticleController extends Controller
if($en == 'en'){ if($en == 'en'){
$language_type = 1; $language_type = 1;
$en_url = $_SERVER['REQUEST_URI'];
$zh_url = substr($_SERVER['REQUEST_URI'],3);
}else{ }else{
$language_type = 0; $language_type = 0;
$en_url = '/en'.$_SERVER['REQUEST_URI'];
$zh_url = $_SERVER['REQUEST_URI'];
} }
$zh = $zh_url;
$en = $en_url;
$news_center = ArticleInfo::query() $news_center = ArticleInfo::query()
->where('type', '=', 1) ->where('type', '=', 1)
...@@ -60,13 +67,36 @@ class ArticleController extends Controller ...@@ -60,13 +67,36 @@ class ArticleController extends Controller
// ->whereNotIn('id', $item_trends->pluck('id')->toArray()) // ->whereNotIn('id', $item_trends->pluck('id')->toArray())
->orderBy('id', 'asc') ->orderBy('id', 'asc')
->limit(3)->get(); ->limit(3)->get();
$navigation = IndexNavigation::query()
->where('is_link',0)
->where('parent_id',0)
->where('is_show',0)
->where('language_type',$language_type)
->orderBy('id', 'asc')
->get()
->toArray();
foreach ($navigation as $k => &$v){
$children = IndexNavigation::query()
->where('is_link',0)
->where('is_show',0)
->where('parent_id',$v['id'])
->get()
->toArray();
$v['children'] = $children;
}
return view('index.news.index', return view('index.news.index',
['news_center' => $news_center, ['news_center' => $news_center,
'news_center2' => $news_center2, 'news_center2' => $news_center2,
'group_news' => $group_news1, 'group_news' => $group_news1,
'group_news2' => $group_news2, 'group_news2' => $group_news2,
'item_trends' => $item_trends, 'item_trends' => $item_trends,
'item_trends2'=>$item_trends2]); 'item_trends2'=>$item_trends2])
->with('IndexNav',$navigation)
->with('language_type',$language_type)
->with('zh',$zh)
->with('en',$en);
} }
public function info(Request $request) public function info(Request $request)
...@@ -78,9 +108,15 @@ class ArticleController extends Controller ...@@ -78,9 +108,15 @@ class ArticleController extends Controller
if($en == 'en'){ if($en == 'en'){
$language_type = 1; $language_type = 1;
$en_url = $_SERVER['REQUEST_URI'];
$zh_url = substr($_SERVER['REQUEST_URI'],3);
}else{ }else{
$language_type = 0; $language_type = 0;
$en_url = '/en'.$_SERVER['REQUEST_URI'];
$zh_url = $_SERVER['REQUEST_URI'];
} }
$zh = $zh_url;
$en = $en_url;
$type = $request->get('type'); $type = $request->get('type');
$id = $request->post('id'); $id = $request->post('id');
ArticleInfo::where('id','=',$id)->increment('browse'); ArticleInfo::where('id','=',$id)->increment('browse');
...@@ -95,7 +131,32 @@ class ArticleController extends Controller ...@@ -95,7 +131,32 @@ class ArticleController extends Controller
$info = ArticleInfo::query() $info = ArticleInfo::query()
->where('id', $id)->first(); ->where('id', $id)->first();
return view('index.news.article_info', compact('info'))->with(compact('data'))->with(compact('type')); $navigation = IndexNavigation::query()
->where('is_link',0)
->where('parent_id',0)
->where('is_show',0)
->where('language_type',$language_type)
->orderBy('id', 'asc')
->get()
->toArray();
foreach ($navigation as $k => &$v){
$children = IndexNavigation::query()
->where('is_link',0)
->where('is_show',0)
->where('parent_id',$v['id'])
->get()
->toArray();
$v['children'] = $children;
}
return view('Index.news.article_info', compact('info'))
->with(compact('data'))
->with('IndexNav',$navigation)
->with('language_type',$language_type)
->with('zh',$zh)
->with('en',$en)
->with(compact('type'));
} }
public function article_list(Request $request) public function article_list(Request $request)
...@@ -107,9 +168,15 @@ class ArticleController extends Controller ...@@ -107,9 +168,15 @@ class ArticleController extends Controller
if($en == 'en'){ if($en == 'en'){
$language_type = 1; $language_type = 1;
$en_url = $_SERVER['REQUEST_URI'];
$zh_url = substr($_SERVER['REQUEST_URI'],3);
}else{ }else{
$language_type = 0; $language_type = 0;
$en_url = '/en'.$_SERVER['REQUEST_URI'];
$zh_url = $_SERVER['REQUEST_URI'];
} }
$zh = $zh_url;
$en = $en_url;
$search = $request->post('tag'); $search = $request->post('tag');
$page = $request->get('page'); $page = $request->get('page');
$type = $request->get('type') ; $type = $request->get('type') ;
...@@ -124,7 +191,32 @@ class ArticleController extends Controller ...@@ -124,7 +191,32 @@ class ArticleController extends Controller
->where('status',0) ->where('status',0)
->where('language_type',$language_type) ->where('language_type',$language_type)
->paginate(12, ['*'], 'page', $page); ->paginate(12, ['*'], 'page', $page);
return view('index.news.article_list',compact('data'))->with(compact('type'));
$navigation = IndexNavigation::query()
->where('is_link',0)
->where('parent_id',0)
->where('is_show',0)
->where('language_type',$language_type)
->orderBy('id', 'asc')
->get()
->toArray();
foreach ($navigation as $k => &$v){
$children = IndexNavigation::query()
->where('is_link',0)
->where('is_show',0)
->where('parent_id',$v['id'])
->get()
->toArray();
$v['children'] = $children;
}
return view('Index.news.article_list',compact('data'))
->with('IndexNav',$navigation)
->with('language_type',$language_type)
->with('zh',$zh)
->with('en',$en)
->with(compact('type'));
} }
function getIp() function getIp()
......
...@@ -3,6 +3,7 @@ namespace App\Http\Controllers\Index; ...@@ -3,6 +3,7 @@ namespace App\Http\Controllers\Index;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use Moell\LayuiAdmin\Models\IndexVideoUrl; use Moell\LayuiAdmin\Models\IndexVideoUrl;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Moell\LayuiAdmin\Models\IndexNavigation;
use Moell\LayuiAdmin\Models\Audio; use Moell\LayuiAdmin\Models\Audio;
class AudioController extends Controller class AudioController extends Controller
{ {
...@@ -15,10 +16,15 @@ class AudioController extends Controller ...@@ -15,10 +16,15 @@ class AudioController extends Controller
if($en == 'en'){ if($en == 'en'){
$language_type = 1; $language_type = 1;
$en_url = $_SERVER['REQUEST_URI'];
$zh_url = substr($_SERVER['REQUEST_URI'],3);
}else{ }else{
$language_type = 0; $language_type = 0;
$en_url = '/en'.$_SERVER['REQUEST_URI'];
$zh_url = $_SERVER['REQUEST_URI'];
} }
$zh = $zh_url;
$en = $en_url;
$speech = IndexVideoUrl::query()->where('status',0) $speech = IndexVideoUrl::query()->where('status',0)
->where('language_type',$language_type) ->where('language_type',$language_type)
->where('type',1) ->where('type',1)
...@@ -42,7 +48,30 @@ class AudioController extends Controller ...@@ -42,7 +48,30 @@ class AudioController extends Controller
->limit(4) ->limit(4)
->get(); ->get();
return view('index.audio.index',compact('speech')) $navigation = IndexNavigation::query()
->where('is_link',0)
->where('parent_id',0)
->where('is_show',0)
->where('language_type',$language_type)
->orderBy('id', 'asc')
->get()
->toArray();
foreach ($navigation as $k => &$v){
$children = IndexNavigation::query()
->where('is_link',0)
->where('is_show',0)
->where('parent_id',$v['id'])
->get()
->toArray();
$v['children'] = $children;
}
return view('Index.audio.index',compact('speech'))
->with('IndexNav',$navigation)
->with('language_type',$language_type)
->with('zh',$zh)
->with('en',$en)
->with(compact('corporate')) ->with(compact('corporate'))
->with(compact('activity')) ->with(compact('activity'))
->with(compact('media_coverage')); ->with(compact('media_coverage'));
...@@ -57,14 +86,46 @@ class AudioController extends Controller ...@@ -57,14 +86,46 @@ class AudioController extends Controller
if($en == 'en'){ if($en == 'en'){
$language_type = 1; $language_type = 1;
$en_url = $_SERVER['REQUEST_URI'];
$zh_url = substr($_SERVER['REQUEST_URI'],3);
}else{ }else{
$language_type = 0; $language_type = 0;
$en_url = '/en'.$_SERVER['REQUEST_URI'];
$zh_url = $_SERVER['REQUEST_URI'];
} }
$zh = $zh_url;
$en = $en_url;
$type = $request->get('type'); $type = $request->get('type');
$page = $request->get('page'); $page = $request->get('page');
$data = IndexVideoUrl::getDataById($request->get('id'),$language_type); $data = IndexVideoUrl::getDataById($request->get('id'),$language_type);
$list = IndexVideoUrl::query()->where(['type'=>$type,'language_type'=>$language_type])->limit(3)->paginate(3, ['*'], 'page', $page); $list = IndexVideoUrl::query()->where(['type'=>$type,'language_type'=>$language_type])->limit(3)->paginate(3, ['*'], 'page', $page);
return view('index.audio.play',compact('data'))->with(compact('list'))->with(compact('type'));
$navigation = IndexNavigation::query()
->where('is_link',0)
->where('parent_id',0)
->where('is_show',0)
->where('language_type',$language_type)
->orderBy('id', 'asc')
->get()
->toArray();
foreach ($navigation as $k => &$v){
$children = IndexNavigation::query()
->where('is_link',0)
->where('is_show',0)
->where('parent_id',$v['id'])
->get()
->toArray();
$v['children'] = $children;
}
return view('Index.audio.play',compact('data'))
->with('IndexNav',$navigation)
->with('language_type',$language_type)
->with('zh',$zh)
->with('en',$en)
->with(compact('list'))
->with(compact('type'));
} }
} }
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
namespace App\Http\Controllers\Index; namespace App\Http\Controllers\Index;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Moell\LayuiAdmin\Models\IndexNavigation;
use Moell\LayuiAdmin\Models\Pdf as PdfModel; use Moell\LayuiAdmin\Models\Pdf as PdfModel;
/** /**
* Created by PhpStorm. * Created by PhpStorm.
...@@ -14,18 +15,50 @@ class BrandCultureController extends Controller ...@@ -14,18 +15,50 @@ class BrandCultureController extends Controller
{ {
public function index() public function index()
{ {
return view('index.brand_culture.index'); $url = url()->full();
} $pathinfo = parse_url($url);
$path = $pathinfo['path'];
$en = substr($path,1,2);
public function download_pdf() if($en == 'en'){
{ $language_type = 1;
$data = PdfModel::query() $en_url = $_SERVER['REQUEST_URI'];
->where('type','=',1) $zh_url = substr($_SERVER['REQUEST_URI'],3);
->first(); }else{
return view('index.brand_culture.download',compact('data')); $language_type = 0;
$en_url = '/en'.$_SERVER['REQUEST_URI'];
$zh_url = $_SERVER['REQUEST_URI'];
}
$zh = $zh_url;
$en = $en_url;
$navigation = IndexNavigation::query()
->where('is_link',0)
->where('parent_id',0)
->where('is_show',0)
->where('language_type',$language_type)
->orderBy('id', 'asc')
->get()
->toArray();
foreach ($navigation as $k => &$v){
$children = IndexNavigation::query()
->where('is_link',0)
->where('is_show',0)
->where('parent_id',$v['id'])
->get()
->toArray();
$v['children'] = $children;
}
return view('Index.brand_culture.index')
->with('IndexNav',$navigation)
->with('language_type',$language_type)
->with('zh',$zh)
->with('en',$en);
} }
public function download(Request $request) public function download_pdf()
{ {
$url = url()->full(); $url = url()->full();
$pathinfo = parse_url($url); $pathinfo = parse_url($url);
...@@ -34,10 +67,46 @@ class BrandCultureController extends Controller ...@@ -34,10 +67,46 @@ class BrandCultureController extends Controller
if($en == 'en'){ if($en == 'en'){
$language_type = 1; $language_type = 1;
$en_url = $_SERVER['REQUEST_URI'];
$zh_url = substr($_SERVER['REQUEST_URI'],3);
}else{ }else{
$language_type = 0; $language_type = 0;
$en_url = '/en'.$_SERVER['REQUEST_URI'];
$zh_url = $_SERVER['REQUEST_URI'];
}
$zh = $zh_url;
$en = $en_url;
$navigation = IndexNavigation::query()
->where('is_link',0)
->where('parent_id',0)
->where('is_show',0)
->where('language_type',$language_type)
->orderBy('id', 'asc')
->get()
->toArray();
foreach ($navigation as $k => &$v){
$children = IndexNavigation::query()
->where('is_link',0)
->where('is_show',0)
->where('parent_id',$v['id'])
->get()
->toArray();
$v['children'] = $children;
} }
$data = PdfModel::query()
->where('type','=',1)
->first();
return view('Index.brand_culture.download',compact('data'))
->with('IndexNav',$navigation)
->with('language_type',$language_type)
->with('zh',$zh)
->with('en',$en);
}
public function download(Request $request)
{
$id = $request->get('id'); $id = $request->get('id');
$data = PdfModel::query()->where('id','=',$id)->first(); $data = PdfModel::query()->where('id','=',$id)->first();
$filename = $data->file_path; $filename = $data->file_path;
......
...@@ -3,6 +3,7 @@ namespace App\Http\Controllers\Index; ...@@ -3,6 +3,7 @@ namespace App\Http\Controllers\Index;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use Moell\LayuiAdmin\Models\IndexBanner; use Moell\LayuiAdmin\Models\IndexBanner;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Moell\LayuiAdmin\Models\IndexNavigation;
/** /**
* Created by PhpStorm. * Created by PhpStorm.
* User: Administrator * User: Administrator
...@@ -21,8 +22,33 @@ class GoodsItemController extends Controller ...@@ -21,8 +22,33 @@ class GoodsItemController extends Controller
if($en == 'en'){ if($en == 'en'){
$language_type = 1; $language_type = 1;
$en_url = $_SERVER['REQUEST_URI'];
$zh_url = substr($_SERVER['REQUEST_URI'],3);
}else{ }else{
$language_type = 0; $language_type = 0;
$en_url = '/en'.$_SERVER['REQUEST_URI'];
$zh_url = $_SERVER['REQUEST_URI'];
}
$zh = $zh_url;
$en = $en_url;
$navigation = IndexNavigation::query()
->where('is_link',0)
->where('parent_id',0)
->where('is_show',0)
->where('language_type',$language_type)
->orderBy('id', 'asc')
->get()
->toArray();
foreach ($navigation as $k => &$v){
$children = IndexNavigation::query()
->where('is_link',0)
->where('is_show',0)
->where('parent_id',$v['id'])
->get()
->toArray();
$v['children'] = $children;
} }
$data5 = IndexBanner::query() $data5 = IndexBanner::query()
...@@ -45,10 +71,14 @@ class GoodsItemController extends Controller ...@@ -45,10 +71,14 @@ class GoodsItemController extends Controller
->where('delete_time','=',0) ->where('delete_time','=',0)
->limit(4) ->limit(4)
->orderBy('id','desc')->get(); ->orderBy('id','desc')->get();
return view('index.goods_item.index') return view('Index.goods_item.index')
->with(compact('data5')) ->with(compact('data5'))
->with(compact('data6')) ->with(compact('data6'))
->with(compact('data7')); ->with(compact('data7'))
->with('IndexNav',$navigation)
->with('language_type',$language_type)
->with('zh',$zh)
->with('en',$en);
} }
public function more(Request $request) public function more(Request $request)
...@@ -60,8 +90,33 @@ class GoodsItemController extends Controller ...@@ -60,8 +90,33 @@ class GoodsItemController extends Controller
if($en == 'en'){ if($en == 'en'){
$language_type = 1; $language_type = 1;
$en_url = $_SERVER['REQUEST_URI'];
$zh_url = substr($_SERVER['REQUEST_URI'],3);
}else{ }else{
$language_type = 0; $language_type = 0;
$en_url = '/en'.$_SERVER['REQUEST_URI'];
$zh_url = $_SERVER['REQUEST_URI'];
}
$zh = $zh_url;
$en = $en_url;
$navigation = IndexNavigation::query()
->where('is_link',0)
->where('parent_id',0)
->where('is_show',0)
->where('language_type',$language_type)
->orderBy('id', 'asc')
->get()
->toArray();
foreach ($navigation as $k => &$v){
$children = IndexNavigation::query()
->where('is_link',0)
->where('is_show',0)
->where('parent_id',$v['id'])
->get()
->toArray();
$v['children'] = $children;
} }
$type= $request->get('type'); $type= $request->get('type');
...@@ -88,10 +143,14 @@ class GoodsItemController extends Controller ...@@ -88,10 +143,14 @@ class GoodsItemController extends Controller
$content = isset($content7->content) ? $content7->content : ''; $content = isset($content7->content) ? $content7->content : '';
} }
return view('index.goods_item.more') return view('Index.goods_item.more')
->with(compact('data')) ->with(compact('data'))
->with(compact('title')) ->with(compact('title'))
->with(compact('content')); ->with(compact('content'))
->with('IndexNav',$navigation)
->with('language_type',$language_type)
->with('zh',$zh)
->with('en',$en);
} }
public function maodian21() public function maodian21()
...@@ -103,8 +162,33 @@ class GoodsItemController extends Controller ...@@ -103,8 +162,33 @@ class GoodsItemController extends Controller
if($en == 'en'){ if($en == 'en'){
$language_type = 1; $language_type = 1;
$en_url = $_SERVER['REQUEST_URI'];
$zh_url = substr($_SERVER['REQUEST_URI'],3);
}else{ }else{
$language_type = 0; $language_type = 0;
$en_url = '/en'.$_SERVER['REQUEST_URI'];
$zh_url = $_SERVER['REQUEST_URI'];
}
$zh = $zh_url;
$en = $en_url;
$navigation = IndexNavigation::query()
->where('is_link',0)
->where('parent_id',0)
->where('is_show',0)
->where('language_type',$language_type)
->orderBy('id', 'asc')
->get()
->toArray();
foreach ($navigation as $k => &$v){
$children = IndexNavigation::query()
->where('is_link',0)
->where('is_show',0)
->where('parent_id',$v['id'])
->get()
->toArray();
$v['children'] = $children;
} }
$data5 = IndexBanner::query() $data5 = IndexBanner::query()
...@@ -128,10 +212,14 @@ class GoodsItemController extends Controller ...@@ -128,10 +212,14 @@ class GoodsItemController extends Controller
->limit(4) ->limit(4)
->orderBy('id','desc')->get(); ->orderBy('id','desc')->get();
return view('index.goods_item.maodian21') return view('Index.goods_item.maodian21')
->with(compact('data5')) ->with(compact('data5'))
->with(compact('data6')) ->with(compact('data6'))
->with(compact('data7')); ->with(compact('data7'))
->with('IndexNav',$navigation)
->with('language_type',$language_type)
->with('zh',$zh)
->with('en',$en);
} }
public function maodian22() public function maodian22()
...@@ -143,8 +231,33 @@ class GoodsItemController extends Controller ...@@ -143,8 +231,33 @@ class GoodsItemController extends Controller
if($en == 'en'){ if($en == 'en'){
$language_type = 1; $language_type = 1;
$en_url = $_SERVER['REQUEST_URI'];
$zh_url = substr($_SERVER['REQUEST_URI'],3);
}else{ }else{
$language_type = 0; $language_type = 0;
$en_url = '/en'.$_SERVER['REQUEST_URI'];
$zh_url = $_SERVER['REQUEST_URI'];
}
$zh = $zh_url;
$en = $en_url;
$navigation = IndexNavigation::query()
->where('is_link',0)
->where('parent_id',0)
->where('is_show',0)
->where('language_type',$language_type)
->orderBy('id', 'asc')
->get()
->toArray();
foreach ($navigation as $k => &$v){
$children = IndexNavigation::query()
->where('is_link',0)
->where('is_show',0)
->where('parent_id',$v['id'])
->get()
->toArray();
$v['children'] = $children;
} }
$data5 = IndexBanner::query() $data5 = IndexBanner::query()
...@@ -168,9 +281,13 @@ class GoodsItemController extends Controller ...@@ -168,9 +281,13 @@ class GoodsItemController extends Controller
->limit(4) ->limit(4)
->orderBy('id','desc')->get(); ->orderBy('id','desc')->get();
return view('index.goods_item.maodian22') return view('Index.goods_item.maodian22')
->with(compact('data5')) ->with(compact('data5'))
->with(compact('data6')) ->with(compact('data6'))
->with(compact('data7')); ->with(compact('data7'))
->with('IndexNav',$navigation)
->with('language_type',$language_type)
->with('zh',$zh)
->with('en',$en);
} }
} }
...@@ -4,6 +4,7 @@ use App\Http\Controllers\Controller; ...@@ -4,6 +4,7 @@ use App\Http\Controllers\Controller;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Moell\LayuiAdmin\Models\Pdf as PdfModel; use Moell\LayuiAdmin\Models\Pdf as PdfModel;
use Moell\LayuiAdmin\Models\GroupCulture; use Moell\LayuiAdmin\Models\GroupCulture;
use Moell\LayuiAdmin\Models\IndexNavigation;
/** /**
* Created by PhpStorm. * Created by PhpStorm.
* User: Administrator * User: Administrator
...@@ -21,8 +22,33 @@ class GroupCultureController extends Controller ...@@ -21,8 +22,33 @@ class GroupCultureController extends Controller
if($en == 'en'){ if($en == 'en'){
$language_type = 1; $language_type = 1;
$en_url = $_SERVER['REQUEST_URI'];
$zh_url = substr($_SERVER['REQUEST_URI'],3);
}else{ }else{
$language_type = 0; $language_type = 0;
$en_url = '/en'.$_SERVER['REQUEST_URI'];
$zh_url = $_SERVER['REQUEST_URI'];
}
$zh = $zh_url;
$en = $en_url;
$navigation = IndexNavigation::query()
->where('is_link',0)
->where('parent_id',0)
->where('is_show',0)
->where('language_type',$language_type)
->orderBy('id', 'asc')
->get()
->toArray();
foreach ($navigation as $k => &$v){
$children = IndexNavigation::query()
->where('is_link',0)
->where('is_show',0)
->where('parent_id',$v['id'])
->get()
->toArray();
$v['children'] = $children;
} }
$where = [ $where = [
'language_type' => $language_type, 'language_type' => $language_type,
...@@ -32,20 +58,63 @@ class GroupCultureController extends Controller ...@@ -32,20 +58,63 @@ class GroupCultureController extends Controller
$data2 = GroupCulture::query()->where('type','=',2)->where($where)->orderBy('id','desc')->first(); $data2 = GroupCulture::query()->where('type','=',2)->where($where)->orderBy('id','desc')->first();
$data3 = GroupCulture::query()->where('type','=',3)->where($where)->orderBy('id','desc')->first(); $data3 = GroupCulture::query()->where('type','=',3)->where($where)->orderBy('id','desc')->first();
return view('index.group_culture.index') return view('Index.group_culture.index')
->with( compact('data1')) ->with( compact('data1'))
->with( compact('data2')) ->with( compact('data2'))
->with( compact('data3')); ->with( compact('data3'))
->with('IndexNav',$navigation)
->with('language_type',$language_type)
->with('zh',$zh)
->with('en',$en);
} }
public function download_report_pdf() public function download_report_pdf()
{ {
$url = url()->full();
$pathinfo = parse_url($url);
$path = $pathinfo['path'];
$en = substr($path,1,2);
if($en == 'en'){
$language_type = 1;
$en_url = $_SERVER['REQUEST_URI'];
$zh_url = substr($_SERVER['REQUEST_URI'],3);
}else{
$language_type = 0;
$en_url = '/en'.$_SERVER['REQUEST_URI'];
$zh_url = $_SERVER['REQUEST_URI'];
}
$zh = $zh_url;
$en = $en_url;
$navigation = IndexNavigation::query()
->where('is_link',0)
->where('parent_id',0)
->where('is_show',0)
->where('language_type',$language_type)
->orderBy('id', 'asc')
->get()
->toArray();
foreach ($navigation as $k => &$v){
$children = IndexNavigation::query()
->where('is_link',0)
->where('is_show',0)
->where('parent_id',$v['id'])
->get()
->toArray();
$v['children'] = $children;
}
$data = PdfModel::query() $data = PdfModel::query()
->where('type','=',2) ->where('type','=',2)
->first(); ->first();
return view('index.group_culture.download',compact('data')); return view('Index.group_culture.download',compact('data'))
->with('IndexNav',$navigation)
->with('language_type',$language_type)
->with('zh',$zh)
->with('en',$en);
} }
public function download_report(Request $request) public function download_report(Request $request)
...@@ -77,15 +146,44 @@ class GroupCultureController extends Controller ...@@ -77,15 +146,44 @@ class GroupCultureController extends Controller
if($en == 'en'){ if($en == 'en'){
$language_type = 1; $language_type = 1;
$en_url = $_SERVER['REQUEST_URI'];
$zh_url = substr($_SERVER['REQUEST_URI'],3);
}else{ }else{
$language_type = 0; $language_type = 0;
$en_url = '/en'.$_SERVER['REQUEST_URI'];
$zh_url = $_SERVER['REQUEST_URI'];
}
$zh = $zh_url;
$en = $en_url;
$navigation = IndexNavigation::query()
->where('is_link',0)
->where('parent_id',0)
->where('is_show',0)
->where('language_type',$language_type)
->orderBy('id', 'asc')
->get()
->toArray();
foreach ($navigation as $k => &$v){
$children = IndexNavigation::query()
->where('is_link',0)
->where('is_show',0)
->where('parent_id',$v['id'])
->get()
->toArray();
$v['children'] = $children;
} }
$where = [ $where = [
'language_type' => $language_type, 'language_type' => $language_type,
'delete_time' => 0 'delete_time' => 0
]; ];
$info = GroupCulture::query()->where('type','=',1)->where($where)->orderBy('id','desc')->first(); $info = GroupCulture::query()->where('type','=',1)->where($where)->orderBy('id','desc')->first();
return view('index.group_culture.fashion_city')->with( compact('info')); return view('Index.group_culture.fashion_city')->with( compact('info'))
->with('IndexNav',$navigation)
->with('language_type',$language_type)
->with('zh',$zh)
->with('en',$en);
} }
public function fashion_safety() public function fashion_safety()
...@@ -97,15 +195,44 @@ class GroupCultureController extends Controller ...@@ -97,15 +195,44 @@ class GroupCultureController extends Controller
if($en == 'en'){ if($en == 'en'){
$language_type = 1; $language_type = 1;
$en_url = $_SERVER['REQUEST_URI'];
$zh_url = substr($_SERVER['REQUEST_URI'],3);
}else{ }else{
$language_type = 0; $language_type = 0;
$en_url = '/en'.$_SERVER['REQUEST_URI'];
$zh_url = $_SERVER['REQUEST_URI'];
}
$zh = $zh_url;
$en = $en_url;
$navigation = IndexNavigation::query()
->where('is_link',0)
->where('parent_id',0)
->where('is_show',0)
->where('language_type',$language_type)
->orderBy('id', 'asc')
->get()
->toArray();
foreach ($navigation as $k => &$v){
$children = IndexNavigation::query()
->where('is_link',0)
->where('is_show',0)
->where('parent_id',$v['id'])
->get()
->toArray();
$v['children'] = $children;
} }
$where = [ $where = [
'language_type' => $language_type, 'language_type' => $language_type,
'delete_time' => 0 'delete_time' => 0
]; ];
$info = GroupCulture::query()->where('type','=',2)->where($where)->orderBy('id','desc')->first(); $info = GroupCulture::query()->where('type','=',2)->where($where)->orderBy('id','desc')->first();
return view('index.group_culture.fashion_safety')->with( compact('info')); return view('Index.group_culture.fashion_safety')->with( compact('info'))
->with('IndexNav',$navigation)
->with('language_type',$language_type)
->with('zh',$zh)
->with('en',$en);
} }
public function public_welfare() public function public_welfare()
...@@ -117,14 +244,43 @@ class GroupCultureController extends Controller ...@@ -117,14 +244,43 @@ class GroupCultureController extends Controller
if($en == 'en'){ if($en == 'en'){
$language_type = 1; $language_type = 1;
$en_url = $_SERVER['REQUEST_URI'];
$zh_url = substr($_SERVER['REQUEST_URI'],3);
}else{ }else{
$language_type = 0; $language_type = 0;
$en_url = '/en'.$_SERVER['REQUEST_URI'];
$zh_url = $_SERVER['REQUEST_URI'];
}
$zh = $zh_url;
$en = $en_url;
$navigation = IndexNavigation::query()
->where('is_link',0)
->where('parent_id',0)
->where('is_show',0)
->where('language_type',$language_type)
->orderBy('id', 'asc')
->get()
->toArray();
foreach ($navigation as $k => &$v){
$children = IndexNavigation::query()
->where('is_link',0)
->where('is_show',0)
->where('parent_id',$v['id'])
->get()
->toArray();
$v['children'] = $children;
} }
$where = [ $where = [
'language_type' => $language_type, 'language_type' => $language_type,
'delete_time' => 0 'delete_time' => 0
]; ];
$info = GroupCulture::query()->where('type','=',3)->where($where)->orderBy('id','desc')->first(); $info = GroupCulture::query()->where('type','=',3)->where($where)->orderBy('id','desc')->first();
return view('index.group_culture.public_welfare')->with( compact('info')); return view('Index.group_culture.public_welfare')->with( compact('info'))
->with('IndexNav',$navigation)
->with('language_type',$language_type)
->with('zh',$zh)
->with('en',$en);
} }
} }
...@@ -3,21 +3,139 @@ namespace App\Http\Controllers\Index; ...@@ -3,21 +3,139 @@ namespace App\Http\Controllers\Index;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use Moell\LayuiAdmin\Models\IndexSetting; use Moell\LayuiAdmin\Models\IndexSetting;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
use Moell\LayuiAdmin\Models\IndexNavigation;
class JoinUsController extends Controller class JoinUsController extends Controller
{ {
public function index() public function index()
{ {
$url = url()->full();
$pathinfo = parse_url($url);
$path = $pathinfo['path'];
$en = substr($path,1,2);
if($en == 'en'){
$language_type = 1;
$en_url = $_SERVER['REQUEST_URI'];
$zh_url = substr($_SERVER['REQUEST_URI'],3);
}else{
$language_type = 0;
$en_url = '/en'.$_SERVER['REQUEST_URI'];
$zh_url = $_SERVER['REQUEST_URI'];
}
$zh = $zh_url;
$en = $en_url;
$navigation = IndexNavigation::query()
->where('is_link',0)
->where('parent_id',0)
->where('is_show',0)
->where('language_type',$language_type)
->orderBy('id', 'asc')
->get()
->toArray();
foreach ($navigation as $k => &$v){
$children = IndexNavigation::query()
->where('is_link',0)
->where('is_show',0)
->where('parent_id',$v['id'])
->get()
->toArray();
$v['children'] = $children;
}
$setting = IndexSetting::query()->first(); $setting = IndexSetting::query()->first();
return view('index.join_us.index',compact('setting')); return view('Index.join_us.index',compact('setting'))
->with('IndexNav',$navigation)
->with('language_type',$language_type)
->with('zh',$zh)
->with('en',$en);
} }
public function success_story() public function success_story()
{ {
return view('index.join_us.success_story'); $url = url()->full();
$pathinfo = parse_url($url);
$path = $pathinfo['path'];
$en = substr($path,1,2);
if($en == 'en'){
$language_type = 1;
$en_url = $_SERVER['REQUEST_URI'];
$zh_url = substr($_SERVER['REQUEST_URI'],3);
}else{
$language_type = 0;
$en_url = '/en'.$_SERVER['REQUEST_URI'];
$zh_url = $_SERVER['REQUEST_URI'];
}
$zh = $zh_url;
$en = $en_url;
$navigation = IndexNavigation::query()
->where('is_link',0)
->where('parent_id',0)
->where('is_show',0)
->where('language_type',$language_type)
->orderBy('id', 'asc')
->get()
->toArray();
foreach ($navigation as $k => &$v){
$children = IndexNavigation::query()
->where('is_link',0)
->where('is_show',0)
->where('parent_id',$v['id'])
->get()
->toArray();
$v['children'] = $children;
}
return view('Index.join_us.success_story')
->with('IndexNav',$navigation)
->with('language_type',$language_type)
->with('zh',$zh)
->with('en',$en);
} }
public function business_story() public function business_story()
{ {
return view('index.join_us.business'); $url = url()->full();
$pathinfo = parse_url($url);
$path = $pathinfo['path'];
$en = substr($path,1,2);
if($en == 'en'){
$language_type = 1;
$en_url = $_SERVER['REQUEST_URI'];
$zh_url = substr($_SERVER['REQUEST_URI'],3);
}else{
$language_type = 0;
$en_url = '/en'.$_SERVER['REQUEST_URI'];
$zh_url = $_SERVER['REQUEST_URI'];
}
$zh = $zh_url;
$en = $en_url;
$navigation = IndexNavigation::query()
->where('is_link',0)
->where('parent_id',0)
->where('is_show',0)
->where('language_type',$language_type)
->orderBy('id', 'asc')
->get()
->toArray();
foreach ($navigation as $k => &$v){
$children = IndexNavigation::query()
->where('is_link',0)
->where('is_show',0)
->where('parent_id',$v['id'])
->get()
->toArray();
$v['children'] = $children;
}
return view('Index.join_us.business')
->with('IndexNav',$navigation)
->with('language_type',$language_type)
->with('zh',$zh)
->with('en',$en);
} }
public function job_social() public function job_social()
...@@ -29,19 +147,87 @@ class JoinUsController extends Controller ...@@ -29,19 +147,87 @@ class JoinUsController extends Controller
if($en == 'en'){ if($en == 'en'){
$language_type = 1; $language_type = 1;
$en_url = $_SERVER['REQUEST_URI'];
$zh_url = substr($_SERVER['REQUEST_URI'],3);
}else{ }else{
$language_type = 0; $language_type = 0;
$en_url = '/en'.$_SERVER['REQUEST_URI'];
$zh_url = $_SERVER['REQUEST_URI'];
}
$zh = $zh_url;
$en = $en_url;
$navigation = IndexNavigation::query()
->where('is_link',0)
->where('parent_id',0)
->where('is_show',0)
->where('language_type',$language_type)
->orderBy('id', 'asc')
->get()
->toArray();
foreach ($navigation as $k => &$v){
$children = IndexNavigation::query()
->where('is_link',0)
->where('is_show',0)
->where('parent_id',$v['id'])
->get()
->toArray();
$v['children'] = $children;
} }
$data = DB::table('join_us') $data = DB::table('join_us')
->where('status','=',0) ->where('status','=',0)
->where('language_type',$language_type) ->where('language_type',$language_type)
->get()->toArray(); ->get()->toArray();
return view('index.join_us.job_social',compact('data')); return view('Index.join_us.job_social',compact('data'))
->with('IndexNav',$navigation)
->with('language_type',$language_type)
->with('zh',$zh)
->with('en',$en);
} }
public function cooperation() public function cooperation()
{ {
return view('index.join_us.cooperation'); $url = url()->full();
$pathinfo = parse_url($url);
$path = $pathinfo['path'];
$en = substr($path,1,2);
if($en == 'en'){
$language_type = 1;
$en_url = $_SERVER['REQUEST_URI'];
$zh_url = substr($_SERVER['REQUEST_URI'],3);
}else{
$language_type = 0;
$en_url = '/en'.$_SERVER['REQUEST_URI'];
$zh_url = $_SERVER['REQUEST_URI'];
}
$zh = $zh_url;
$en = $en_url;
$navigation = IndexNavigation::query()
->where('is_link',0)
->where('parent_id',0)
->where('is_show',0)
->where('language_type',$language_type)
->orderBy('id', 'asc')
->get()
->toArray();
foreach ($navigation as $k => &$v){
$children = IndexNavigation::query()
->where('is_link',0)
->where('is_show',0)
->where('parent_id',$v['id'])
->get()
->toArray();
$v['children'] = $children;
}
return view('Index.join_us.cooperation')
->with('IndexNav',$navigation)
->with('language_type',$language_type)
->with('zh',$zh)
->with('en',$en);
} }
} }
...@@ -16,6 +16,6 @@ class ManagerController extends Controller ...@@ -16,6 +16,6 @@ class ManagerController extends Controller
{ {
$manager = AddManager::query() $manager = AddManager::query()
->get(); ->get();
return view('index.about',compact('manager')); return view('Index.about',compact('manager'));
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment