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. visible.value =false
  88. backView()
  89. }
  90. return {
  91. query,
  92. push,
  93. subjectImg,
  94. backViewH5,
  95. visible
  96. };
  97. },
  98. });
  99. </script>
  100. <style lang="scss" scoped>
  101. .font11 {
  102. font-size: 11px;
  103. }
  104. .mt14 {
  105. margin-top: 14px;
  106. }
  107. .pl138 {
  108. padding-left: 138px;
  109. }
  110. .pl124 {
  111. padding-left: 124px;
  112. }
  113. .pl24 {
  114. padding-left: 24px;
  115. }
  116. .exam-container {
  117. margin-top: 18px;
  118. .exam-button {
  119. width: 106px;
  120. height: 27px;
  121. background: #fff;
  122. opacity: 1;
  123. line-height: 27px;
  124. color: #38393b;
  125. text-align: center;
  126. border-radius: 4px;
  127. font-size: 16px;
  128. border: 1px solid #a1a2a4;
  129. border-radius: 0;
  130. }
  131. }
  132. .container {
  133. width: 100%;
  134. height: 100%;
  135. display: flex;
  136. flex-direction: column;
  137. background: #fff;
  138. position: relative;
  139. .backButton {
  140. position: absolute;
  141. top: 28px;
  142. left: 13px;
  143. width: 22px;
  144. height: 22px;
  145. z-index: 999;
  146. cursor: pointer;
  147. }
  148. }
  149. .header {
  150. width: 100%;
  151. height: 21.8vh;
  152. background: linear-gradient(180deg, #498ef5 0%, #4da8e6 100%);
  153. font-size: 26px;
  154. line-height: 21.8vh;
  155. color: white;
  156. }
  157. .header-text-left {
  158. color: #a9a9a1;
  159. text-align: left;
  160. height: 13px;
  161. line-height: 13px;
  162. font-size: 8px;
  163. }
  164. .header-text-right {
  165. color: #a9a9a1;
  166. text-align: right;
  167. height: 13px;
  168. font-size: 8px;
  169. border-bottom: 1px solid #d8d7d3;
  170. padding-right: 15px;
  171. }
  172. .headerImg {
  173. width: 100%;
  174. height: auto;
  175. > img {
  176. width: 100%;
  177. height: auto;
  178. }
  179. }
  180. .mt15 {
  181. margin-top: 15px;
  182. }
  183. .content {
  184. width: 723px;
  185. height: 67vh;
  186. padding: 0 0;
  187. margin: 0 auto;
  188. margin-top: 16px;
  189. display: flex;
  190. flex-wrap: wrap;
  191. border: 1px solid #eae9e5;
  192. background: #f5f6f8;
  193. .box1 {
  194. width: 50%;
  195. height: 100%;
  196. padding-top: 15px;
  197. padding-left: 20px;
  198. color: #3d3c38;
  199. border-right: 1px solid #eae9e5;
  200. .info {
  201. font-size: 14px;
  202. margin-bottom: 7px;
  203. font-weight: 700;
  204. font-size: 14px;
  205. }
  206. div {
  207. text-align: left;
  208. font-size: 13px;
  209. margin-bottom: 4px;
  210. }
  211. }
  212. .box2 {
  213. width: 50%;
  214. height: 100%;
  215. text-align: left;
  216. padding-top: 18px;
  217. padding-left: 17px;
  218. font-size: 13px;
  219. .box2-space1 {
  220. height: 5px;
  221. }
  222. .box2-id {
  223. font-weight: 700;
  224. font-size: 13px;
  225. }
  226. .box2-name {
  227. font-weight: 700;
  228. font-size: 13px;
  229. }
  230. .box2-tip {
  231. margin-top: 7px;
  232. font-size: 11px;
  233. }
  234. .info {
  235. margin-bottom: 7px;
  236. font-size: 14px;
  237. font-weight: 700;
  238. }
  239. }
  240. }
  241. </style>