Browse Source

收藏权限

natasha 4 weeks ago
parent
commit
1997546d30
1 changed files with 8 additions and 0 deletions
  1. 8 0
      src/views/courseView.vue

+ 8 - 0
src/views/courseView.vue

@@ -364,6 +364,13 @@ export default {
     } else if (_this.$route.query.showCourse) {
       _this.bookId = this.$route.query.bookId;
       this.showContent = true;
+      const MethodName = "book-book_manager-GetBook";
+      const data = {
+        id: _this.bookId,
+      };
+      getContent(MethodName, data).then((res) => {
+        sessionStorage.setItem("Bookdetail", JSON.stringify(res));
+      });
     } else if (_this.$route.query.fromPage === "OBOC") {
       _this.bookId = this.$route.query.bookId;
       const MethodName = "book-book_manager-GetBook";
@@ -373,6 +380,7 @@ export default {
       getContent(MethodName, data).then((res) => {
         this.showContent = true;
         _this.name = res.name;
+        sessionStorage.setItem("Bookdetail", JSON.stringify(res));
       });
     } else {
       _this.$message({