Commit 18df880a authored by zhengke's avatar zhengke

21

parents eda2056c 0daca193
......@@ -147,7 +147,7 @@ import {
computed,
onMounted,
} from "vue";
import { changeNumToHan, getSystemInfo } from "../../utils/index";
import { changeNumToHan } from "../../utils/index";
export default {
props: {
paperData: Object,
......@@ -241,23 +241,32 @@ export default {
clearTimeout(data.timer);
data.timer = setTimeout(() => {
data.timeOutEvent = true;
}, 300);
}, 100);
},
touchmove(e) {
if (data.timeOutEvent) {
console.log("长按了");
let touches = e.touches[0];
let startTy = touches.clientY;
getSystemInfo((res) => {
let screenHeight = res.screenHeight;
let screenHeight = uni.getSystemInfoSync().screenHeight;
data.questionH = (screenHeight - startTy) * 2;
});
}
},
touchend() {
data.timeOutEvent = false;
clearTimeout(data.timer);
},
//获取正确答案
getTrueAnswer(item) {
let AnSwer = "";
if (item && item.length > 0) {
item.forEach((x) => {
if (x.IsAnswer) {
AnSwer = x.Name;
}
});
}
return AnSwer;
},
};
onMounted(() => {
if (props.isLast) {
......
......@@ -112,6 +112,7 @@
:isLast="isLast"
:sort="index"
:sortTotal="peaperDetail.Paper.GroupList.length"
:isOperate="isOperate"
@getAfterTopic="getAfterTopic()"
@getBeforeTopic="getBeforeTopic()"
@answerChange="getAnswerChange($event, index)"
......@@ -328,7 +329,6 @@ import {
computed,
onMounted,
} from "vue";
import { getSystemInfo } from "../../utils/index";
import { getPaperDetail } from "../../api/exam";
import { changeNumToHan } from "../../utils/index";
......@@ -484,7 +484,6 @@ export default {
<style scoped>
.exam-con {
box-sizing: border-box;
/* padding: 0 30rpx 30rpx; */
}
.answerSheet {
font-size: 30rpx;
......
//获取设备信息
export let getSystemInfo = (callback) => {
return uni.getSystemInfoSync()
}
//脱敏
export let desensitization = (str, beginLen, endLen) => {
let len = str.length;
......
......@@ -28,8 +28,8 @@ let request = (param) => {
type: 'fail',
message: res.data.Message,
onClose: () => {
if (res.data.Code === 10001) {
uni.navigateTo({
if (res.data.Code === 10001 || res.data.Code === 10000) {
uni.reLaunch({
url: '/pages/login/login'
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment