|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <div class="container" ref="container">
|
|
|
+ <div class="container" @touchmove="slideTopics" ref="container">
|
|
|
<div class="tab">
|
|
|
<div
|
|
|
v-for="(item, index) in tabItemList"
|
|
@@ -25,7 +25,7 @@
|
|
|
<div class="topics">
|
|
|
<div class="topics-title">{{ list[listIndex].type == 1 ? '判断' : '选择' }}</div>
|
|
|
<div class="topics-content">
|
|
|
- {{ list[listIndex].explainJs }}
|
|
|
+ {{ list[listIndex].name }}
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="options">
|
|
@@ -300,7 +300,7 @@
|
|
|
</div>
|
|
|
<div class="explain-header">题目解析</div>
|
|
|
<div class="explain-content">
|
|
|
- 《机动车驾驶证申请和使用规定》第八十条:机动车驾驶人在实习期内发生的道路交通安全违法行为被记满12分的,注销其实习的准驾车型驾驶资格
|
|
|
+ {{ list[listIndex].explainJs }}
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="bottom">
|
|
@@ -364,6 +364,7 @@ let list = ref<questionTwoList.row[]>([
|
|
|
an6: '',
|
|
|
an7: '',
|
|
|
cartype: '',
|
|
|
+ name: '机动车驾驶人在实习期内有记满12分记录的,注销其实习的准驾车型驾驶资格。',
|
|
|
explainJs:
|
|
|
'《机动车驾驶证申请和使用规定》第八十条:机动车驾驶人在实习期内发生的道路交通安全违法行为被记满12分的,注销其实习的准驾车型驾驶资格',
|
|
|
id: 0,
|
|
@@ -474,6 +475,33 @@ let selectAnswer = (item: questionTwoList.row, index: number) => {
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
+
|
|
|
+let slideTopics = (() => {
|
|
|
+ let touchList0: TouchList;
|
|
|
+ let beginTimeStrap: number = 0;
|
|
|
+
|
|
|
+ return (e: TouchEvent) => {
|
|
|
+ let currentTimeStrap: number = +new Date();
|
|
|
+ let touchList1: TouchList;
|
|
|
+ if (currentTimeStrap - beginTimeStrap < 2000) {
|
|
|
+ touchList1 = e.changedTouches;
|
|
|
+ //单点触摸的时候
|
|
|
+ if (touchList0.length == 1 && touchList1.length == 1) {
|
|
|
+ console.log(touchList1[0].clientX - touchList0[0].clientX);
|
|
|
+ if (touchList1[0].clientX - touchList0[0].clientX > 160) {
|
|
|
+ nextTopics();
|
|
|
+ touchList0 = e.changedTouches;
|
|
|
+ } else if (touchList1[0].clientX - touchList0[0].clientX < -160) {
|
|
|
+ backTopics();
|
|
|
+ touchList0 = e.changedTouches;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ beginTimeStrap = currentTimeStrap;
|
|
|
+ touchList0 = e.changedTouches;
|
|
|
+ }
|
|
|
+ };
|
|
|
+})();
|
|
|
//初始获取题目
|
|
|
getPage(0);
|
|
|
|