|
@@ -25,7 +25,7 @@
|
|
|
</Modal>
|
|
|
</div>
|
|
|
<div v-else>
|
|
|
- 正在等待数据返回...
|
|
|
+ 正在等待数据返回... <i-button class="qm-primary-button" v-if="timeouted" @click="reloadPage">重试</i-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -44,7 +44,7 @@ const { mapState, mapMutations } = createNamespacedHelpers("examingHomeModule");
|
|
|
export default {
|
|
|
name: "ExamingHome",
|
|
|
data() {
|
|
|
- return { showFaceId: false, faceEnable: false };
|
|
|
+ return { showFaceId: false, faceEnable: false, timeouted: false };
|
|
|
},
|
|
|
async created() {
|
|
|
// if (!this.$route.params.order) {
|
|
@@ -52,6 +52,7 @@ export default {
|
|
|
// this.$router.push(this.$route.fullPath + "/order/1");
|
|
|
// return;
|
|
|
// }
|
|
|
+ this.timeoutTimeout = setTimeout(() => (this.timeouted = true), 30 * 1000);
|
|
|
await this.initData();
|
|
|
|
|
|
// 仅在线上使用活体检测
|
|
@@ -115,6 +116,7 @@ export default {
|
|
|
// });
|
|
|
},
|
|
|
beforeDestroy() {
|
|
|
+ clearTimeout(this.timeoutTimeout);
|
|
|
clearInterval(this.submitInterval);
|
|
|
clearInterval(this.snapInterval);
|
|
|
clearTimeout(this.faceIdMsgTimeout);
|
|
@@ -320,6 +322,9 @@ export default {
|
|
|
eq => eq.order == this.$route.params.order // number == string
|
|
|
)
|
|
|
);
|
|
|
+ },
|
|
|
+ reloadPage() {
|
|
|
+ window.location.reload();
|
|
|
}
|
|
|
},
|
|
|
computed: {
|