dyjh 6 tahun lalu
induk
melakukan
904ea164c8

+ 7 - 0
app/Http/Controllers/Admin/Album/AgentController.php

xqd
@@ -43,6 +43,13 @@ class AgentController extends Controller
 
             $item->product_pic = $product['cover_pic'];
         }
+        foreach ($list as $item){
+            if($item->status == 0){
+                $item->status = '已审核';
+            }else{
+                $item->status = '待审核';
+            }
+        }
         return view('admin.album.agent.index',compact('list'));
     }
 

+ 6 - 0
resources/views/admin/album/agent/index.blade.php

xqd xqd xqd
@@ -41,6 +41,7 @@
             <th class="sorting" data-sort="user_id"> 电话 </th>
             <th class="sorting" data-sort="address"> 地址 </th>
             <th class="sorting" data-sort="name"> 名称 </th>
+            <th class="sorting" data-sort="status"> 状态 </th>
         						<th width="22%">相关操作</th>
         					</tr>
 						</thead>
@@ -53,6 +54,7 @@
             <td>{{ $item->phone }}</td>
             <td>{{ $item->address }}</td>
             <td>{{ $item->name }}</td>
+            <td>{{ $item->status }}</td>
 								<td>
 									<div class="btn-group">
 										<button data-toggle="dropdown"
@@ -67,6 +69,10 @@
 											<li><a href="{{ U('Album/Agent/update',['id'=>$item->id])}}" class="font-bold">修改</a></li>
 											@endif
 
+											@if($item->status == '未通过')
+												<li><a href="{{ U('Album/Agent/add',['id'=>$item->id])}}" class="font-bold">通过审核</a></li>
+											@endif
+
 											@if(role('Album/Agent/destroy'))
 											<li class="divider"></li>
 											<li><a href="{{ U('Album/Agent/destroy',['id'=>$item->id])}}" onclick="return confirm('你确定执行删除操作?');">删除</a></li>