|
@@ -39,7 +39,7 @@
|
|
|
style="background-color: rgba(0, 0, 0, 0.5); display: inline-block;
|
|
|
padding: 6px 16px; border-radius: 6px;"
|
|
|
>
|
|
|
- 我的底照
|
|
|
+ {{ userPhoto ? "我的底照" : "无底照" }}
|
|
|
</span>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -76,35 +76,15 @@ const { mapState, mapMutations } = createNamespacedHelpers("examHomeModule");
|
|
|
export default {
|
|
|
name: "OnlineExamFaceCheckModal",
|
|
|
data() {
|
|
|
- return { userPhoto: null, closeCamera: false };
|
|
|
+ return {
|
|
|
+ userPhoto: this.$store.state.user.photoPath,
|
|
|
+ closeCamera: false
|
|
|
+ };
|
|
|
},
|
|
|
props: {
|
|
|
open: Boolean,
|
|
|
course: Object
|
|
|
},
|
|
|
- async mounted() {
|
|
|
- try {
|
|
|
- const res = await this.$http.get(
|
|
|
- "/api/ecs_core/student/getStudentInfoBySession"
|
|
|
- );
|
|
|
- this.userPhoto = res.data.photoPath;
|
|
|
- if (this.course && this.course.faceEnable && !this.userPhoto) {
|
|
|
- this.$Message.error({
|
|
|
- content: "没有底照",
|
|
|
- duration: 15,
|
|
|
- closable: true
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
- } catch (error) {
|
|
|
- this.$Message.error({
|
|
|
- content: "获取学生底照信息失败",
|
|
|
- duration: 15,
|
|
|
- closable: true
|
|
|
- });
|
|
|
- this.closeModal();
|
|
|
- }
|
|
|
- },
|
|
|
computed: {
|
|
|
...mapState(["faceCheckModalOpen"])
|
|
|
},
|