mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/student-h5.git
synced 2025-12-06 09:26:46 +08:00
Merge branch 'zcwy-zsx' into dev0731
This commit is contained in:
@@ -223,7 +223,11 @@
|
||||
<el-dialog v-model="centerDialogVisible" title="" width="70%" center :show-close="false" :align-center="true">
|
||||
<div style="text-align: center;font-size:16px;"> <span style="color:black">
|
||||
您已完成评估
|
||||
</span></div>
|
||||
</span>
|
||||
<div style="color:black;font-size:16px;">
|
||||
将于<span style="margin: 0 2px 0 2px;">{{ deadline }}</span>秒后跳转到首页
|
||||
</div>
|
||||
</div>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button class="cancel"
|
||||
@@ -231,7 +235,7 @@
|
||||
@click="centerDialogVisible = false">取消</el-button>
|
||||
<el-button class="back"
|
||||
style="background: #387DF7;box-shadow: 1px 2px 15px 1px rgba(56,125,247,0.34);border: 0px;padding: 8px 32px;"
|
||||
type="primary" @click="centerDialogVisible = false">
|
||||
type="primary" @click="pauseCountdown()">
|
||||
确定
|
||||
</el-button>
|
||||
</span>
|
||||
@@ -439,11 +443,31 @@ onMounted(() => {
|
||||
})
|
||||
console.log(data,'data')
|
||||
});
|
||||
const deadline = ref(3);
|
||||
const centerDialogVisible = ref(false);
|
||||
const timer = ref(null);
|
||||
const open = () => {
|
||||
centerDialogVisible.value = true;
|
||||
timer.value = setInterval(() => {
|
||||
if (deadline.value > 0) {
|
||||
deadline.value -= 1;
|
||||
} else {
|
||||
pauseCountdown();
|
||||
}
|
||||
}, 1000);
|
||||
};
|
||||
const goBack = () => {
|
||||
window.location.href =
|
||||
window.location.protocol + import.meta.env.VITE_BOE_HOME;
|
||||
}
|
||||
const pauseCountdown = () => {
|
||||
centerDialogVisible.value = false;
|
||||
if (timer.value) {
|
||||
clearInterval(timer.value);
|
||||
timer.value = null;
|
||||
goBack()
|
||||
}
|
||||
};
|
||||
|
||||
const isEmptyValue = ref(false);
|
||||
function emptyValuePromp() {
|
||||
if (data.value.isSubmit) {
|
||||
|
||||
Reference in New Issue
Block a user