index.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. <template>
  2. <view class="bg">
  3. <m-nav-bar title="模拟考试" :transparent="true" />
  4. <view class="user">
  5. <image class="userImage" :src="headImage"></image>
  6. <view class="name">
  7. {{nickName}}
  8. </view>
  9. </view>
  10. <div class="content">
  11. <div class="title"></div>
  12. <div class="class">
  13. <span>考试科目</span>
  14. <span>{{ query.subject==1?'科目一':'科目四' }}</span>
  15. </div>
  16. <div class="class">
  17. <span>考试题库</span>
  18. <span>{{ query.vehicle }}{{ query.cert }}</span>
  19. </div>
  20. <div class="class">
  21. <span>考试时间</span>
  22. <span>{{ query.subject == "1" ? 100 : 50 }}题,45分钟</span>
  23. </div>
  24. <div class="class">
  25. <span>合格标准</span>
  26. <span>90分及格</span>
  27. </div>
  28. <div class="class">
  29. <span>出题规则</span>
  30. <span>交管局出题规则</span>
  31. </div>
  32. <!-- #ifdef MP-WEIXIN-->
  33. <!-- <div class="class">
  34. <span>学员姓名</span>
  35. <span>
  36. <input
  37. v-model="realName"
  38. class="class-input"
  39. placeholder="选填"
  40. confirm-type="send"
  41. type="text"
  42. />
  43. </span>
  44. </div> -->
  45. <!-- #endif -->
  46. <div class="remind">
  47. 答题后不可修改,累计错题扣分导致分数不及格时,系统自动交卷,考试不通过。
  48. </div>
  49. <view class="start" @click="gotoNextPage">
  50. <m-button class="start" width="532rpx" height="80rpx" text="开始考试" />
  51. </view>
  52. </div>
  53. </view>
  54. </template>
  55. <script>
  56. import api from "@/api/index";
  57. import utils from "@/utils/index";
  58. export default {
  59. data() {
  60. return {
  61. query: {},
  62. };
  63. },
  64. onLoad(query) {
  65. this.query = query;
  66. },
  67. computed: {
  68. headImage() {
  69. return this.$store.state.user.userInfo.headImage;
  70. },
  71. nickName(){
  72. return this.$store.state.user.userInfo.nickName;
  73. }
  74. },
  75. methods: {
  76. goMockExam(e) {},
  77. gotoNextPage(e) {
  78. let query = Object.assign({}, this.query);
  79. query.title = "模拟考试";
  80. uni.navigateTo({
  81. url: "/otherPages/mockExam/index?" + utils.mapToUrlQuery(query),
  82. });
  83. // #ifdef MP-WEIXIN
  84. // #endif
  85. },
  86. },
  87. };
  88. </script>
  89. <style scoped lang="scss">
  90. .bg{
  91. width: 100%;
  92. background-image: url('https://ct.zzxcx.net/ctjk/mp-wx/beforeMockExam/bg.png');
  93. height: 100vh;
  94. }
  95. .header-back {
  96. width: 750rpx;
  97. padding-bottom: 82px;
  98. background: linear-gradient(180deg, #498ef5 0%, #4da8e6 100%);
  99. border-radius: 0px 0px 82px 82px;
  100. .header {
  101. position: relative;
  102. font-size: 15px;
  103. padding: 15px;
  104. color: #ffffff;
  105. .title {
  106. position: absolute;
  107. left: 50%;
  108. top: 50%;
  109. transform: translate(-50%, -50%);
  110. }
  111. }
  112. .user-data {
  113. display: flex;
  114. flex-direction: column;
  115. align-items: center;
  116. padding: 15px;
  117. justify-content: space-between;
  118. height: 80px;
  119. color: #ffffff;
  120. font-size: 15px;
  121. font-family: PingFang SC;
  122. font-weight: 400;
  123. }
  124. }
  125. .class-input {
  126. width: 200rpx;
  127. border: none;
  128. background: #e2e2e2;
  129. border-radius: 30rpx;
  130. padding-left: 16rpx;
  131. }
  132. .user{
  133. padding-top: 40rpx;
  134. padding-left: 60rpx;
  135. height: 152rpx;
  136. display: flex;
  137. .userImage{
  138. width: 112rpx;
  139. height: 112rpx;
  140. }
  141. .name{
  142. height: 112rpx;
  143. line-height: 112rpx;
  144. font-size: 30rpx;
  145. padding-left: 12rpx;
  146. color: #fff;
  147. }
  148. }
  149. .content {
  150. width: 690rpx;
  151. background: #ffffff;
  152. box-shadow: 0px 0px 8rpx rgba(124, 129, 136, 0.2);
  153. border-radius: 20rpx;
  154. position: relative;
  155. left: 50%;
  156. top: 80rpx;
  157. transform: translateX(-50%);
  158. padding: 0rpx 0rpx;
  159. box-sizing: border-box;
  160. display: flex;
  161. flex-direction: column;
  162. align-items: center;
  163. padding-bottom: 80rpx;
  164. .title {
  165. background-image: url('https://ct.zzxcx.net/ctjk/mp-wx/beforeMockExam/header.png');
  166. background-size:100%;
  167. background-repeat: no-repeat;
  168. width: 100%;
  169. height: 116rpx;
  170. }
  171. .class {
  172. font-size: 26rpx;
  173. font-family: PingFang SC;
  174. font-weight: 400;
  175. display: flex;
  176. justify-content: space-between;
  177. align-content: center;
  178. align-items: center;
  179. width: 340rpx;
  180. margin-top: 26rpx;
  181. span {
  182. &:nth-of-type(1) {
  183. color: #8a9099;
  184. }
  185. &:nth-of-type(2) {
  186. color: #5c6066;
  187. }
  188. }
  189. }
  190. .remind {
  191. width: 630rpx;
  192. background: rgba(255, 77, 83, 0.1);
  193. font-size: 26rpx;
  194. font-family: PingFang SC;
  195. font-weight: 400;
  196. line-height: 38rpx;
  197. color: #ff4d53;
  198. padding: 16rpx 24rpx;
  199. box-sizing: border-box;
  200. margin-top: 48rpx;
  201. }
  202. .start {
  203. color: #ffffff;
  204. margin-top: 30px;
  205. background: #498ef5;
  206. border-radius: 40rpx;
  207. overflow: hidden;
  208. }
  209. }
  210. </style>