questionBank.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. <template>
  2. <view id="questionBank">
  3. <view class="pageContent">
  4. <view class="pad_8 titBox">
  5. <view class="firstLetter">
  6. <view class="leftLetters">
  7. <view class="btnType">单选</view>
  8. <text>1/10</text>
  9. </view>
  10. <view style="color: #666;font-size: 28rpx;">03:25:06</view>
  11. <view class="leftLetters"></view>
  12. </view>
  13. <view class="titles">建造师执业资格注册的有效期一般为( )年。</view>
  14. <view class="">
  15. <view v-for="(item, index) in bankList" :key="index" class="lisSty">
  16. <text class="activeTI">{{ ast[index] }}</text>
  17. {{ item.label }}
  18. </view>
  19. </view>
  20. </view>
  21. <view class="pad_8 answer">
  22. <view>正确答案:C</view>
  23. <view>我的答案:B</view>
  24. </view>
  25. <view class="pad_8 answerInfos">
  26. <view class="answerTitle">答案解析</view>
  27. <view class="answerContent">
  28. 建造师执业资格注册有效期一般为3年,有效期满前3个月,持证者应到原注册管理机构办理再次注册手续。在注册有效期内,变更执业单位者,应当及时办理变更手续。
  29. </view>
  30. </view>
  31. </view>
  32. <view class="footer_btn">
  33. <view>收藏</view>
  34. <view @click="openFooterTab">答题卡</view>
  35. <view>交卷</view>
  36. </view>
  37. <u-popup v-model="show" mode="bottom" border-radius="14" height="680rpx">
  38. <view class="popupView">
  39. <view class="popupTops">
  40. <view class="topIcon"></view>
  41. 点击编号即可跳转至对应题目
  42. </view>
  43. <view class="popupContent">
  44. <scroll-view scroll-y="true" style="height: 506rpx;">
  45. <view class="boxSty">
  46. <view v-for="(item, index) in 23" :key="index" class="liListSty">{{ index + 1 }}</view>
  47. </view>
  48. </scroll-view>
  49. </view>
  50. </view>
  51. </u-popup>
  52. </view>
  53. </template>
  54. <script>
  55. export default {
  56. data() {
  57. return {
  58. ast: ['A', 'B', 'C', 'D', 'E', 'F', 'G'],
  59. show: false,
  60. bankList: [
  61. {
  62. label: '我是选项一',
  63. value: 1
  64. },
  65. {
  66. label: '我是选项二',
  67. value: 2
  68. },
  69. {
  70. label: '我是选项三',
  71. value: 3
  72. },
  73. {
  74. label: '我是选项四',
  75. value: 4
  76. }
  77. ]
  78. };
  79. },
  80. methods: {
  81. openFooterTab() {
  82. this.show = true;
  83. }
  84. }
  85. };
  86. </script>
  87. <style lang="scss" scoped>
  88. .lisSty {
  89. margin-bottom: 16rpx;
  90. }
  91. .activeTI {
  92. display: inline-block;
  93. border: 1rpx solid #eee;
  94. border-radius: 50rpx;
  95. height: 48rpx;
  96. line-height: 46rpx;
  97. text-align: center;
  98. width: 48rpx;
  99. margin-right: 15rpx;
  100. color: #666;
  101. font-size: 30rpx;
  102. }
  103. .titles {
  104. margin-bottom: 24rpx;
  105. }
  106. .titBox {
  107. padding: 41rpx 25rpx 24rpx 25rpx;
  108. }
  109. .firstLetter {
  110. display: flex;
  111. justify-content: space-between;
  112. align-items: center;
  113. margin-bottom: 30rpx;
  114. .leftLetters {
  115. display: flex;
  116. align-items: center;
  117. width: 220rpx;
  118. .btnType {
  119. padding: 5rpx 10rpx;
  120. border: 1rpx solid #007aff;
  121. border-radius: 10rpx;
  122. background-color: rgba(0, 122, 255, 0.1);
  123. font-size: 28rpx;
  124. color: #007aff;
  125. margin-right: 15rpx;
  126. }
  127. }
  128. }
  129. .popupView {
  130. height: 100%;
  131. padding-bottom: 100rpx;
  132. .popupTops {
  133. height: 77rpx;
  134. border-bottom: 1rpx solid #eee;
  135. text-align: center;
  136. line-height: 77rpx;
  137. font-size: 24rpx;
  138. color: #999;
  139. position: relative;
  140. .topIcon {
  141. position: absolute;
  142. top: 10rpx;
  143. left: 50%;
  144. transform: translateX(-50%);
  145. width: 80rpx;
  146. height: 8rpx;
  147. background-color: #999;
  148. border-radius: 4rpx;
  149. }
  150. }
  151. .popupContent {
  152. }
  153. }
  154. .pageContent {
  155. background-color: #eaeef1;
  156. min-height: 100vh;
  157. padding-top: 8rpx;
  158. padding-bottom: 100rpx;
  159. }
  160. .pad_8 {
  161. background-color: #fff;
  162. margin: 0rpx 8rpx 8rpx;
  163. border-radius: 16rpx;
  164. }
  165. .answer {
  166. height: 80rpx;
  167. line-height: 80rpx;
  168. padding: 0rpx 24rpx;
  169. display: flex;
  170. align-items: center;
  171. justify-content: space-between;
  172. color: #666;
  173. font-size: 30rpx;
  174. }
  175. .footer_btn {
  176. background-color: #fff;
  177. z-index: 10078;
  178. position: fixed;
  179. bottom: 0rpx;
  180. display: flex;
  181. align-items: center;
  182. justify-content: space-between;
  183. width: 100%;
  184. height: 98rpx;
  185. padding: 0rpx 38rpx;
  186. border-top: 1rpx solid #eee;
  187. }
  188. .boxSty {
  189. padding: 44rpx 41rpx 0rpx;
  190. }
  191. .liListSty {
  192. width: 88rpx;
  193. height: 88rpx;
  194. border-radius: 32rpx;
  195. background-color: #ff3b30;
  196. text-align: center;
  197. line-height: 88rpx;
  198. color: #fff;
  199. font-size: 32rpx;
  200. float: left;
  201. margin: 20rpx 23rpx;
  202. }
  203. .answerInfos {
  204. padding: 25rpx 25rpx 25rpx 23rpx;
  205. }
  206. .answerTitle {
  207. margin-bottom: 28rpx;
  208. color: #666;
  209. font-size: 30rpx;
  210. }
  211. .answerContent {
  212. font-size: 30rpx;
  213. color: #666;
  214. }
  215. </style>