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.

161 lines
3.1 KiB

3 months ago
  1. <template>
  2. <view class="content">
  3. <up-navbar leftText=" " title="" :safeAreaInsetTop="false" :autoBack="true">
  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="con padding">
  12. <view class="h1_row">
  13. <text class="tag">单选</text>
  14. <text class="h1">机动车驾驶人在实习期内驾驶机动车不得牵引挂车</text>
  15. </view>
  16. <view class="option">
  17. <view class="optionItem flex">
  18. <view class="icon">
  19. <image src="@/static/logo.png" mode=""></image>
  20. </view>
  21. <view class="text">正确</view>
  22. </view>
  23. </view>
  24. <view class="answer flex">
  25. <view class="ans">正确答案是<text>B</text></view>
  26. <view class="ans">您的答案是<text>B</text></view>
  27. </view>
  28. <view class="analysis">
  29. <view class="tit">题目解析</view>
  30. <view class="txt">解析解析解析解析解析解析解析解析解析解析解析解析</view>
  31. </view>
  32. </view>
  33. </view>
  34. </template>
  35. <script>
  36. export default {
  37. data() {
  38. return {
  39. currentNav: '1'
  40. }
  41. },
  42. methods: {
  43. changeNav(val) {
  44. console.log(window)
  45. if(this.currentNav == val) return
  46. this.currentNav = val
  47. }
  48. }
  49. }
  50. </script>
  51. <style lang="scss" scoped>
  52. image {display: block;width: 100%;height: 100%;}
  53. .content {
  54. padding: 120rpx 0 0 0;
  55. .u-nav-slot {
  56. width: 306rpx;
  57. height: 54rpx;
  58. border-radius: 10rpx;
  59. border: 1px solid #333333;
  60. display: flex;
  61. .btn {
  62. font-size: 24rpx;
  63. color: #333333;
  64. flex: 1;
  65. text-align: center;
  66. line-height: 54rpx;
  67. &.active {
  68. background-color: #333333;
  69. color: #fff;
  70. }
  71. }
  72. }
  73. .con {
  74. .h1_row {
  75. margin-bottom: 50rpx;
  76. .tag {
  77. display: inline-block;
  78. // width: 66px;
  79. height: 36rpx;
  80. line-height: 36rpx;
  81. padding: 4rpx 6rpx;
  82. background: #63C168;
  83. border-radius: 6rpx;
  84. margin-top: -2rpx;
  85. margin-right: 16rpx;
  86. font-size: 28rpx;
  87. color: #fff;
  88. }
  89. text.h1 {
  90. font-size: 36rpx;
  91. }
  92. }
  93. .option {
  94. width: 100%;
  95. .optionItem {
  96. margin-bottom: 50rpx;
  97. align-items: center;
  98. .icon {
  99. width: 56rpx;
  100. height: 56rpx;
  101. margin-right: 36rpx;
  102. image {
  103. border-radius: 50%;
  104. }
  105. }
  106. .text {
  107. font-size: 32rpx;
  108. }
  109. }
  110. }
  111. .answer {
  112. height: 90rpx;
  113. background: #F4F4F4;
  114. line-height: 90rpx;
  115. padding: 0 30rpx;
  116. margin-top: 20rpx;
  117. .ans {
  118. margin-right: 60rpx;
  119. text {
  120. color: red;
  121. }
  122. }
  123. }
  124. .analysis {
  125. margin-top: 60rpx;
  126. .tit {
  127. font-weight: 700;
  128. font-size: 32rpx;
  129. position: relative;
  130. padding-left: 30rpx;
  131. &::after {
  132. content: '';
  133. position: absolute;
  134. left: 0;
  135. top: 8rpx;
  136. width: 6rpx;
  137. height: 30rpx;
  138. background: linear-gradient(0deg, #43EA80 0%, #38F8D4 100%);
  139. border-radius: 3rpx;
  140. }
  141. }
  142. .txt {
  143. margin-top: 39rpx;
  144. font-size: 32rpx;
  145. color: #333333;
  146. }
  147. }
  148. }
  149. }
  150. </style>