学习视频人脸识别允许返回上一页,考试过程不允许返回

dev
LiuJiaNan 2024-05-23 11:28:29 +08:00
parent 057156f6be
commit 1823dfe7bb
2 changed files with 22 additions and 19 deletions

View File

@ -209,16 +209,16 @@ export default {
entrySite: '', entrySite: '',
} }
}, },
// onBackPress(event) { onBackPress(event) {
// if (event.from === "backbutton") { if (event.from === "backbutton") {
// uni.showToast({ uni.showToast({
// title:'', title:'正在答题中',
// icon:'none' icon:'none'
// }) })
// return true; return true;
// } }
// return false; return false;
// }, },
onLoad(options) { onLoad(options) {
this.STAGEEXAMPAPERINPUT_ID = options.STAGEEXAMPAPERINPUT_ID; this.STAGEEXAMPAPERINPUT_ID = options.STAGEEXAMPAPERINPUT_ID;
this.STAGEEXAMPAPER_ID = options.STAGEEXAMPAPER_ID; this.STAGEEXAMPAPER_ID = options.STAGEEXAMPAPER_ID;

View File

@ -100,19 +100,22 @@
}, },
onBackPress(event) { onBackPress(event) {
if (event.from === "backbutton") { if (event.from === "backbutton") {
uni.showToast({ // uni.showToast({
icon:'none', // icon:'none',
title:'请完成人脸验证' // title:'请完成人脸验证'
}) // })
return true; uni.navigateBack({
delta: 2
});
return true;
} }
return false; return false;
}, },
methods: { methods: {
snapshot() { snapshot() {
uni.showLoading({ // uni.showLoading({
title: "加载中", // title: "加载中",
}); // });
this.context.snapshot({ this.context.snapshot({
success: (e) => { success: (e) => {
this.getMinImage(e.message.tempImagePath); this.getMinImage(e.message.tempImagePath);
@ -160,7 +163,7 @@
...this.params ...this.params
}, },
success: (res) => { success: (res) => {
uni.hideLoading();//结束加载中动画 // uni.hideLoading();//结束加载中动画
if (res.data != null) { if (res.data != null) {
var result = res.data.result; var result = res.data.result;
if ("success" == result) { if ("success" == result) {