details_list.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <template>
  2. <view class="detail_list">
  3. <view class="nierong" v-if="this.studentList.length > 0">
  4. <view class="header">
  5. <view class="xuehao">
  6. 学号
  7. </view>
  8. <view class="xuehao">
  9. 姓名
  10. </view>
  11. <view class="xuehao">
  12. 手机号
  13. </view>
  14. </view>
  15. <view class="bodys" v-for="(item,index) in this.studentList">
  16. <view class="xuehao">
  17. {{item.account}}
  18. </view>
  19. <view class="xuehao">
  20. {{item.name}}
  21. </view>
  22. <view class="xuehao">
  23. {{item.mobile}}
  24. </view>
  25. </view>
  26. </view>
  27. <view class="empty" v-else>
  28. <view class="enptyStatus">
  29. <image src="../../static/empty.png" mode=""></image>
  30. <view class="words">
  31. 暂无报名信息
  32. </view>
  33. </view>
  34. </view>
  35. </view>
  36. </template>
  37. <script>
  38. export default {
  39. data() {
  40. return {
  41. studentList:[],
  42. student_id:'',
  43. };
  44. },
  45. onLoad(options) {
  46. console.log(options.student_id, '学生')
  47. this.student_id = options.student_id
  48. if (this.is_weixin()) {
  49. this.navTitle();
  50. }
  51. },
  52. onShow(){
  53. this.getList()
  54. },
  55. methods: {
  56. //判断是否是微信
  57. is_weixin() {
  58. let ua = navigator.userAgent.toLowerCase();
  59. return ua.indexOf('micromessenger') != -1;
  60. },
  61. navTitle() {
  62. let navTitle = document.getElementsByTagName('uni-page-head');
  63. navTitle[0].style.display = 'none';
  64. },
  65. async getList() {
  66. // 报名列表信息接口
  67. await this.$u
  68. .get('/inform/information-activity', {
  69. information_id: this.student_id
  70. })
  71. .then(res => {
  72. uni.hideLoading();
  73. console.log(res.data, '报名列表数据');
  74. this.studentList = res.data.list;
  75. });
  76. },
  77. }
  78. };
  79. </script>
  80. <style lang="scss" scoped>
  81. .detail_list {
  82. padding: 16px;
  83. .empty{
  84. margin-top: 100px;
  85. }
  86. .enptyStatus{
  87. display: flex;
  88. justify-content: center;
  89. align-items: center;
  90. flex-direction: column;
  91. padding: 30px 10px;
  92. image{
  93. width: 80px;
  94. height: 110px;
  95. }
  96. .words{
  97. color: #ffae21;
  98. font-size: 14px;
  99. padding-top: 10px;
  100. }
  101. }
  102. .header{
  103. display: flex;
  104. .xuehao{
  105. width: 33%;
  106. text-align: center;
  107. height: 40px;
  108. line-height: 40px;
  109. border: 1px solid #cccccc;
  110. font-size: 16px;
  111. font-weight: 900;
  112. background-color: #e3e3e3;
  113. }
  114. }
  115. .bodys{
  116. display: flex;
  117. .xuehao{
  118. width: 33%;
  119. text-align: center;
  120. height: 40px;
  121. line-height: 40px;
  122. border: 1px solid #cccccc;
  123. border-top: 0;
  124. font-size: 16px;
  125. }
  126. }
  127. }
  128. </style>