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.

195 lines
4.1 KiB

1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
  1. <template>
  2. <view class="content">
  3. <up-navbar leftText=" " :leftIconColor="'#fff'" :safeAreaInsetTop="true" :autoBack="true" :bgColor="'transparent'">
  4. <template #center>
  5. <view class="u-nav-slot flex">
  6. <view class="btn" @click="changeNav(1)" :class="{active: currentNav==1}">错题本</view>
  7. <view class="btn" @click="changeNav(2)" :class="{active: currentNav==2}">收藏夹</view>
  8. </view>
  9. </template>
  10. </up-navbar>
  11. <view class="card">
  12. <view class="h7">我的错题</view>
  13. <view class="flex-b">
  14. <view class="cardBg">
  15. <view class="flex">
  16. <view class="label">全部错题</view>
  17. <u-icon name="arrow-right" color="#fff" size="14"></u-icon>
  18. </view>
  19. <view class="num">2</view>
  20. </view>
  21. <view class="cardBg">
  22. <view class="flex">
  23. <view class="label">高频错题</view>
  24. <u-icon name="arrow-right" color="#fff" size="14"></u-icon>
  25. </view>
  26. <view class="num">1</view>
  27. </view>
  28. </view>
  29. <view class="flex-b">
  30. <view class="h8">答对题后自动移除错题</view>
  31. <u-switch v-model="value" @change="change"></u-switch>
  32. </view>
  33. </view>
  34. <view class="card">
  35. <view class="flex-b">
  36. <view class="h7">错题分类</view>
  37. <view class="rightall">
  38. <u-icon name="trash" color="#ccc" size="14"></u-icon>
  39. <view class="txt">全部移除</view>
  40. </view>
  41. </view>
  42. <view class="ul">
  43. <view class="li" v-for="(item,index) in 4" :key="index">
  44. <view class="num">1</view>
  45. <view class="txt">驾驶证和机动车管理规定</view>
  46. <view class="rightBox">
  47. <view class="p">错3题</view>
  48. <u-icon name="arrow-right" color="#D9D9D9" size="14"></u-icon>
  49. </view>
  50. </view>
  51. </view>
  52. </view>
  53. </view>
  54. </template>
  55. <script setup>
  56. import { ref } from 'vue'
  57. const value = ref(false)
  58. const currentNav = ref(1)
  59. function changeNav(val) {
  60. currentNav.value = val
  61. }
  62. </script>
  63. <style lang="scss" scoped>
  64. .u-nav-slot {
  65. display: flex;
  66. .btn {
  67. color: #fff;
  68. position: relative;
  69. padding: 0 20rpx;
  70. &.active {
  71. &::before {
  72. content: '';
  73. position: absolute;
  74. left: 50%;
  75. bottom: -20rpx;
  76. width: 30rpx;
  77. height: 4rpx;
  78. background: #F6F7F8;
  79. border-radius: 2rpx;
  80. transform: translateX(-50%);
  81. }
  82. }
  83. }
  84. }
  85. .content {
  86. width: 100%;
  87. // background-color: #F6F7FA;
  88. min-height: 100vh;
  89. padding: 100rpx 30rpx 30rpx 30rpx;
  90. background: url('../../../static/images/topbg.png') #F6F7FA no-repeat;
  91. background-size: 100% 410rpx;
  92. .card {
  93. width: 100%;
  94. background: #FFFFFF;
  95. border-radius: 20rpx;
  96. padding: 20rpx;
  97. margin-top: 20rpx;
  98. .h7 {
  99. font-size: 32rpx;
  100. font-weight: 550;
  101. }
  102. .cardBg {
  103. width: 48%;
  104. height: 147rpx;
  105. background: linear-gradient(125deg, #3776FF 0%, #6193FF 100%);
  106. border-radius: 20rpx;
  107. padding: 20rpx;
  108. color: #fff;
  109. margin-top: 30rpx;
  110. &:last-child {
  111. background: linear-gradient(125deg, #FE5656 0%, #FFC5C5 100%);
  112. }
  113. .flex {
  114. .label {
  115. font-size: 24rpx;
  116. }
  117. u-icon {
  118. }
  119. }
  120. .num {
  121. font-weight: bold;
  122. font-size: 48rpx;
  123. margin-top: 20rpx;
  124. }
  125. }
  126. .flex-b {
  127. .h8 {
  128. font-size: 28rpx;
  129. line-height: 120rpx;
  130. font-weight: 550;
  131. }
  132. u-switch {
  133. }
  134. }
  135. }
  136. .rightall {
  137. display: flex;
  138. align-items: center;
  139. font-size: 24rpx;
  140. color: #ccc;
  141. .txt {
  142. margin-left: 6rpx;
  143. }
  144. }
  145. .ul {
  146. padding-top: 30rpx;
  147. .li {
  148. width: 100%;
  149. display: flex;
  150. align-items: center;
  151. padding: 34rpx 0;
  152. .num {
  153. height: 32rpx;
  154. background: #F5C142;
  155. border-radius: 50%;
  156. padding: 0 10rpx;
  157. color: #fff;
  158. font-size: 24rpx;
  159. line-height: 32rpx;
  160. }
  161. .txt {
  162. flex: 1;
  163. width: 0;
  164. font-size: 28rpx;
  165. padding: 0 20rpx;
  166. }
  167. .rightBox {
  168. display: flex;
  169. align-items: center;
  170. .p {
  171. font-size: 24rpx;
  172. color: #FF3333;
  173. margin-right: 4rpx;
  174. }
  175. u-icon {
  176. }
  177. }
  178. }
  179. }
  180. }
  181. </style>