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.

168 lines
3.2 KiB

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