Browse Source

去学习跳转

natasha 2 years ago
parent
commit
422fe5b2f1
3 changed files with 13 additions and 2 deletions
  1. 1 1
      src/views/TextbookDetail.vue
  2. 1 1
      src/views/courseList.vue
  3. 11 0
      src/views/courseView.vue

+ 1 - 1
src/views/TextbookDetail.vue

@@ -460,7 +460,7 @@ export default {
     // 购买
     getPurchase() {
       if (this.bookIsBuy == "true") {
-        this.$router.push("/courseview?bookId=" + this.TextBookId);
+        this.$router.push("/courseview?bookId=" + this.TextBookId+"&showCourse=true");
       } else {
         this.NopymentShow = true;
       }

+ 1 - 1
src/views/courseList.vue

@@ -589,7 +589,7 @@ export default {
     // 预览
     handleView(row) {
       sessionStorage.setItem("Bookdetail", JSON.stringify(row));
-      this.$router.push("/courseview?bookId=" + row.id);
+      this.$router.push("/courseview?bookId=" + row.id+"&showCourse=true");
     },
     // 激活码
     handleDiscount(row) {

+ 11 - 0
src/views/courseView.vue

@@ -265,6 +265,17 @@ export default {
                 type: "warning",
             });
         });
+    }else if(_this.$route.query.showCourse){
+        _this.bookId = this.$route.query.bookId;
+        _this.type = this.$route.query.type;
+        const MethodName = "book-book_manager-GetBook";
+        const data = {
+            id: _this.bookId,
+        };
+        getContent(MethodName, data).then((res) => {
+            this.showContent = true
+            _this.name = res.name;
+        });
     }else {
         _this.$message({
             message: "链接已失效",