diff --git a/src/project/qujing/AppLegalLearning/components/GeneralLawExam.vue b/src/project/qujing/AppLegalLearning/components/GeneralLawExam.vue index 4d99f52..d21da49 100644 --- a/src/project/qujing/AppLegalLearning/components/GeneralLawExam.vue +++ b/src/project/qujing/AppLegalLearning/components/GeneralLawExam.vue @@ -24,19 +24,22 @@
参加考试
- -
-
- + + +
+
居民信息认证
+ +
+
姓名
+ +
身份证号
+ +
+ +
+
取消
+
确定
-
发送
@@ -46,6 +49,7 @@ export default { data() { return { + showAuth: false, keyword: '', current: 1, } @@ -151,5 +155,59 @@ export default { } } } + + .auth_box { + padding: 32px; + box-sizing: border-box; + + .auth_title { + font-weight: 600; + font-size: 34px; + color: #333333; + text-align: center; + } + .auth_form { + margin-top: 30px; + + .form_name { + font-weight: 500; + font-size: 28px; + color: #333333; + margin-bottom: 16px; + } + + input { + height: 96px; + background: #F4F5FA; + border-radius: 16px; + margin-bottom: 32px; + padding-left: 24px; + } + } + + .auth_btn { + display: flex; + justify-content: space-between; + height: 100px; + padding: 10px 0; + box-sizing: border-box; + .cancel { + background: #F2F2F2; + color: #2D7DFF; + } + .submit { + background: #2D7DFF; + color: #FFF; + } + .cancel, + .submit { + width: 48%; + height: 80px; + line-height: 80px; + text-align: center; + border-radius: 16px; + } + } + } } diff --git a/src/project/qujing/AppLegalLearning/result.vue b/src/project/qujing/AppLegalLearning/result.vue new file mode 100644 index 0000000..52cb913 --- /dev/null +++ b/src/project/qujing/AppLegalLearning/result.vue @@ -0,0 +1,139 @@ + + + + + \ No newline at end of file diff --git a/src/project/qujing/AppLegalLearning/testForm.vue b/src/project/qujing/AppLegalLearning/testForm.vue index 21cb337..0533297 100644 --- a/src/project/qujing/AppLegalLearning/testForm.vue +++ b/src/project/qujing/AppLegalLearning/testForm.vue @@ -1,21 +1,24 @@ @@ -25,10 +28,10 @@ export default { data() { return { backgroundNavbar: { - background: "url('./img/navbar.png') no-repeat", - backgroundSize: '100% 100%', + // background: "url('./img/navbar.png') no-repeat", + // backgroundSize: '100% 100%', }, - activeIndex: 0, + options: ['A','B','C','D','E','F','G','H','I','J','K','L','M'], questionList: [ { @@ -61,7 +64,11 @@ export default { answer: "答案", jiexi: '解析' } - ] + ], + startX: 0, // 滑动开始x轴位置 + moveX: 0, // 滑动的x轴距离 + activeIndex: 0, // 当前第几题 + newIndex: 0, // 滑动到第几题 } }, methods: { @@ -71,8 +78,29 @@ export default { next() { this.activeIndex ++; }, - touchStart() {}, - touchEnd() {}, + touchStart(e) { + this.startX = e.changedTouches[0].pageX + console.log('开始触摸:', this.startX); + }, + touchEnd(e, index) { // 手指离开屏幕时触发 + // 获取滑动距离 + const moveX = e.changedTouches[0].pageX - this.startX + // 判断滑动方向 + if (moveX < -100 && index < this.topic.length-1) { + // 【下一题】 判断大幅度左滑且不是最后一题 + this.newIndex=this.newIndex+1 + this.activeIndex= this.activeIndex+1 + console.log('第'+this.index+'题'); + } + else if (moveX > 100 && index!= 0) { + // 【上一题】 判断大幅度右滑且不是第一题 + this.newIndex=this.newIndex-1 + this.activeIndex=this.activeIndex-1 + } + }, + confirm() { + uni.navigateTo({url: './result'}) + }, }, onReachBottom() { this.current ++;