login-log.php 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  1. <style>
  2. .table-body {
  3. padding: 20px 20px;
  4. background-color: #fff;
  5. }
  6. .table-body .top-input {
  7. margin-top: 34px;
  8. }
  9. .input-item {
  10. width: 200px;
  11. margin-right: 20px;
  12. }
  13. .input-item .el-input__inner {
  14. border-right: 0;
  15. }
  16. .input-item .el-input__inner:hover {
  17. border: 1px solid #dcdfe6;
  18. border-right: 0;
  19. outline: 0;
  20. }
  21. .input-item .el-input__inner:focus {
  22. border: 1px solid #dcdfe6;
  23. border-right: 0;
  24. outline: 0;
  25. }
  26. .input-item .el-input-group__append {
  27. background-color: #fff;
  28. border-left: 0;
  29. width: 10%;
  30. padding: 0;
  31. }
  32. .input-item .el-input-group__append .el-button {
  33. padding: 0;
  34. }
  35. .input-item .el-input-group__append .el-button {
  36. margin: 0;
  37. }
  38. /* #app .table-body .el-table .el-button {
  39. border-radius: 16px;
  40. } */
  41. .create {
  42. height: 36px;
  43. line-height: 36px;
  44. float: right;
  45. color: #BCBCBC;
  46. margin-left: 20px;
  47. }
  48. .name {
  49. cursor: pointer;
  50. color: #49A9FF;
  51. }
  52. .el-input-group__append {
  53. /* background-color: #fff; */
  54. }
  55. /* 卡片 */
  56. .plugin-list {
  57. margin: 0 0 0 -20px;
  58. /* padding-right: 100px; */
  59. display: flex;
  60. flex-wrap: wrap;
  61. }
  62. .plugin-list .plugin-item {
  63. width: 20%;
  64. min-width: 400px;
  65. }
  66. .plugin-item {
  67. border: 1px solid #ebebeb;
  68. background: #FFFFFF;
  69. box-shadow: 3px 5px 15px rgba(80, 80, 80, 0.16);
  70. opacity: 1;
  71. border-radius: 5px;
  72. padding: 20px;
  73. margin: 0 0 20px 20px;
  74. transition: 250ms;
  75. position: relative;
  76. /* min-width: 300px; */
  77. }
  78. .plugin-item .item-status {
  79. position: absolute;
  80. top: 0;
  81. right: 0;
  82. width: 94px;
  83. height: 30px;
  84. background: #E8EAEC;
  85. opacity: 1;
  86. border-radius: 0px 5px 0px 5px;
  87. font-size: 14px;
  88. font-family: Microsoft YaHei;
  89. font-weight: 400;
  90. line-height: 30px;
  91. color: #9398A4;
  92. text-align: center;
  93. }
  94. .item-status-permanent {
  95. width: 94px;
  96. }
  97. .item-status-effective {
  98. width: 164px;
  99. }
  100. .plugin-item .item-info {
  101. display: flex;
  102. align-items: center;
  103. }
  104. /* .plugin-item .item-info .item-right{
  105. min-width: 500px;
  106. } */
  107. .plugin-item .item-btns {
  108. display: flex;
  109. align-items: center;
  110. justify-content: flex-end;
  111. margin-top: 12px;
  112. }
  113. .plugin-item .mall-logo {
  114. width: 70px;
  115. height: 70px;
  116. margin-right: 12px;
  117. }
  118. .plugin-item .mall-logo img {
  119. width: 100%;
  120. height: 100%;
  121. display: block;
  122. border-radius: 50%;
  123. }
  124. .plugin-item .display-name {
  125. font-size: 18pt;
  126. margin-top: 10px;
  127. margin-bottom: 4px;
  128. font-family: Microsoft YaHei;
  129. font-weight: bold;
  130. line-height: 30px;
  131. color: #3F495D;
  132. opacity: 1;
  133. width: 200px;
  134. white-space: nowrap;
  135. overflow: hidden;
  136. text-overflow: ellipsis;
  137. }
  138. .plugin-item .name {
  139. color: #909399;
  140. }
  141. .plugin-item:hover {
  142. cursor: pointer;
  143. border-color: #bfddff;
  144. }
  145. /* .plugin-item:hover .display-name {
  146. color: #409EFF;
  147. } */
  148. .plugin-item .plugin-option-btn {
  149. height: 25px;
  150. width: 25px;
  151. font-size: 12px;
  152. padding: 0;
  153. }
  154. .plugin-item .detail-option.detail-option {
  155. color: #909399;
  156. background: #F2F6FC;
  157. }
  158. .plugin-item .detail-option:hover {
  159. color: #fff;
  160. background: #909399;
  161. }
  162. </style>
  163. <div id="app" v-cloak>
  164. <el-card shadow="never" style="border:0;min-width: 1200px;" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
  165. <div slot="header">
  166. <div>
  167. <span>登录日志</span>
  168. </div>
  169. </div>
  170. <div class="table-body">
  171. <template>
  172. <div>
  173. <el-table :data="tableData" style="width: 100%;margin-bottom: 20px;" row-key="id" stripe>
  174. <el-table-column prop="user_id" label="会员编号" width="200">
  175. <template slot-scope="scope">
  176. <span style="margin-left: 10px">{{scope.row.user_id }}
  177. </span>
  178. </template>
  179. </el-table-column>
  180. <el-table-column prop="nickname" label="昵称" width="200">
  181. <template slot-scope="scope">
  182. <span style="margin-left: 10px">{{scope.row.nickname }}
  183. </span>
  184. </template>
  185. </el-table-column>
  186. <el-table-column prop="platform" label="登录渠道" width="200">
  187. <template slot-scope="scope">
  188. <span style="margin-left: 10px">{{scope.row.platform }}
  189. </span>
  190. </template>
  191. </el-table-column>
  192. <el-table-column prop="IP" label="IP">
  193. <template slot-scope="scope">
  194. <span style="margin-left: 10px">{{scope.row.ip }}</span>
  195. </template>
  196. </el-table-column>
  197. <el-table-column prop="created_at" label="登录时间">
  198. <template slot-scope="scope">
  199. <span style="margin-left: 10px">{{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s') }}</span>
  200. </template>
  201. </el-table-column>
  202. </el-table>
  203. </div>
  204. <div style="text-align: right;margin: 20px 0;">
  205. <el-pagination @current-change="pagination" background layout="prev, pager, next" :page-count="pageCount"></el-pagination>
  206. </div>
  207. </template>
  208. </div>
  209. </el-card>
  210. </div>
  211. <script>
  212. new Vue({
  213. el: '#app',
  214. data() {
  215. return {
  216. activeName: "1",
  217. pageCount: 0,
  218. page: 1,
  219. tableData: [],
  220. }
  221. },
  222. created() {
  223. this.loadList({});
  224. },
  225. methods: {
  226. loadList(params) {
  227. params['r'] = 'mall/user/login-log';
  228. params['page'] = this.page;
  229. this.$request({
  230. params: params,
  231. }).then(e => {
  232. if (e.data.code == 0) {
  233. if(e.data.data){
  234. this.tableData = e.data.data.list;
  235. this.pageCount = e.data.data.page_count;
  236. }
  237. }
  238. }).catch(e => {});
  239. },
  240. pagination(currentPage) {
  241. this.page = currentPage;
  242. this.loadList({});
  243. },
  244. },
  245. });
  246. </script>