wesley.chen 7 gadi atpakaļ
vecāks
revīzija
960e775794

+ 7 - 2
app/Http/Controllers/Admin/Messages/InfoController.php

xqd xqd xqd
@@ -8,6 +8,7 @@
  */
 namespace App\Http\Controllers\Admin\Messages;
 use App\Http\Controllers\Admin\Controller;
+use App\Models\MessagesTagModel;
 use Illuminate\Http\Request;
 use App\Repositories\Base\Criteria\OrderBy;
 use App\Repositories\Messages\Criteria\MultiWhere;
@@ -56,7 +57,9 @@ class InfoController extends Controller
         if($request->method() == 'POST') {
             return $this->_createSave();
         }
-        return view('admin.messages.info.edit');
+        $tags = MessagesTagModel::orderBy('sort','desc')->get();
+
+        return view('admin.messages.info.edit',compact('tags'));
     }
 
     /**
@@ -86,7 +89,9 @@ class InfoController extends Controller
             return $this->_updateSave();
         }
         $data = $this->repository->find($request->get('id'));
-        return view('admin.messages.info.edit',compact('data'));
+        $tags = MessagesTagModel::orderBy('sort','desc')->get();
+
+        return view('admin.messages.info.edit',compact('data','tags'));
     }
 
     /**

+ 5 - 0
app/Models/MessagesInfoModel.php

xqd
@@ -47,4 +47,9 @@ class MessagesInfoModel extends BaseModel
         'sort'
     ];
 
+    public function tags()
+    {
+        return $this->belongsToMany('App\Models\MessagesTagModel', 'messages_tag_relation', 'messages_id', 'tag_id');
+    }
+
 }

+ 6 - 0
app/Models/MessagesTagModel.php

xqd
@@ -36,4 +36,10 @@ class MessagesTagModel extends BaseModel
                            'sort'
                           ];
 
+
+    public function messgaes()
+    {
+        return $this->belongsToMany('App\Models\MessagesTagModel', 'messages_tag_relation',  'tag_id', 'messages_id');
+    }
+
 }

+ 49 - 49
resources/views/admin/messages/info/edit.blade.php

xqd xqd
@@ -34,95 +34,95 @@
                         <div class="col-lg-10">
                             <form name="form_product" id="form-validation" action="" class="form-horizontal form-validation" accept-charset="UTF-8" method="post">
 
-                                    
+
                 <div class="form-group">
-                                    
+
                  <label class="control-label col-sm-3">站点ID</label>
-                                    
+
                    <div class="col-sm-9">
-                     <input id="data_site_id" name="data[site_id]" class="form-control" value="{{ $data['site_id'] or ''}}" required="" aria-required="true"  placeholder=""> 
+                     <input id="data_site_id" name="data[site_id]" class="form-control" value="{{ $data['site_id'] or ''}}" required="" aria-required="true"  placeholder="">
                     </div>
-                                
-                </div>    
+
+                </div>
                 <div class="form-group">
-                                    
+
                  <label class="control-label col-sm-3">标题</label>
-                                    
+
                    <div class="col-sm-9">
-                     <input id="data_title" name="data[title]" class="form-control" value="{{ $data['title'] or ''}}" required="" aria-required="true"  placeholder=""> 
+                     <input id="data_title" name="data[title]" class="form-control" value="{{ $data['title'] or ''}}" required="" aria-required="true"  placeholder="">
                     </div>
-                                
-                </div>    
+
+                </div>
                 <div class="form-group">
-                                    
+
                  <label class="control-label col-sm-3">内容</label>
-                                    
+
                    <div class="col-sm-9">
                      {!! editor('') !!}
-                                       
+
                      <script id="container" name="data[content]" type="text/plain">{!! $data['content'] or '' !!}</script>
-                                            
+
                     </div>
-                                
-                </div>    
+
+                </div>
                 <div class="form-group">
-                                    
+
                  <label class="control-label col-sm-3">发布人</label>
-                                    
+
                    <div class="col-sm-9">
-                     <input id="data_user_id" name="data[user_id]" class="form-control" value="{{ $data['user_id'] or ''}}" required="" aria-required="true"  placeholder=""> 
+                     <input id="data_user_id" name="data[user_id]" class="form-control" value="{{ $data['user_id'] or ''}}" required="" aria-required="true"  placeholder="">
                     </div>
-                                
-                </div>    
+
+                </div>
                 <div class="form-group">
-                                    
+
                  <label class="control-label col-sm-3">金额</label>
-                                    
+
                    <div class="col-sm-9">
-                     <input id="data_price" name="data[price]" class="form-control" value="{{ $data['price'] or ''}}" required="" aria-required="true"  placeholder=""> 
+                     <input id="data_price" name="data[price]" class="form-control" value="{{ $data['price'] or ''}}" required="" aria-required="true"  placeholder="">
                     </div>
-                                
-                </div>    
+
+                </div>
                 <div class="form-group">
-                                    
+
                  <label class="control-label col-sm-3"></label>
-                                    
+
                    <div class="col-sm-9">
-                     <input id="data_phone" name="data[phone]" class="form-control" value="{{ $data['phone'] or ''}}" required="" aria-required="true"  placeholder=""> 
+                     <input id="data_phone" name="data[phone]" class="form-control" value="{{ $data['phone'] or ''}}" required="" aria-required="true"  placeholder="">
                     </div>
-                                
-                </div>    
+
+                </div>
                 <div class="form-group">
-                                    
+
                  <label class="control-label col-sm-3">付费信息</label>
-                                    
+
                    <div class="col-sm-9">
                      {!! editor('') !!}
-                                       
+
                      <script id="container" name="data[comment]" type="text/plain">{!! $data['comment'] or '' !!}</script>
-                                            
+
                     </div>
-                                
-                </div>    
+
+                </div>
                 <div class="form-group">
-                                    
+
                  <label class="control-label col-sm-3">类型:0:免费;1:付费;2:收费</label>
-                                    
+
                    <div class="col-sm-9">
-                     <input id="data_type" name="data[type]" class="form-control" value="{{ $data['type'] or ''}}" required="" aria-required="true"  placeholder=""> 
+                     <input id="data_type" name="data[type]" class="form-control" value="{{ $data['type'] or ''}}" required="" aria-required="true"  placeholder="">
                     </div>
-                                
-                </div>    
+
+                </div>
                 <div class="form-group">
-                                    
+
                  <label class="control-label col-sm-3">排序:越大越靠前</label>
-                                    
+
                    <div class="col-sm-9">
-                     <input id="data_sort" name="data[sort]" class="form-control" value="{{ $data['sort'] or ''}}" required="" aria-required="true"  placeholder=""> 
+                     <input id="data_sort" name="data[sort]" class="form-control" value="{{ $data['sort'] or ''}}" required="" aria-required="true"  placeholder="">
                     </div>
-                                
+
                 </div>
-                                
+
                                 <div class="form-group">
                                     <label class="control-label col-sm-3">&nbsp;</label>
                                     <div class="col-sm-9">
@@ -132,7 +132,7 @@
                                         <input type="reset" class="btn btn-default" >
                                     </div>
                                 </div>
-        
+
                             </form>
                         </div>
                         <!-- /.col-lg-10 -->

+ 74 - 94
resources/views/admin/messages/info/index.blade.php

xqd
@@ -1,105 +1,85 @@
-@extends('admin.layout') 
+@extends('admin.layout')
 
 @section('content')
-	<div class="row">
-		<div class="col-sm-12">
-			<div class="ibox float-e-margins">
-				<div class="ibox-title">
-					<h5>信息列表</h5>
-					<div class="ibox-tools">
-						<a class="collapse-link"> <i class="fa fa-chevron-up"></i>
-						</a>
-					</div>
-				</div>
-				<div class="ibox-content">
-				    <div class="row">
-				        <form method="GET" action="" accept-charset="UTF-8">
+    <div class="row">
+        <div class="col-sm-12">
+            <div class="ibox float-e-margins">
+                <div class="ibox-title">
+                    <h5>信息列表</h5>
+                    <div class="ibox-tools">
+                        <a class="collapse-link"> <i class="fa fa-chevron-up"></i>
+                        </a>
+                    </div>
+                </div>
+                <div class="ibox-content">
+                    <div class="row">
+                        <form method="GET" action="" accept-charset="UTF-8">
 
-				        <div class="col-sm-4">
-				            <div class="input-group">
-								<input type="text" value="{{Request::get('keyword')}}"	placeholder="请输入关键词" name="keyword"class="input-sm form-control"> 
-								<span class="input-group-btn">
+                            <div class="col-sm-4">
+                                <div class="input-group">
+                                    <input type="text" value="{{Request::get('keyword')}}" placeholder="请输入关键词"
+                                           name="keyword" class="input-sm form-control">
+                                    <span class="input-group-btn">
 									<button type="submit" class="btn btn-sm btn-primary">搜索</button>
 								</span>
-    						</div>
-				        </div>
-				        </form>
-						@if(role('Messages/Info/create'))
-    					<div class="col-sm-3 pull-right">
-    					   <a href="{{ U('Messages/Info/create')}}" class="btn btn-sm btn-primary pull-right">添加</a>
-    					</div>
-						@endif
-					</div>
-					
-					<table class="table table-striped table-bordered table-hover dataTables-example dataTable">
-						<thead>
-    						<tr>
-								
-            <th class="sorting" data-sort="id"> ID </th>
-            <th class="sorting" data-sort="site_id"> 站点ID </th>
-            <th class="sorting" data-sort="title"> 标题 </th>
-            <th class="sorting" data-sort="user_id"> 发布人 </th>
-            <th class="sorting" data-sort="price"> 金额 </th>
-            <th class="sorting" data-sort="phone">  </th>
-            <th class="sorting" data-sort="type"> 类型:0:免费;1:付费;2:收费 </th>
-        						<th width="22%">相关操作</th>
-        					</tr>
-						</thead>
-						<tbody>
-						@if(isset($list))
-							@foreach($list as $key => $item)							<tr>
-								
-            <td>{{ $item->id }}</td>
-            <td>{{ $item->site_id }}</td>
-            <td>{{ $item->title }}</td>
-            <td>{{ $item->user_id }}</td>
-            <td>{{ $item->price }}</td>
-            <td>{{ $item->phone }}</td>
-            <td>{{ $item->type }}</td>
-								<td>
-									<div class="btn-group">
-										<button data-toggle="dropdown"
-											class="btn btn-warning btn-sm dropdown-toggle"
-											aria-expanded="false">
-											操作 <span class="caret"></span>
-										</button>
-										<ul class="dropdown-menu">
+                                </div>
+                            </div>
+                        </form>
 
+                    </div>
 
-											@if(role('Messages/Info/update'))
-											<li><a href="{{ U('Messages/Info/update',['id'=>$item->id])}}" class="font-bold">修改</a></li>
-											@endif
+                    <table class="table table-striped table-bordered table-hover dataTables-example dataTable">
+                        <thead>
+                        <tr>
 
-											@if(role('Messages/Info/destroy'))
-											<li class="divider"></li>
-											<li><a href="{{ U('Messages/Info/destroy',['id'=>$item->id])}}" onclick="return confirm('你确定执行删除操作?');">删除</a></li>
-											@endif
+                            <th class="sorting" data-sort="id"> ID</th>
+                            <th class="sorting" data-sort="title"> 标题</th>
+                            <th class="sorting" data-sort="user_id">发布人</th>
+                            <th class="sorting" data-sort="price"> 金额</th>
+                            <th class="sorting" data-sort="phone">联系方式</th>
+                            <th class="sorting" data-sort="type"> 类型:0:免费;1:付费;2:收费</th>
+                            <th width="22%">相关操作</th>
+                        </tr>
+                        </thead>
+                        <tbody>
+                        @if(isset($list))
+                            @foreach($list as $key => $item)
+                                <tr>
 
-										</ul>
-									</div>
-								@if(role('Messages/Info/view'))
-										<button onclick="layer.open({type: 2,area: ['80%', '90%'],content: '{{ U('Messages/Info/view',['id'=>$item->id])}}'});"  class="btn btn-primary ">查看</button>
-									@endif
-								</td>
-							</tr>
-							@endforeach
-							@endif
+                                    <td>{{ $item->id }}</td>
+                                    <td>{{ $item->title }}</td>
+                                    <td>{{ $item->user_id }}</td>
+                                    <td>{{ $item->price }}</td>
+                                    <td>{{ $item->phone }}</td>
+                                    <td>{{ $item->type }}</td>
+                                    <td>
+                                        @if(role('Messages/Info/view'))
+                                            <button onclick="layer.open({type: 2,area: ['80%', '90%'],content: '{{ U('Messages/Info/view',['id'=>$item->id])}}'});"
+                                                    class="btn btn-primary ">查看
+                                            </button>
+                                        @endif
+                                    </td>
+                                </tr>
+                            @endforeach
+                        @endif
 
-						</tbody>
-					</table>
-					<div class="row">
-						<div class="col-sm-6">
-							<div class="dataTables_info" id="DataTables_Table_0_info"
-								role="alert" aria-live="polite" aria-relevant="all">每页{{ $list->count() }}条,共{{ $list->lastPage() }}页,总{{ $list->total() }}条。</div>
-						</div>
-						<div class="col-sm-6">
-						<div class="dataTables_paginate paging_simple_numbers" id="DataTables_Table_0_paginate">
-						{!! $list->setPath('')->appends(Request::all())->render() !!}
-						</div>
-						</div>
-					</div>
-				</div>
-			</div>
-		</div>
-	</div>
+                        </tbody>
+                    </table>
+                    <div class="row">
+                        <div class="col-sm-6">
+                            <div class="dataTables_info" id="DataTables_Table_0_info"
+                                 role="alert" aria-live="polite" aria-relevant="all">每页{{ $list->count() }}
+                                条,共{{ $list->lastPage() }}页,总{{ $list->total() }}条。
+                            </div>
+                        </div>
+                        <div class="col-sm-6">
+                            <div class="dataTables_paginate paging_simple_numbers" id="DataTables_Table_0_paginate">
+                                {!! $list->setPath('')->appends(Request::all())->render() !!}
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
 @endsection

+ 1 - 10
resources/views/admin/messages/tag/edit.blade.php

xqd
@@ -34,16 +34,7 @@
                         <div class="col-lg-10">
                             <form name="form_product" id="form-validation" action="" class="form-horizontal form-validation" accept-charset="UTF-8" method="post">
 
-                                    
-                <div class="form-group">
-                                    
-                 <label class="control-label col-sm-3">站点ID</label>
-                                    
-                   <div class="col-sm-9">
-                     <input id="data_site_id" name="data[site_id]" class="form-control" value="{{ $data['site_id'] or ''}}" required="" aria-required="true"  placeholder=""> 
-                    </div>
-                                
-                </div>    
+
                 <div class="form-group">
                                     
                  <label class="control-label col-sm-3">名称</label>

+ 98 - 92
resources/views/admin/messages/tag/index.blade.php

xqd
@@ -1,103 +1,109 @@
-@extends('admin.layout') 
+@extends('admin.layout')
 
 @section('content')
-	<div class="row">
-		<div class="col-sm-12">
-			<div class="ibox float-e-margins">
-				<div class="ibox-title">
-					<h5>标签列表</h5>
-					<div class="ibox-tools">
-						<a class="collapse-link"> <i class="fa fa-chevron-up"></i>
-						</a>
-					</div>
-				</div>
-				<div class="ibox-content">
-				    <div class="row">
-				        <form method="GET" action="" accept-charset="UTF-8">
+    <div class="row">
+        <div class="col-sm-12">
+            <div class="ibox float-e-margins">
+                <div class="ibox-title">
+                    <h5>标签列表</h5>
+                    <div class="ibox-tools">
+                        <a class="collapse-link"> <i class="fa fa-chevron-up"></i>
+                        </a>
+                    </div>
+                </div>
+                <div class="ibox-content">
+                    <div class="row">
+                        <form method="GET" action="" accept-charset="UTF-8">
 
-				        <div class="col-sm-4">
-				            <div class="input-group">
-								<input type="text" value="{{Request::get('keyword')}}"	placeholder="请输入关键词" name="keyword"class="input-sm form-control"> 
-								<span class="input-group-btn">
+                            <div class="col-sm-4">
+                                <div class="input-group">
+                                    <input type="text" value="{{Request::get('keyword')}}" placeholder="请输入关键词"
+                                           name="keyword" class="input-sm form-control">
+                                    <span class="input-group-btn">
 									<button type="submit" class="btn btn-sm btn-primary">搜索</button>
 								</span>
-    						</div>
-				        </div>
-				        </form>
-						@if(role('Messages/Tag/create'))
-    					<div class="col-sm-3 pull-right">
-    					   <a href="{{ U('Messages/Tag/create')}}" class="btn btn-sm btn-primary pull-right">添加</a>
-    					</div>
-						@endif
-					</div>
-					
-					<table class="table table-striped table-bordered table-hover dataTables-example dataTable">
-						<thead>
-    						<tr>
-								
-            <th class="sorting" data-sort="id"> ID </th>
-            <th class="sorting" data-sort="site_id"> 站点ID </th>
-            <th class="sorting" data-sort="name"> 名称 </th>
-            <th class="sorting" data-sort="sort"> 排序:越大越靠前 </th>
-            <th class="sorting" data-sort="created_at"> 创建时间 </th>
-            <th class="sorting" data-sort="updated_at"> 更新时间 </th>
-        						<th width="22%">相关操作</th>
-        					</tr>
-						</thead>
-						<tbody>
-						@if(isset($list))
-							@foreach($list as $key => $item)							<tr>
-								
-            <td>{{ $item->id }}</td>
-            <td>{{ $item->site_id }}</td>
-            <td>{{ $item->name }}</td>
-            <td>{{ $item->sort }}</td>
-            <td>{{ $item->created_at }}</td>
-            <td>{{ $item->updated_at }}</td>
-								<td>
-									<div class="btn-group">
-										<button data-toggle="dropdown"
-											class="btn btn-warning btn-sm dropdown-toggle"
-											aria-expanded="false">
-											操作 <span class="caret"></span>
-										</button>
-										<ul class="dropdown-menu">
+                                </div>
+                            </div>
+                        </form>
+                        @if(role('Messages/Tag/create'))
+                            <div class="col-sm-3 pull-right">
+                                <a href="{{ U('Messages/Tag/create')}}" class="btn btn-sm btn-primary pull-right">添加</a>
+                            </div>
+                        @endif
+                    </div>
 
+                    <table class="table table-striped table-bordered table-hover dataTables-example dataTable">
+                        <thead>
+                        <tr>
 
-											@if(role('Messages/Tag/update'))
-											<li><a href="{{ U('Messages/Tag/update',['id'=>$item->id])}}" class="font-bold">修改</a></li>
-											@endif
+                            <th class="sorting" data-sort="id"> ID</th>
+                            <th class="sorting" data-sort="name"> 名称</th>
+                            <th class="sorting" data-sort="sort"> 排序:越大越靠前</th>
+                            <th class="sorting" data-sort="created_at"> 创建时间</th>
+                            <th class="sorting" data-sort="updated_at"> 更新时间</th>
+                            <th width="22%">相关操作</th>
+                        </tr>
+                        </thead>
+                        <tbody>
+                        @if(isset($list))
+                            @foreach($list as $key => $item)
+                                <tr>
 
-											@if(role('Messages/Tag/destroy'))
-											<li class="divider"></li>
-											<li><a href="{{ U('Messages/Tag/destroy',['id'=>$item->id])}}" onclick="return confirm('你确定执行删除操作?');">删除</a></li>
-											@endif
+                                    <td>{{ $item->id }}</td>
+                                    <td>{{ $item->name }}</td>
+                                    <td>{{ $item->sort }}</td>
+                                    <td>{{ $item->created_at }}</td>
+                                    <td>{{ $item->updated_at }}</td>
+                                    <td>
+                                        <div class="btn-group">
+                                            <button data-toggle="dropdown"
+                                                    class="btn btn-warning btn-sm dropdown-toggle"
+                                                    aria-expanded="false">
+                                                操作 <span class="caret"></span>
+                                            </button>
+                                            <ul class="dropdown-menu">
 
-										</ul>
-									</div>
-								@if(role('Messages/Tag/view'))
-										<button onclick="layer.open({type: 2,area: ['80%', '90%'],content: '{{ U('Messages/Tag/view',['id'=>$item->id])}}'});"  class="btn btn-primary ">查看</button>
-									@endif
-								</td>
-							</tr>
-							@endforeach
-							@endif
 
-						</tbody>
-					</table>
-					<div class="row">
-						<div class="col-sm-6">
-							<div class="dataTables_info" id="DataTables_Table_0_info"
-								role="alert" aria-live="polite" aria-relevant="all">每页{{ $list->count() }}条,共{{ $list->lastPage() }}页,总{{ $list->total() }}条。</div>
-						</div>
-						<div class="col-sm-6">
-						<div class="dataTables_paginate paging_simple_numbers" id="DataTables_Table_0_paginate">
-						{!! $list->setPath('')->appends(Request::all())->render() !!}
-						</div>
-						</div>
-					</div>
-				</div>
-			</div>
-		</div>
-	</div>
+                                                @if(role('Messages/Tag/update'))
+                                                    <li><a href="{{ U('Messages/Tag/update',['id'=>$item->id])}}"
+                                                           class="font-bold">修改</a></li>
+                                                @endif
+
+                                                @if(role('Messages/Tag/destroy'))
+                                                    <li class="divider"></li>
+                                                    <li><a href="{{ U('Messages/Tag/destroy',['id'=>$item->id])}}"
+                                                           onclick="return confirm('你确定执行删除操作?');">删除</a></li>
+                                                @endif
+
+                                            </ul>
+                                        </div>
+                                        @if(role('Messages/Tag/view'))
+                                            <button onclick="layer.open({type: 2,area: ['80%', '90%'],content: '{{ U('Messages/Tag/view',['id'=>$item->id])}}'});"
+                                                    class="btn btn-primary ">查看
+                                            </button>
+                                        @endif
+                                    </td>
+                                </tr>
+                            @endforeach
+                        @endif
+
+                        </tbody>
+                    </table>
+                    <div class="row">
+                        <div class="col-sm-6">
+                            <div class="dataTables_info" id="DataTables_Table_0_info"
+                                 role="alert" aria-live="polite" aria-relevant="all">每页{{ $list->count() }}
+                                条,共{{ $list->lastPage() }}页,总{{ $list->total() }}条。
+                            </div>
+                        </div>
+                        <div class="col-sm-6">
+                            <div class="dataTables_paginate paging_simple_numbers" id="DataTables_Table_0_paginate">
+                                {!! $list->setPath('')->appends(Request::all())->render() !!}
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
 @endsection

+ 2 - 14
resources/views/admin/messages/tag/view.blade.php

xqd xqd
@@ -12,13 +12,7 @@
                    <p class="list-group-item-text"> {{ $data['id'] or ''}}</p>
                                                  
                </div>                     
-               <div class="list-group-item">
-                                                  
-                   <h3 class="list-group-item-heading">站点ID</h3>
-                                                   
-                   <p class="list-group-item-text"> {{ $data['site_id'] or ''}}</p>
-                                                 
-               </div>                     
+
                <div class="list-group-item">
                                                   
                    <h3 class="list-group-item-heading">名称</h3>
@@ -33,13 +27,7 @@
                    <p class="list-group-item-text"> {{ $data['sort'] or ''}}</p>
                                                  
                </div>                     
-               <div class="list-group-item">
-                                                  
-                   <h3 class="list-group-item-heading"></h3>
-                                                   
-                   <p class="list-group-item-text"> {{ $data['deleted_at'] or ''}}</p>
-                                                 
-               </div>                     
+
                <div class="list-group-item">
                                                   
                    <h3 class="list-group-item-heading">创建时间</h3>

+ 74 - 95
resources/views/admin/payment/info/index.blade.php

xqd
@@ -1,105 +1,84 @@
-@extends('admin.layout') 
+@extends('admin.layout')
 
 @section('content')
-	<div class="row">
-		<div class="col-sm-12">
-			<div class="ibox float-e-margins">
-				<div class="ibox-title">
-					<h5>支付列表</h5>
-					<div class="ibox-tools">
-						<a class="collapse-link"> <i class="fa fa-chevron-up"></i>
-						</a>
-					</div>
-				</div>
-				<div class="ibox-content">
-				    <div class="row">
-				        <form method="GET" action="" accept-charset="UTF-8">
+    <div class="row">
+        <div class="col-sm-12">
+            <div class="ibox float-e-margins">
+                <div class="ibox-title">
+                    <h5>支付列表</h5>
+                    <div class="ibox-tools">
+                        <a class="collapse-link"> <i class="fa fa-chevron-up"></i>
+                        </a>
+                    </div>
+                </div>
+                <div class="ibox-content">
+                    <div class="row">
+                        <form method="GET" action="" accept-charset="UTF-8">
 
-				        <div class="col-sm-4">
-				            <div class="input-group">
-								<input type="text" value="{{Request::get('keyword')}}"	placeholder="请输入关键词" name="keyword"class="input-sm form-control"> 
-								<span class="input-group-btn">
+                            <div class="col-sm-4">
+                                <div class="input-group">
+                                    <input type="text" value="{{Request::get('keyword')}}" placeholder="请输入关键词"
+                                           name="keyword" class="input-sm form-control">
+                                    <span class="input-group-btn">
 									<button type="submit" class="btn btn-sm btn-primary">搜索</button>
 								</span>
-    						</div>
-				        </div>
-				        </form>
-						@if(role('Payment/Info/create'))
-    					<div class="col-sm-3 pull-right">
-    					   <a href="{{ U('Payment/Info/create')}}" class="btn btn-sm btn-primary pull-right">添加</a>
-    					</div>
-						@endif
-					</div>
-					
-					<table class="table table-striped table-bordered table-hover dataTables-example dataTable">
-						<thead>
-    						<tr>
-								
-            <th class="sorting" data-sort="id"> ID </th>
-            <th class="sorting" data-sort="site_id"> 站点ID </th>
-            <th class="sorting" data-sort="user_id"> 用户ID </th>
-            <th class="sorting" data-sort="openid"> 用户openid </th>
-            <th class="sorting" data-sort="out_trade_no"> 支付订单 </th>
-            <th class="sorting" data-sort="price"> 支付金额 </th>
-            <th class="sorting" data-sort="created_at"> 创建时间 </th>
-        						<th width="22%">相关操作</th>
-        					</tr>
-						</thead>
-						<tbody>
-						@if(isset($list))
-							@foreach($list as $key => $item)							<tr>
-								
-            <td>{{ $item->id }}</td>
-            <td>{{ $item->site_id }}</td>
-            <td>{{ $item->user_id }}</td>
-            <td>{{ $item->openid }}</td>
-            <td>{{ $item->out_trade_no }}</td>
-            <td>{{ $item->price }}</td>
-            <td>{{ $item->created_at }}</td>
-								<td>
-									<div class="btn-group">
-										<button data-toggle="dropdown"
-											class="btn btn-warning btn-sm dropdown-toggle"
-											aria-expanded="false">
-											操作 <span class="caret"></span>
-										</button>
-										<ul class="dropdown-menu">
+                                </div>
+                            </div>
+                        </form>
+                    </div>
 
+                    <table class="table table-striped table-bordered table-hover dataTables-example dataTable">
+                        <thead>
+                        <tr>
 
-											@if(role('Payment/Info/update'))
-											<li><a href="{{ U('Payment/Info/update',['id'=>$item->id])}}" class="font-bold">修改</a></li>
-											@endif
+                            <th class="sorting" data-sort="id"> ID</th>
+                            <th class="sorting" data-sort="user_id"> 用户ID</th>
+                            <th class="sorting" data-sort="openid"> 用户openid</th>
+                            <th class="sorting" data-sort="out_trade_no"> 支付订单号</th>
+                            <th class="sorting" data-sort="price"> 支付金额</th>
+                            <th class="sorting" data-sort="created_at"> 创建时间</th>
+                            <th width="22%">相关操作</th>
+                        </tr>
+                        </thead>
+                        <tbody>
+                        @if(isset($list))
+                            @foreach($list as $key => $item)
+                                <tr>
 
-											@if(role('Payment/Info/destroy'))
-											<li class="divider"></li>
-											<li><a href="{{ U('Payment/Info/destroy',['id'=>$item->id])}}" onclick="return confirm('你确定执行删除操作?');">删除</a></li>
-											@endif
+                                    <td>{{ $item->id }}</td>
+                                    <td>{{ $item->user_id }}</td>
+                                    <td>{{ $item->openid }}</td>
+                                    <td>{{ $item->out_trade_no }}</td>
+                                    <td>{{ $item->price }}</td>
+                                    <td>{{ $item->created_at }}</td>
+                                    <td>
+                                        @if(role('Payment/Info/view'))
+                                            <button onclick="layer.open({type: 2,area: ['80%', '90%'],content: '{{ U('Payment/Info/view',['id'=>$item->id])}}'});"
+                                                    class="btn btn-primary ">查看
+                                            </button>
+                                        @endif
+                                    </td>
+                                </tr>
+                            @endforeach
+                        @endif
 
-										</ul>
-									</div>
-								@if(role('Payment/Info/view'))
-										<button onclick="layer.open({type: 2,area: ['80%', '90%'],content: '{{ U('Payment/Info/view',['id'=>$item->id])}}'});"  class="btn btn-primary ">查看</button>
-									@endif
-								</td>
-							</tr>
-							@endforeach
-							@endif
-
-						</tbody>
-					</table>
-					<div class="row">
-						<div class="col-sm-6">
-							<div class="dataTables_info" id="DataTables_Table_0_info"
-								role="alert" aria-live="polite" aria-relevant="all">每页{{ $list->count() }}条,共{{ $list->lastPage() }}页,总{{ $list->total() }}条。</div>
-						</div>
-						<div class="col-sm-6">
-						<div class="dataTables_paginate paging_simple_numbers" id="DataTables_Table_0_paginate">
-						{!! $list->setPath('')->appends(Request::all())->render() !!}
-						</div>
-						</div>
-					</div>
-				</div>
-			</div>
-		</div>
-	</div>
+                        </tbody>
+                    </table>
+                    <div class="row">
+                        <div class="col-sm-6">
+                            <div class="dataTables_info" id="DataTables_Table_0_info"
+                                 role="alert" aria-live="polite" aria-relevant="all">每页{{ $list->count() }}
+                                条,共{{ $list->lastPage() }}页,总{{ $list->total() }}条。
+                            </div>
+                        </div>
+                        <div class="col-sm-6">
+                            <div class="dataTables_paginate paging_simple_numbers" id="DataTables_Table_0_paginate">
+                                {!! $list->setPath('')->appends(Request::all())->render() !!}
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
 @endsection

+ 76 - 99
resources/views/admin/user/info/index.blade.php

xqd
@@ -1,112 +1,89 @@
-@extends('admin.layout') 
+@extends('admin.layout')
 
 @section('content')
-<div class="wrapper wrapper-content animated fadeInRight">
-	<div class="row">
-		<div class="col-sm-12">
-			<div class="ibox float-e-margins">
-				<div class="ibox-title">
-					<h5>用户管理</h5>
-					<div class="ibox-tools">
-						<a class="collapse-link"> <i class="fa fa-chevron-up"></i>
-						</a>
-					</div>
-				</div>
-				<div class="ibox-content">
-				    <div class="row">
-				        <form method="GET" action="" accept-charset="UTF-8">
+    <div class="wrapper wrapper-content animated fadeInRight">
+        <div class="row">
+            <div class="col-sm-12">
+                <div class="ibox float-e-margins">
+                    <div class="ibox-title">
+                        <h5>用户管理</h5>
+                        <div class="ibox-tools">
+                            <a class="collapse-link"> <i class="fa fa-chevron-up"></i>
+                            </a>
+                        </div>
+                    </div>
+                    <div class="ibox-content">
+                        <div class="row">
+                            <form method="GET" action="" accept-charset="UTF-8">
 
-				        <div class="col-sm-4">
-				            <div class="input-group">
-								<input type="text" value="{{Request::get('keyword')}}"	placeholder="请输入关键词" name="keyword"class="input-sm form-control"> 
-								<span class="input-group-btn">
+                                <div class="col-sm-4">
+                                    <div class="input-group">
+                                        <input type="text" value="{{Request::get('keyword')}}" placeholder="请输入关键词"
+                                               name="keyword" class="input-sm form-control">
+                                        <span class="input-group-btn">
 									<button type="submit" class="btn btn-sm btn-primary">搜索</button>
 								</span>
-    						</div>
-				        </div>
-				        </form>
-						@if(role('User/Info/create'))
-    					<div class="col-sm-3 pull-right">
-    					   <a href="{{ U('User/Info/create')}}" class="btn btn-sm btn-primary pull-right">添加</a>
-    					</div>
-						@endif
-					</div>
-					
-					<table class="table table-striped table-bordered table-hover dataTables-example dataTable">
-						<thead>
-    						<tr>
-								
-            <th class="sorting" data-sort="id"> 用户ID </th>
-            <th class="sorting" data-sort="real_name"> 姓名 </th>
-            <th class="sorting" data-sort="email"> EMAIL </th>
-            <th class="sorting" data-sort="mobile"> 手机号 </th>
-            <th class="sorting" data-sort="idcard_back"> 工作类型 </th>
-            <th class="sorting" data-sort="educational"> 学历 </th>
-								<th class="sorting" data-sort="last_login_time"> 最后登陆时间 </th>
+                                    </div>
+                                </div>
+                            </form>
+                        </div>
 
-        						<th width="22%">相关操作</th>
-        					</tr>
-						</thead>
-						<tbody>
+                        <table class="table table-striped table-bordered table-hover dataTables-example dataTable">
+                            <thead>
+                            <tr>
 
-						@if(isset($list))
-							@foreach($list as $key => $item)
-								<tr>
-									<td>{{ $item->id }}</td>
-									<td>{{ $item->real_name }}</td>
-									<td>{{ $item->email }}</td>
-									<td>{{ $item->mobile }}</td>
-									<td>{{ dict()->get('user_info','work_type',$item->work_type) }}</td>
-									<td>{{ $item->educational }}</td>
-									<td>{{ $item->last_login_time }}</td>
-									<td>{{ $item->created_at->format('Y-m-d H:i:s') }}</td>
+                                <th class="sorting" data-sort="id"> 用户ID</th>
+                                <th class="sorting" data-sort="nickname"> 昵称</th>
+                                <th class="sorting" data-sort="avatar"> 头像</th>
+                                <th class="sorting" data-sort="mobile"> 手机号</th>
+                                <th class="sorting" data-sort="last_login_time"> 最后登陆时间</th>
 
+                            </tr>
+                            </thead>
+                            <tbody>
 
-								<td>
-									<div class="btn-group">
-										<button data-toggle="dropdown"
-											class="btn btn-warning btn-sm dropdown-toggle"
-											aria-expanded="false">
-											操作 <span class="caret"></span>
-										</button>
-										<ul class="dropdown-menu">
+                            @if(isset($list))
+                                @foreach($list as $key => $item)
+                                    <tr>
+                                        <td>{{ $item->id }}</td>
+                                        <td>{{ $item->nickname }}</td>
+                                        <td><img src="{{ $item->avatar }}" style="height: 50px"></td>
+                                        <td>{{ $item->mobile }}</td>
+                                        <td>{{ $item->last_login_time }}</td>
+                                        <td>{{ $item->created_at->format('Y-m-d H:i:s') }}</td>
 
+                                        <td>
+                                            <div class="btn-group">
+                                                <button data-toggle="dropdown"
+                                                        class="btn btn-warning btn-sm dropdown-toggle"
+                                                        aria-expanded="false">
+                                                    操作 <span class="caret"></span>
+                                                </button>
 
-											@if(role('User/Info/update'))
-											<li><a href="{{ U('User/Info/update',['id'=>$item->id])}}" class="font-bold">修改</a></li>
-											@endif
+                                            </div>
+                                        </td>
+                                    </tr>
+                                @endforeach
+                            @endif
 
-											@if(role('User/Info/destroy'))
-											<li class="divider"></li>
-											<li><a href="{{ U('User/Info/destroy',['id'=>$item->id])}}" onclick="return confirm('你确定执行删除操作?');">删除</a></li>
-											@endif
-
-										</ul>
-									</div>
-								@if(role('User/Info/view'))
-										<button onclick="layer.open({type: 2,area: ['80%', '90%'],content: '{{ U('User/Info/view',['id'=>$item->id])}}'});"  class="btn btn-primary ">查看</button>
-									@endif
-								</td>
-							</tr>
-							@endforeach
-							@endif
-
-						</tbody>
-					</table>
-					<div class="row">
-						<div class="col-sm-6">
-							<div class="dataTables_info" id="DataTables_Table_0_info"
-								role="alert" aria-live="polite" aria-relevant="all">每页{{ $list->count() }}条,共{{ $list->lastPage() }}页,总{{ $list->total() }}条。</div>
-						</div>
-						<div class="col-sm-6">
-						<div class="dataTables_paginate paging_simple_numbers" id="DataTables_Table_0_paginate">
-						{!! $list->setPath('')->appends(Request::all())->render() !!}
-						</div>
-						</div>
-					</div>
-				</div>
-			</div>
-		</div>
-	</div>
-</div>
+                            </tbody>
+                        </table>
+                        <div class="row">
+                            <div class="col-sm-6">
+                                <div class="dataTables_info" id="DataTables_Table_0_info"
+                                     role="alert" aria-live="polite" aria-relevant="all">每页{{ $list->count() }}
+                                    条,共{{ $list->lastPage() }}页,总{{ $list->total() }}条。
+                                </div>
+                            </div>
+                            <div class="col-sm-6">
+                                <div class="dataTables_paginate paging_simple_numbers" id="DataTables_Table_0_paginate">
+                                    {!! $list->setPath('')->appends(Request::all())->render() !!}
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
 @endsection