鸿宇研学生前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

137 lines
2.9 KiB

  1. <template>
  2. <view class="page__view">
  3. <navbar title="成员管理" leftClick @leftClick="$utils.navigateBack" bgColor="#FFFFFF" />
  4. <view class="main">
  5. <view class="tabs">
  6. <uv-tabs
  7. :list="tabs"
  8. :current="queryParams.status"
  9. :scrollable="false"
  10. lineColor="#00A9FF"
  11. lineWidth="48rpx"
  12. lineHeight="4rpx"
  13. :activeStyle="{
  14. 'font-family': 'PingFang SC',
  15. 'font-weight': 500,
  16. 'font-size': '32rpx',
  17. 'line-height': 1.4,
  18. 'color': '#00A9FF',
  19. }"
  20. :inactiveStyle="{
  21. 'font-family': 'PingFang SC',
  22. 'font-weight': 400,
  23. 'font-size': '32rpx',
  24. 'line-height': 1.4,
  25. 'color': '#181818',
  26. }"
  27. @click="clickTabs"
  28. ></uv-tabs>
  29. </view>
  30. <view class="list">
  31. <template v-if="queryParams.status == 0">
  32. <view class="list-item" v-for="item in list" :key="item.id">
  33. <memberApplyCard :data="item" @submitted="getData"></memberApplyCard>
  34. </view>
  35. </template>
  36. <template v-else>
  37. <view class="list-item" v-for="item in list" :key="item.id">
  38. <memberCard :data="item" ></memberCard>
  39. </view>
  40. </template>
  41. </view>
  42. </view>
  43. </view>
  44. </template>
  45. <script>
  46. import mixinsList from '@/mixins/list.js'
  47. import memberCard from './memberCard.vue'
  48. import memberApplyCard from './memberApplyCard.vue'
  49. export default {
  50. mixins: [mixinsList],
  51. components: {
  52. memberCard,
  53. memberApplyCard,
  54. },
  55. data() {
  56. return {
  57. tabs: [
  58. { name: '绑定申请' },
  59. { name: '已绑定' },
  60. ],
  61. queryParams: {
  62. pageNo: 1,
  63. pageSize: 10,
  64. status: 0, // 绑定状态(status):0-确认中 1-已绑定 2-已拒绝
  65. },
  66. mixinsListApi: 'queryBindList',
  67. }
  68. },
  69. onShow() {
  70. console.log('onShow')
  71. },
  72. onLoad(arg) {
  73. this.clickTabs({ index: arg.index || 0 })
  74. },
  75. methods: {
  76. //点击tab栏
  77. clickTabs({ index }) {
  78. this.queryParams.status = index
  79. this.getData()
  80. },
  81. },
  82. }
  83. </script>
  84. <style scoped lang="scss">
  85. .page__view {
  86. width: 100vw;
  87. min-height: 100vh;
  88. background: $uni-bg-color;
  89. position: relative;
  90. /deep/ .nav-bar__view {
  91. position: fixed;
  92. top: 0;
  93. left: 0;
  94. }
  95. }
  96. .main {
  97. padding: calc(var(--status-bar-height) + 244rpx) 32rpx 40rpx 32rpx;
  98. .tabs {
  99. position: fixed;
  100. top: calc(var(--status-bar-height) + 120rpx);
  101. left: 0;
  102. width: 100%;
  103. height: 84rpx;
  104. background: #FFFFFF;
  105. z-index: 1;
  106. /deep/ .uv-tabs__wrapper__nav__line {
  107. border-radius: 2rpx;
  108. }
  109. }
  110. }
  111. .list {
  112. &-item {
  113. & + & {
  114. margin-top: 32rpx;
  115. }
  116. }
  117. }
  118. </style>