Explorar o código

修改路径名 增加perview的loading

秦鹏 %!s(int64=3) %!d(string=hai) anos
pai
achega
6b9bf9baf0
Modificáronse 2 ficheiros con 8 adicións e 5 borrados
  1. 2 2
      src/router/index.js
  2. 6 3
      src/views/courseView.vue

+ 2 - 2
src/router/index.js

@@ -175,8 +175,8 @@ export const constantRoutes = [{
             import ('@/views/adultInput2')
     },
     {
-        path: "/npcBookView",
-        name: "npcBookView",
+        path: "/BookBrowsing",
+        name: "BookBrowsing",
         component: () =>
             import ('@/views/BookView2')
     },

+ 6 - 3
src/views/courseView.vue

@@ -24,7 +24,7 @@
           :currentTreeID="chapterId"
         />
       </div>
-      <div id="data-screen" class="inner">
+      <div id="data-screen" class="inner" v-loading="loading">
         <!-- 显示答案按钮 -->
         <!-- <a v-if="chapterId" :class="['answerShow',isAnswerShow?'answerShowTrue':'']" @click="handleAnswerShow">显示答案</a> -->
         <!-- <a class="edit-btn" @click="handleEdit">编辑</a> -->
@@ -122,6 +122,7 @@ export default {
       themeColor: "",
       type: "",
       name: "",
+      loading: false,
     };
   },
   created() {
@@ -132,8 +133,8 @@ export default {
     _this.name = this.$route.query.name;
   },
   methods: {
-    back(){
-       this.$router.go(-1)
+    back() {
+      this.$router.go(-1);
     },
     changeTreeData(val) {
       this.FatherTreeData = JSON.parse(JSON.stringify(val));
@@ -156,6 +157,7 @@ export default {
     },
     // 获取预览数据
     onGetData() {
+      this.loading = true;
       const _this = this;
       const MethodName = "book-courseware_manager-GetCoursewareContent_View";
       const data = {
@@ -184,6 +186,7 @@ export default {
           const _this = this;
           _this.context = null;
         }
+        this.loading = false;
       });
     },
     // 跳转编辑页面