Commit cdf3b953 authored by 章建武's avatar 章建武

dep

parent d51da87c
...@@ -14,7 +14,7 @@ class IndexController extends Controller ...@@ -14,7 +14,7 @@ class IndexController extends Controller
{ {
$url = url()->full(); $url = url()->full();
$pathinfo = parse_url($url); $pathinfo = parse_url($url);
$path = $pathinfo['path']; $path = isset($pathinfo['path']) ? $pathinfo['path'] : '';
$en = substr($path,1,2); $en = substr($path,1,2);
if($en == 'en'){ if($en == 'en'){
...@@ -80,7 +80,7 @@ class IndexController extends Controller ...@@ -80,7 +80,7 @@ class IndexController extends Controller
->get(); ->get();
$events = IndexEvents::query()->where('language_type', '=', $language_type)->get(); $events = IndexEvents::query()->where('language_type', '=', $language_type)->get();
$setting = IndexSetting::query()->first(); $setting = IndexSetting::query()->first();
return view('index.index') return view('index')
->with('banner1',$banner1) ->with('banner1',$banner1)
->with('banner2',$banner2) ->with('banner2',$banner2)
->with('banner3',$banner3) ->with('banner3',$banner3)
...@@ -88,6 +88,7 @@ class IndexController extends Controller ...@@ -88,6 +88,7 @@ class IndexController extends Controller
->with('audio_url',$audio_url) ->with('audio_url',$audio_url)
->with('article1',$article1) ->with('article1',$article1)
->with('article2',$article2) ->with('article2',$article2)
->with('language_type',$language_type)
->with(compact('events')) ->with(compact('events'))
->with(compact('banner4')) ->with(compact('banner4'))
->with(compact('setting')) ->with(compact('setting'))
......
...@@ -13,8 +13,8 @@ use Illuminate\Support\Facades\Route; ...@@ -13,8 +13,8 @@ use Illuminate\Support\Facades\Route;
| |
*/ */
Route::get('/index','Index\IndexController@index'); Route::get('/','Index\IndexController@index');//网站首页
Route::get('en/index','Index\IndexController@index'); Route::get('en/','Index\IndexController@index');
Route::get('/map','Index\IndexController@map')->name('map'); Route::get('/map','Index\IndexController@map')->name('map');
Route::get('/about','Index\AboutController@index')->name('/about');//关于页 Route::get('/about','Index\AboutController@index')->name('/about');//关于页
Route::get('en/about','Index\AboutController@index')->name('/about');//en关于页 Route::get('en/about','Index\AboutController@index')->name('/about');//en关于页
......
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