|
@@ -76,6 +76,7 @@ import TreeView from "@/components/TreeView";
|
|
|
import { getContent } from "@/api/ajax";
|
|
|
import Cookies from "js-cookie";
|
|
|
import Preview from "@/components/Adult/Preview.vue";
|
|
|
+import { getToken } from "../utils/auth";
|
|
|
export default {
|
|
|
name: "CourseView",
|
|
|
components: {
|
|
@@ -123,10 +124,15 @@ export default {
|
|
|
created() {
|
|
|
const _this = this;
|
|
|
_this.bookId = this.$route.query.bookId;
|
|
|
- _this.isAnswerItemShow = true;
|
|
|
// if (localStorage.getItem("Bookanswer")) {
|
|
|
// this.TaskModel = "ANSWER";
|
|
|
// }
|
|
|
+ let userInfor = JSON.parse(getToken());
|
|
|
+ if (userInfor && userInfor.user_type == "TEACHER") {
|
|
|
+ _this.isAnswerItemShow = true;
|
|
|
+ } else {
|
|
|
+ _this.isAnswerItemShow = false;
|
|
|
+ }
|
|
|
},
|
|
|
methods: {
|
|
|
changeTreeData(val) {
|