begin.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. <template>
  2. <div class="container">
  3. <div style="background: #f4f3ef">
  4. <div class="header-text-left">Sub of a Driver Training System</div>
  5. <div class="headerImg">
  6. <img :src="subjectImg" />
  7. <img v-if="visible" @touchstart="backViewH5" src="@/assets/img/backButton.png" class="backButton" />
  8. </div>
  9. <div class="header-text-right">Sub of a Driver Training System</div>
  10. <div style="background: #fff; width: 100%; overflow: hidden" class="">
  11. <div class="content">
  12. <div class="box1">
  13. <div class="info">考试须知:</div>
  14. <div>1.遵守考场纪律,服从监考人员指挥。</div>
  15. <div>2.进入考场、手机关机。禁止抽烟,禁止吃零食。</div>
  16. <div>3.未经工作人员允许,考生禁止随意出入考场。</div>
  17. <div>4.考场内禁止大声题哗,禁止随意走动。</div>
  18. <div>5.考试中认真答题,不准交头接耳。</div>
  19. <div>6.考试中不准冒名顶替,不准弄虚作假。</div>
  20. <div>7.注意考场卫生,禁止随地吐痰,禁止乱扔纸屑。</div>
  21. <div>8.爱护公物及考试设备。</div>
  22. </div>
  23. <div class="box2">
  24. <div class="info">驾考理论考试01号考台:</div>
  25. <div style="color: #ba2f35" class="box2-id">身份证号:123456789101112131415161718</div>
  26. <div class="box2-space1"></div>
  27. <div class="box2-name" style="color: #ba2f35">
  28. 考生姓名:{{ query.username || '张三' }}
  29. </div>
  30. <div class="pl124 exam-container">
  31. <div
  32. @click="
  33. () => {
  34. push({
  35. name: 'examTest',
  36. query: query,
  37. });
  38. }
  39. "
  40. class="exam-button"
  41. >
  42. 开始考试
  43. </div>
  44. </div>
  45. <div class="mt14" style="color: #ba2f35">点击"确认"按钮开始考试</div>
  46. <div class="box2-tip" style="color: #666769">
  47. 操作提示:每题考试答案确认后,点击【下一题】,电脑立即判定所选答案,如选择错误,系统将提示正确答案,提示后不允许修改答案。
  48. </div>
  49. </div>
  50. </div>
  51. </div>
  52. </div>
  53. </div>
  54. </template>
  55. <script lang="ts">
  56. import { defineComponent, ref } from 'vue';
  57. import { useRouter, useRoute } from 'vue-router';
  58. // import Api from '@/api/api';
  59. import Phone from '@/utils/phone';
  60. import subject4Img from '@/assets/img/subject4@2x.png';
  61. import subject1Img from '@/assets/img/subject1@2x.png';
  62. export default defineComponent({
  63. setup() {
  64. // window.localStorage.setItem(
  65. // 'token',
  66. // 'eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjllNTU3NDk1LWQyOGQtNDMyNy1hYTBjLTdjOTk2OTk5NTk1YiJ9.GvGgys5erlFYJMLEhk2S1e7W_9CKDJohfXfW8fZpitkpZ8RWni5u9VvTGjl8dhD1916s-4MTM_7TsNaTNwsuPg',
  67. // );
  68. //旋转你的屏幕
  69. const phone = new Phone();
  70. const backView = phone.backView.bind(phone);
  71. const push = useRouter().push;
  72. const route = useRoute();
  73. const query = route.query;
  74. const subjectImg = query.subject == '1' ? subject1Img : subject4Img;
  75. console.log(query);
  76. if (query.token) {
  77. window.localStorage.setItem('token', query.token as string);
  78. }
  79. // Api.loginCodeTest().then(res=>{
  80. // console.log(res)
  81. // window.localStorage.setItem("token",res.data.token)
  82. // })
  83. const visible = ref(true)
  84. const backViewH5 = (e:TouchEvent)=>{
  85. alert("backViewH5")
  86. e.preventDefault();
  87. backView()
  88. }
  89. return {
  90. query,
  91. push,
  92. subjectImg,
  93. backViewH5,
  94. visible
  95. };
  96. },
  97. });
  98. </script>
  99. <style lang="scss" scoped>
  100. .font11 {
  101. font-size: 11px;
  102. }
  103. .mt14 {
  104. margin-top: 14px;
  105. }
  106. .pl138 {
  107. padding-left: 138px;
  108. }
  109. .pl124 {
  110. padding-left: 124px;
  111. }
  112. .pl24 {
  113. padding-left: 24px;
  114. }
  115. .exam-container {
  116. margin-top: 18px;
  117. .exam-button {
  118. width: 106px;
  119. height: 27px;
  120. background: #fff;
  121. opacity: 1;
  122. line-height: 27px;
  123. color: #38393b;
  124. text-align: center;
  125. border-radius: 4px;
  126. font-size: 16px;
  127. border: 1px solid #a1a2a4;
  128. border-radius: 0;
  129. }
  130. }
  131. .container {
  132. width: 100%;
  133. height: 100%;
  134. display: flex;
  135. flex-direction: column;
  136. background: #fff;
  137. position: relative;
  138. .backButton {
  139. position: absolute;
  140. top: 28px;
  141. left: 13px;
  142. width: 22px;
  143. height: 22px;
  144. z-index: 999;
  145. cursor: pointer;
  146. }
  147. }
  148. .header {
  149. width: 100%;
  150. height: 21.8vh;
  151. background: linear-gradient(180deg, #498ef5 0%, #4da8e6 100%);
  152. font-size: 26px;
  153. line-height: 21.8vh;
  154. color: white;
  155. }
  156. .header-text-left {
  157. color: #a9a9a1;
  158. text-align: left;
  159. height: 13px;
  160. line-height: 13px;
  161. font-size: 8px;
  162. }
  163. .header-text-right {
  164. color: #a9a9a1;
  165. text-align: right;
  166. height: 13px;
  167. font-size: 8px;
  168. border-bottom: 1px solid #d8d7d3;
  169. padding-right: 15px;
  170. }
  171. .headerImg {
  172. width: 100%;
  173. height: auto;
  174. > img {
  175. width: 100%;
  176. height: auto;
  177. }
  178. }
  179. .mt15 {
  180. margin-top: 15px;
  181. }
  182. .content {
  183. width: 723px;
  184. height: 67vh;
  185. padding: 0 0;
  186. margin: 0 auto;
  187. margin-top: 16px;
  188. display: flex;
  189. flex-wrap: wrap;
  190. border: 1px solid #eae9e5;
  191. background: #f5f6f8;
  192. .box1 {
  193. width: 50%;
  194. height: 100%;
  195. padding-top: 15px;
  196. padding-left: 20px;
  197. color: #3d3c38;
  198. border-right: 1px solid #eae9e5;
  199. .info {
  200. font-size: 14px;
  201. margin-bottom: 7px;
  202. font-weight: 700;
  203. font-size: 14px;
  204. }
  205. div {
  206. text-align: left;
  207. font-size: 13px;
  208. margin-bottom: 4px;
  209. }
  210. }
  211. .box2 {
  212. width: 50%;
  213. height: 100%;
  214. text-align: left;
  215. padding-top: 18px;
  216. padding-left: 17px;
  217. font-size: 13px;
  218. .box2-space1 {
  219. height: 5px;
  220. }
  221. .box2-id {
  222. font-weight: 700;
  223. font-size: 13px;
  224. }
  225. .box2-name {
  226. font-weight: 700;
  227. font-size: 13px;
  228. }
  229. .box2-tip {
  230. margin-top: 7px;
  231. font-size: 11px;
  232. }
  233. .info {
  234. margin-bottom: 7px;
  235. font-size: 14px;
  236. font-weight: 700;
  237. }
  238. }
  239. }
  240. </style>