dyjh 6 年之前
父節點
當前提交
1da7b556c3

+ 1 - 1
app/Http/Controllers/Admin/Album/CatController.php

xqd
@@ -44,7 +44,7 @@ class CatController extends Controller
         $list = $query->paginate();
         foreach ($list as $key => $item) {
             //dump($item);
-            $item->sonlist = AlbumCatModel::where([['parent_id',$item->id],['store_id',$this->getStoreId()]])->get();
+            $item->sonlist = AlbumCatModel::where([['parent_id',$item->id],['store_id',$this->getStoreId()]])->orderByDesc('sort')->get();
         }
 //        dump($list);
         return view('admin.album.cat.index', compact('list'));

+ 0 - 1
app/Models/AlbumCatModel.php

xqd
@@ -39,7 +39,6 @@ class AlbumCatModel extends BaseModel
                            'name',
                            'sort',
                            'parent_id',
-                           'level',
                            'pic_url',
                             'store_id'
                           ];

+ 0 - 9
resources/views/admin/album/cat/edit.blade.php

xqd
@@ -66,15 +66,6 @@
                     </div>
 
                 </div>
-                <div class="form-group">
-                                    
-                 <label class="control-label col-sm-3">分类级别</label>
-                                    
-                   <div class="col-sm-9">
-                     <input id="data_level" name="data[level]" class="form-control" value="{{ $data['level'] or ''}}" required="" aria-required="true"  placeholder=""> 
-                    </div>
-                                
-                </div>    
                 <div class="form-group">
                                     
                  <label class="control-label col-sm-3">图片(270*200)</label>

+ 2 - 4
resources/views/admin/album/cat/index.blade.php

xqd xqd
@@ -37,11 +37,10 @@
 						<thead>
     						<tr>
 								
-            <th class="sorting" data-sort="id" width="10%"> ID </th>
+            <th class="sorting" data-sort="id" width="15%"> ID </th>
             <th class="sorting" data-sort="name" width="20%"> 名称 </th>
-            <th class="sorting" data-sort="level" width="10%"> 分类级别 </th>
             <th class="sorting" data-sort="sort" width="10%"> 排序 </th>
-            <th class="sorting" data-sort="pic_url" width="10%"> 分类图标 </th>
+            <th class="sorting" data-sort="pic_url" width="15%"> 分类图标 </th>
             <th class="sorting" data-sort="created_at" width="18%"> 添加时间 </th>
         						<th width="22%">相关操作</th>
         					</tr>
@@ -52,7 +51,6 @@
 								<tr style="background-color: white;">
 									<td>{{ $item->id }}</td>
 									<td>{{ $item->name }}</td>
-									<td>{{ $item->level }}</td>
 									<td>{{ $item->sort }}</td>
 									<td><img src="{{ $item->pic_url }}" width="50"/></td>
 									<td>{{ $item->created_at }}</td>

+ 1 - 8
resources/views/admin/album/cat/view.blade.php

xqd
@@ -25,14 +25,7 @@
                                                    
                    <p class="list-group-item-text"> {{ $data['parent_id'] or ''}}</p>
                                                  
-               </div>                     
-               <div class="list-group-item">
-                                                  
-                   <h3 class="list-group-item-heading">分类级别</h3>
-                                                   
-                   <p class="list-group-item-text"> {{ $data['level'] or ''}}</p>
-                                                 
-               </div>                     
+               </div>
                <div class="list-group-item">
                                                   
                    <h3 class="list-group-item-heading">图片url</h3>