Merge branch 'master' into dev
This commit is contained in:
@@ -17,11 +17,12 @@ class ContentController extends Controller
|
||||
{
|
||||
$data = [];
|
||||
$data['cats'] = GoodCat::orderby('cat_index', 'asc')->get();
|
||||
$data['stargoods'] = GoodInfo::where('baned', '0')->where('stared', '1')->orderby('id', 'asc')->limit(5)->get();
|
||||
$data['newgoods'] = GoodInfo::where('baned', '0')->where('count', '>', 0)->orderby('id', 'dsc')->orderby('id', 'dsc')->limit(12)->get();
|
||||
$data['stargoods'] = GoodInfo::where('baned', false)->where('stared', '1')->orderby('id', 'asc')->limit(5)->get();
|
||||
$data['newgoods'] = GoodInfo::where('baned', false)->where('count', '>', 0)->orderby('id', 'dsc')->limit(8)->get();
|
||||
$data['populargoods'] = GoodInfo::where('baned', false)->where('count', '>', 0)->where('fav_num', '>', 0)->orderby('fav_num', 'desc')->limit(8)->get();
|
||||
$data['cats'] = GoodCat::orderby('cat_index', 'asc')->get();
|
||||
foreach($data['cats'] as $cat){
|
||||
$data['catgoods'][$cat->cat_name] = GoodInfo::where('cat_id', $cat->id)->where('baned', '0')->inRandomOrder()->limit(6)->get();
|
||||
$data['catgoods'][$cat->cat_name] = GoodInfo::where('cat_id', $cat->id)->where('baned', false)->inRandomOrder()->limit(4)->get();
|
||||
}
|
||||
$data['announces'] = Announcement::orderby('id', 'dsc')->limit(5)->get();
|
||||
return View::make('welcome')->with($data);
|
||||
|
||||
@@ -242,7 +242,7 @@ class UserController extends Controller
|
||||
{
|
||||
$data = [];
|
||||
$user_id = $request->session()->get('user_id');
|
||||
$data['goods'] = GoodInfo::where('user_id', $user_id)->paginate(15);
|
||||
$data['goods'] = GoodInfo::where('user_id', $user_id)->orderby('id', 'desc')->paginate(15);
|
||||
|
||||
return view::make('user.seller.mygoods')->with($data);
|
||||
}
|
||||
|
||||
Vendored
+4
@@ -109,6 +109,10 @@
|
||||
float: right;
|
||||
}
|
||||
|
||||
.hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#message-container::-webkit-scrollbar {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
|
||||
@@ -16,24 +16,6 @@
|
||||
<div class="row">
|
||||
@include('layout.catlist')
|
||||
<div class="col-12 col-md-7">
|
||||
{{--@if(count($stargoods) > 0)
|
||||
<div class="orbit" role="region" aria-label="推荐商品" data-orbit>
|
||||
<ul class="orbit-container">
|
||||
@if(count($stargoods) > 1)
|
||||
<button class="orbit-previous"><span class="show-for-sr">←</span>◀︎</button>
|
||||
<button class="orbit-next"><span class="show-for-sr">→</span>▶︎</button>
|
||||
@endif
|
||||
@foreach($stargoods as $good)
|
||||
<li class="orbit-slide">
|
||||
<a href="/good/{{ $good->id }}"><img class="orbit-image" src="/good/{{ sha1($good->id) }}/titlepic" alt="{{ $good->name }}"/>
|
||||
<figcaption class="orbit-caption">{{ $good->good_name }}</figcaption>
|
||||
</a>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
<br/>
|
||||
@endif--}}
|
||||
@if(count($newgoods)>0)
|
||||
<h3>新品</h3>
|
||||
<div class="row">
|
||||
@@ -42,6 +24,14 @@
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
@if(count($populargoods)>0)
|
||||
<h3>热门</h3>
|
||||
<div class="row">
|
||||
@foreach($populargoods as $good)
|
||||
@include('good.goodInfoOnWelcome')
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
<h3>随便看看</h3>
|
||||
@foreach($cats as $cat)
|
||||
@if(count($catgoods[$cat->cat_name]))
|
||||
|
||||
Reference in New Issue
Block a user