|
@@ -23,7 +23,7 @@
|
|
|
<p slot="footer">
|
|
|
</p>
|
|
|
</Modal>
|
|
|
- <FaceTracking v-if="faceEnable" />
|
|
|
+ <FaceTracking v-if="faceEnable && PRODUCTION" />
|
|
|
</div>
|
|
|
<div v-else>
|
|
|
正在等待数据返回... <i-button class="qm-primary-button" v-if="timeouted" @click="reloadPage">重试</i-button>
|
|
@@ -46,7 +46,12 @@ const { mapState, mapMutations } = createNamespacedHelpers("examingHomeModule");
|
|
|
export default {
|
|
|
name: "ExamingHome",
|
|
|
data() {
|
|
|
- return { showFaceId: false, faceEnable: false, timeouted: false };
|
|
|
+ return {
|
|
|
+ showFaceId: false,
|
|
|
+ faceEnable: false,
|
|
|
+ timeouted: false,
|
|
|
+ PRODUCTION: process.env.NODE_ENV === "production"
|
|
|
+ };
|
|
|
},
|
|
|
async created() {
|
|
|
this.timeoutTimeout = setTimeout(() => (this.timeouted = true), 30 * 1000);
|
|
@@ -123,6 +128,10 @@ export default {
|
|
|
10 * 1000 // 10秒检查是否有更改需要提交答案
|
|
|
);
|
|
|
},
|
|
|
+ mounted() {
|
|
|
+ // iview bug: https://github.com/iview/iview/issues/4061
|
|
|
+ document.body.style = "";
|
|
|
+ },
|
|
|
beforeDestroy() {
|
|
|
clearTimeout(this.timeoutTimeout);
|
|
|
clearInterval(this.submitInterval);
|
|
@@ -476,13 +485,13 @@ export default {
|
|
|
|
|
|
@media screen and (max-height: 768px) {
|
|
|
.container {
|
|
|
- grid-template-rows: 50px 1fr;
|
|
|
+ grid-template-rows: 50px minmax(0, 1fr);
|
|
|
}
|
|
|
.header {
|
|
|
height: 50px;
|
|
|
}
|
|
|
.side {
|
|
|
- grid-template-rows: 1fr 200px;
|
|
|
+ grid-template-rows: minmax(0, 1fr) 200px;
|
|
|
}
|
|
|
}
|
|
|
</style>
|