Commit 37c2c4f5 authored by 章建武's avatar 章建武

dep

parent 4de3001b
...@@ -14,11 +14,33 @@ class GoodsItemController extends Controller ...@@ -14,11 +14,33 @@ class GoodsItemController 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;
}else{
$language_type = 0;
}
return view('index.goods_item.index'); return view('index.goods_item.index');
} }
public function more(Request $request) public function more(Request $request)
{ {
$url = url()->full();
$pathinfo = parse_url($url);
$path = $pathinfo['path'];
$en = substr($path,1,2);
if($en == 'en'){
$language_type = 1;
}else{
$language_type = 0;
}
$type= $request->get('type'); $type= $request->get('type');
$data = IndexBanner::query()->where('type','=',$type) $data = IndexBanner::query()->where('type','=',$type)
->orderBy('id','asc')->get(); ->orderBy('id','asc')->get();
......
...@@ -13,5 +13,5 @@ class IndexBanner extends Model ...@@ -13,5 +13,5 @@ class IndexBanner extends Model
{ {
protected $table = 'index_banner'; protected $table = 'index_banner';
protected $fillable = ['path','sequence','type','anchor','title']; protected $fillable = ['path','sequence','type','anchor','img_title','title','content'];
} }
\ No newline at end of file
...@@ -18,13 +18,14 @@ ...@@ -18,13 +18,14 @@
<div class="container1"> <div class="container1">
<div class="pro-info-t"> <div class="pro-info-t">
<h1>{{ $title }}</h1> <h1>{{ $title }}</h1>
<p><span style="font-family: 宋体, SimSun;">{{ $content }}</span></p> <h2></h2> <p><span style="font-family: 宋体, SimSun;">{{ $content }}</span></p>
<h2></h2>
</div> </div>
<div class="pro-info-b"> <div class="pro-info-b">
<div class="pro-img"> <div class="pro-img">
<ul> <ul>
@foreach($data as $v) @foreach($data as $v)
<li name="{{ asset($v->path) }}" data-txt="{{ $v->title }}"> <li name="{{ asset($v->path)}}" data-txt="{{ $v->img_title }}">
<a href="javascript:;"> <a href="javascript:;">
<img src="{{ asset($v->path) }}"> <img src="{{ asset($v->path) }}">
</a> </a>
...@@ -173,4 +174,4 @@ ...@@ -173,4 +174,4 @@
} }
}) })
</script> </script>
\ 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