123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171 |
- @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="col-sm-4">
- <div class="input-group">
- <input type="text" value="{{Request::get('keyword')}}" placeholder="id/昵称" 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>
- <div class="col-sm-4">
- <div class="input-group">
- <input type="text" name="msg" id="msg" class="input-sm form-control" placeholder="请再此编写系统消息...">
- <span class="input-group-btn">
- <button type="button" id="sendmsg" class="btn btn-sm btn-primary">发送消息</button>
- </span>
- </div>
- </div>
- </form>
- <div class="col-sm-3 pull-right">
- <a href="{{ U('User/Info/create')}}" class="btn btn-sm btn-primary pull-right">添加</a>
- </div>
- </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="nickname"> 昵称 </th>
- <th class="sorting" data-sort="avatar"> 头像 </th>
- <th class="sorting" data-sort="sex"> 性别 </th>
- <th class="sorting" data-sort="birthday"> 年龄 </th>
- <th class="sorting" data-sort="signture"> 个性签名 </th>
- <th class="sorting" data-sort="height"> 身高 </th>
- <th class="sorting" data-sort="work"> 职业 </th>
- <th class="sorting" data-sort="emotion"> 情感状态 </th>
- <th class="sorting" data-sort="city"> 所在城市 </th>
- <th class="sorting" data-sort="phone"> 手机号 </th>
- <th class="sorting" data-sort="coin"> 剩余梦想币 </th>
- <th class="sorting" data-sort="coin"> 发布梦想条数 </th>
- <th class="sorting" data-sort="coin"> 捐赠分数 </th>
- <th class="sorting" data-sort="coin"> 得到的梦想币 </th>
- <th class="sorting" data-sort="coin"> 状态 </th>
- <th width="22%">相关操作</th>
- </tr>
- </thead>
- <tbody>
- @if(isset($list))
- @foreach($list as $key => $item)
- <tr>
- <td>{{ $item->id }}</td>
- <td>{{ $item->nickname }}</td>
- <td>
- <a href="{{ $item->avatar }}" target="_blank">
- <img style="width: 40%;height: 40%;" src="{{ $item->avatar }}" alt="">
- </a>
- </td>
- <td>{{ dict()->get('user_info','sex',$item->sex) }}</td>
- <td>{{ $item->birthday }}</td>
- <td>{{ $item->signture }}</td>
- <td>{{ $item->height }}cm</td>
- <td>{{ $item->work }}</td>
- <td>{{ dict()->get('user_info','emotion',$item->emotion) }}</td>
- <td>{{ $item->city }}</td>
- <td>{{ $item->phone }}</td>
- <td>{{ $item->coin }}</td>
- <td>{{ $item->dream_number }}</td>
- <td>{{ $item->sup_score }}</td>
- <td>{{ $item->get_coin }}</td>
- <td>{{ $item->status == 1 ? '正常' : '禁用' }}</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">
- @if(role('User/Info/update'))
- <li><a href="{{ U('User/Info/update',['id'=>$item->id])}}" class="font-bold">修改</a></li>
- @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
- <button onclick="layer.open({type: 2,area: ['80%', '90%'],content: '{{ U('Account_logs/Info/index',['id'=>$item->id])}}'});" class="btn btn-primary ">充值记录</button>
- </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>
- @endsection
- @section('footer')
- <script>
- $(document).ready(function(){
- $('#sendmsg').click(function(){
- if($('#msg').val()==''){
- alert("请填写消息内容!");
- return;
- }
- $.ajax({
- type:'get',
- url:'/admin/system/system_info',
- data:{
- msg:$('#msg').val(),
- },
- success:function(res){
- if(res == 200){
- alert('群发成功');
- }
- if(res == 500){
- alert('群发异常');
- }
- if (res == 404){
- alert("符合条件的用户不存在!");
- }
- },
- error:function(){
- alert('发送异常!');
- }
- });
- });
- });
- </script>
- @endsection
|