user_sign_in.php 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. <?php
  2. /**
  3. * @link:http://www.goodmall.com/
  4. * @copyright: Copyright (c) 2020
  5. * 名片
  6. * Author: james
  7. * Date: 2020-07-10
  8. * Time: 15:48
  9. */
  10. ?>
  11. <div id="app" v-cloak>
  12. <el-card shadow="never" style="border:0" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
  13. <div slot="header">
  14. <el-breadcrumb separator="/">
  15. <el-breadcrumb-item>
  16. <span style="color: #409EFF;cursor: pointer" @click="$navigate({r:'sign-in/default/record'})">签到记录</span>
  17. </el-breadcrumb-item>
  18. <el-breadcrumb-item>签到详情</el-breadcrumb-item>
  19. </el-breadcrumb>
  20. </div>
  21. <div class="table-body">
  22. <el-tabs>
  23. <el-table :data="list" border v-loading="loading" size="small" style="margin-bottom: 15px;">
  24. <el-table-column prop="num" label="数量">
  25. <template slot-scope="scope">
  26. <div>{{scope.row.num}}</div>
  27. </template>
  28. </el-table-column>
  29. <el-table-column label="奖励类型">
  30. <template slot-scope="scope">
  31. <div v-if="scope.row.type==1">积分</div>
  32. <div v-if="scope.row.type==2">优惠券</div>
  33. </template>
  34. </el-table-column>
  35. <el-table-column label="备注" prop="describe">
  36. <template slot-scope="scope">
  37. <div>{{scope.row.describe}}</div>
  38. </template>
  39. </el-table-column>
  40. <el-table-column label="领取时间" prop="created_at">
  41. <template slot-scope="scope">
  42. <div>{{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s')}}</div>
  43. </template>
  44. </el-table-column>
  45. </el-table>
  46. </el-tabs>
  47. <div flex="box:last cross:center">
  48. <div></div>
  49. <div>
  50. <el-pagination
  51. v-if="list.length > 0"
  52. style="display: inline-block;float: right;"
  53. background :page-size="pagination.pageSize"
  54. @current-change="pageChange"
  55. layout="prev, pager, next" :current-page="pagination.current_page"
  56. :total="pagination.totalCount">
  57. </el-pagination>
  58. </div>
  59. </div>
  60. </div>
  61. </el-card>
  62. </div>
  63. <script>
  64. const app = new Vue({
  65. el: '#app',
  66. data: {
  67. user_id:'',
  68. loading: false,
  69. list: [],
  70. exportList: [],
  71. pagination: null,
  72. },
  73. mounted() {
  74. this.loadData();
  75. },
  76. methods: {
  77. down() {
  78. var alink = document.createElement("a");
  79. alink.href = this.qrimg;
  80. alink.download = this.nickname;
  81. alink.click();
  82. },
  83. loadData(page) {
  84. this.user_id = location.href.split('=')[2];
  85. this.loading = true;
  86. request({
  87. params: {
  88. r: 'sign-in/default/user-sign-in',
  89. page: page,
  90. user_id: this.user_id,
  91. },
  92. }).then(e => {
  93. console.log(e);
  94. this.loading = false;
  95. if (e.data.code === 0) {
  96. this.list = e.data.data.list;
  97. this.pagination = e.data.data.pagination;
  98. } else {
  99. this.$message.error(e.data.msg);
  100. }
  101. }).catch(e => {
  102. this.loading = false;
  103. });
  104. },
  105. pageChange(page) {
  106. this.loadData(page);
  107. },
  108. }
  109. });
  110. </script>
  111. <style>
  112. .el-tabs__header {
  113. font-size: 16px;
  114. }
  115. .table-body {
  116. padding: 20px;
  117. background-color: #fff;
  118. }
  119. .table-body .el-button {
  120. padding: 0 !important;
  121. border: 0;
  122. margin: 0 5px;
  123. }
  124. .input-item {
  125. width: 250px;
  126. margin: 0 0 20px;
  127. display: inline-block;
  128. }
  129. .input-item .el-input__inner {
  130. border-right: 0;
  131. }
  132. .input-item .el-input__inner:hover {
  133. border: 1px solid #dcdfe6;
  134. border-right: 0;
  135. outline: 0;
  136. }
  137. .input-item .el-input__inner:focus {
  138. border: 1px solid #dcdfe6;
  139. border-right: 0;
  140. outline: 0;
  141. }
  142. .input-item .el-input-group__append {
  143. background-color: #fff;
  144. border-left: 0;
  145. width: 10%;
  146. padding: 0;
  147. }
  148. .input-item .el-input-group__append .el-button {
  149. padding: 0;
  150. }
  151. .input-item .el-input-group__append .el-button {
  152. margin: 0;
  153. }
  154. .batch {
  155. margin: 0 0 20px;
  156. display: inline-block;
  157. }
  158. .batch .el-button {
  159. padding: 9px 15px !important;
  160. }
  161. </style>