学员端小程序
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.

116 lines
2.5 KiB

1 year ago
  1. <template>
  2. <view class="pageBgImg">
  3. <topNavbar title="投诉咨询记录"></topNavbar>
  4. <view class="pad">
  5. <view class="tabs">
  6. <view class="tab" v-for="(item,index) in tabList" :key="index" :class="{active: currentTab==item.id}" @click="changeTab(item)">{{ item.text }}</view>
  7. </view>
  8. <view class="navs">
  9. <view class="nav" v-for="(item,index) in navList" :key="index" :class="{active: currentNav==item.id}" @click="changeNav(item)">{{ item.text }}</view>
  10. </view>
  11. <view class="recordTotal">100条记录</view>
  12. <view class="tabCon" v-if="currentTab==1">
  13. <view class="card" v-for="(item,index) in 10" :key="index">
  14. <consultItem></consultItem>
  15. </view>
  16. </view>
  17. <view class="tabCon" v-if="currentTab==2">
  18. <view class="card" v-for="(item,index) in 10" :key="index">
  19. <complaintItem></complaintItem>
  20. </view>
  21. </view>
  22. </view>
  23. </view>
  24. </template>
  25. <script>
  26. import consultItem from './comp/consultItem'
  27. import complaintItem from './comp/complaintItem'
  28. export default {
  29. components: { consultItem, complaintItem },
  30. data() {
  31. return {
  32. tabList: [
  33. {text: '我的咨询',id: 1},
  34. {text: '我的投诉',id: 2},
  35. ],
  36. navList: [
  37. {text: '全部', id: 0},
  38. {text: '待处理', id: 1},
  39. {text: '已处理', id: 2},
  40. {text: '已关闭', id: 3},
  41. ],
  42. currentTab: 1,
  43. currentNav: 0,
  44. }
  45. },
  46. methods: {
  47. changeTab(item) {
  48. this.currentTab = item.id
  49. },
  50. changeNav(item) {
  51. this.currentNav = item.id
  52. },
  53. }
  54. }
  55. </script>
  56. <style lang="scss" scoped>
  57. .card {
  58. padding: 0 24rpx;
  59. margin-bottom: 20rpx;
  60. }
  61. .tabs {
  62. display: flex;
  63. width: 100%;
  64. height: 72rpx;
  65. background: #FFFFFF;
  66. border-radius: 16rpx;
  67. .tab {
  68. flex: 1;
  69. text-align: center;
  70. line-height: 72rpx;
  71. color: #ADADAD;
  72. &.active {
  73. background: rgba(25,137,250,0.1);
  74. border-radius: 16rpx;
  75. border: 2rpx solid #1989FA;
  76. color: $themC;
  77. font-weight: 600;
  78. }
  79. }
  80. }
  81. .navs {
  82. display: flex;
  83. justify-content: space-between;
  84. color: #fff;
  85. font-size: 28rpx;
  86. padding: 24rpx 0 40rpx 0;
  87. color: #fff;
  88. .nav {
  89. &.active {
  90. font-weight: 500;
  91. position: relative;
  92. &::before {
  93. position: absolute;
  94. left: 50%;
  95. transform: translateX(-50%);
  96. bottom: -20rpx;
  97. content: '';
  98. width: 56rpx;
  99. height: 6rpx;
  100. background: #FFFFFF;
  101. border-radius: 3rpx;
  102. }
  103. }
  104. }
  105. }
  106. .recordTotal {
  107. font-size: 24rpx;
  108. padding: 0rpx 0 28rpx 0;
  109. text-align: right;
  110. }
  111. </style>