瀏覽代碼

临时链接

natasha 2 年之前
父節點
當前提交
c773fd7edc
共有 1 個文件被更改,包括 33 次插入22 次删除
  1. 33 22
      src/views/courseView.vue

+ 33 - 22
src/views/courseView.vue

@@ -14,7 +14,11 @@
         {{ name }}
       </div>
     </div>
-    <div class="content" id="content-scroll" :class="[type?'content-top':'']">
+    <div
+      class="content"
+      id="content-scroll"
+      :class="[type ? 'content-top' : '']"
+    >
       <div
         id="content-tree"
         :class="[fullTree ? 'content-tree-full' : 'content-tree']"
@@ -238,10 +242,17 @@ export default {
     _this.bookId = this.$route.query.bookId;
 
     _this.type = this.$route.query.type;
-    _this.bookName.forEach((item) => {
-      if (item.id == _this.bookId) {
-        _this.name = item.name;
-      }
+    // _this.bookName.forEach((item) => {
+    //   if (item.id == _this.bookId) {
+    //     _this.name = item.name;
+    //   }
+    // });
+    const MethodName = "book-book_manager-GetBook";
+    const data = {
+      id: _this.bookId,
+    };
+    getContent(MethodName, data).then((res) => {
+      _this.name = res.name;
     });
   },
   mounted() {},
@@ -262,7 +273,7 @@ export default {
         _this.fullTree = false;
         document.getElementById("content-tree").style.display = "none";
       }
-      document.getElementById("content-scroll").scrollTop = 0
+      document.getElementById("content-scroll").scrollTop = 0;
     },
     // 点击全屏展示 隐藏tree
     fullScreen() {
@@ -346,12 +357,12 @@ export default {
 };
 </script>
 <style lang="scss" scoped>
-.header-box{
-    position: fixed;
-    width: 100%;
-    top: 0;
-    left: 0;
-    z-index:999;
+.header-box {
+  position: fixed;
+  width: 100%;
+  top: 0;
+  left: 0;
+  z-index: 999;
 }
 .container {
   width: 100%;
@@ -375,14 +386,14 @@ export default {
     height: 100vh;
     overflow: auto;
     padding-top: 124px;
-    &-top{
-        padding-top: 60px;
-        .title-box {
-            top: 66px !important;
-        }
-        .content-tree-full {
-            top: 100px !important;
-        }
+    &-top {
+      padding-top: 60px;
+      .title-box {
+        top: 66px !important;
+      }
+      .content-tree-full {
+        top: 100px !important;
+      }
     }
     &-tree {
       width: 340px;
@@ -407,7 +418,7 @@ export default {
       border-radius: 4px;
     }
     #content-tree {
-    //   position: relative;
+      //   position: relative;
     }
     .moveBtn-nnpe {
       position: absolute;
@@ -593,4 +604,4 @@ export default {
     font-size: 16px;
   }
 }
-</style>
+</style>