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

dep

parent 4de3001b
......@@ -14,11 +14,33 @@ class GoodsItemController extends Controller
{
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');
}
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');
$data = IndexBanner::query()->where('type','=',$type)
->orderBy('id','asc')->get();
......
......@@ -13,5 +13,5 @@ class IndexBanner extends Model
{
protected $table = 'index_banner';
protected $fillable = ['path','sequence','type','anchor','title'];
protected $fillable = ['path','sequence','type','anchor','img_title','title','content'];
}
......@@ -18,13 +18,14 @@
<div class="container1">
<div class="pro-info-t">
<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 class="pro-info-b">
<div class="pro-img">
<ul>
@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:;">
<img src="{{ asset($v->path) }}">
</a>
......
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