list.php 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <?php
  2. use common\services\xhMerchantService;
  3. use common\services\xhCouponService;
  4. use common\services\xhUserService;
  5. use common\services\xhUserAssetService;
  6. use common\components\stringUtil;
  7. ?>
  8. <div class="panel panel-default">
  9. <div class="panel-body">
  10. <div class="dataTables_wrapper form-inline dt-bootstrap no-footer">
  11. <div class="row">
  12. <form action="" method="GET">
  13. <div class="col-xs-6" style="width:90%;">
  14. <div class="dataTables_length">
  15. <label>类型: <select name="class" class="form-control">
  16. <option <?php if(isset($_GET['class']) && $_GET['class'] == -1){ echo 'selected="selected"'; }?> value="-1">全部</option>
  17. <option <?php if(isset($_GET['class']) && $_GET['class'] == 1){ echo 'selected="selected"'; }?> value="1">会员</option>
  18. </select>
  19. </label>
  20. <label>昵称/手机号:<input type="search" value="<?php if(isset($_GET['content'])){ echo $_GET['content']; } ?>" class="form-control" name="content" placeholder=""></label>
  21. <input class="btn btn-secondary btn-single" type="submit" name="" value="搜索" />
  22. </div>
  23. </div>
  24. </form>
  25. </div>
  26. <div class="table-responsive">
  27. <table class="table table-bordered table-striped table-hover" >
  28. <thead>
  29. <tr class="active">
  30. <th class="no-sorting hidden-xs"><input name="selectAll" type="checkbox"></th>
  31. <th class="hidden-xs">商家</th>
  32. <th class="hidden-xs">ID</th>
  33. <th class="hidden-xs">头像</th>
  34. <th>昵称</th>
  35. <th class="hidden-xs">手机号</th>
  36. <th class="hidden-xs">等级</th>
  37. <th class="hidden-xs">积分</th>
  38. <th class="hidden-xs">粉丝</th>
  39. <th class="hidden-xs">关注时间</th>
  40. <th>操作</th>
  41. </tr>
  42. </thead>
  43. <tbody class="middle-align">
  44. <?php foreach($models as $key => $val){
  45. $userId = $val['id'];
  46. $asset = xhUserAssetService::getByUserId($userId);
  47. $merchantId = $val['merchantId'];
  48. $merchant = xhMerchantService::getById($merchantId);
  49. ?>
  50. <tr>
  51. <td class="hidden-xs"><input name="uId" value="<?= $val['id'] ?>" type="checkbox"></td>
  52. <td class="hidden-xs"><?= $merchant['merchantName'] ?></td>
  53. <td class="hidden-xs"><?= $val['id'] ?></td>
  54. <td class="hidden-xs">
  55. <a href="/user/detail?id=<?= $val['id'] ?>" title="<?= $val['userName'] ?>">
  56. <img src="/images/newGrey.gif" class="lazy" data-original="<?php if(!empty($val['avatar'])){ $avatar = xhUserService::getAvatarList($val['avatar']); echo Yii::$app->params['imgUrl'].$avatar['small']; }else{ echo '/images/avatar.jpg'; } ?>" style="width:20px;border-radius:10px;" />
  57. </a>
  58. </td>
  59. <td><a class="add-under-line" href="/user/detail?id=<?= $val['id'] ?>" title="<?= $val['userName'] ?>"><?php echo stringUtil::subStringUtf8($val['userName'],4,'..'); ?></a></td>
  60. <td class="hidden-xs">
  61. <?= $val['mobile'] ?>
  62. </td>
  63. <td class="hidden-xs"><?php if(!empty($asset['memberLevel'])){ echo $asset['memberLevel']; } ?>
  64. </td>
  65. <td class="hidden-xs"><?php if(!empty($asset['integral'])){ echo $asset['integral']; } ?></td>
  66. <td class="hidden-xs"><?php if($val['subscribe'] == 1) echo '<a href="javascript:void(0)" style="color:#68b828;cursor:text" <i class="fa fa-check"></i></a>'; ?></td>
  67. <td class="hidden-xs"><?php if(!empty($val['subscribeTime'])){ echo date("Y-n-j H:i",$val['subscribeTime']); } ?></td>
  68. <td class="hidden-xs"></td>
  69. </tr>
  70. <?php } ?>
  71. </tbody>
  72. </table>
  73. </div>
  74. <div class="row">
  75. <div>
  76. <div style="display:inline-block;margin-left:15px;">
  77. <label>
  78. <select name="doOption" aria-controls="example-1" class="form-control">
  79. <option value="0">添加标签</option>
  80. </select>
  81. </label>
  82. <button name="multipConfirm" class="btn btn-secondary btn-single">确认</button>
  83. </div>
  84. <div class="dataTables_paginate paging_simple_numbers" style="float:right;padding-top:0px;margin-right:15px;">
  85. <?= $pages ?>
  86. </div>
  87. </div>
  88. </div>
  89. </div>
  90. </div>
  91. </div>
  92. <!-- footer -->
  93. <?php
  94. use backend\widgets\FooterWidget;
  95. ?>
  96. <?= FooterWidget::widget()?>
  97. <!-- footer -->