natasha 5 kuukautta sitten
vanhempi
commit
a4a15a4d28
2 muutettua tiedostoa jossa 17 lisäystä ja 4 poistoa
  1. 16 4
      src/components/inputModules/common/TreeView.vue
  2. 1 0
      src/views/bookView.vue

+ 16 - 4
src/components/inputModules/common/TreeView.vue

@@ -107,6 +107,7 @@ export default {
     "tryFree",
     "changeTreeData",
     "currentTreeID",
+    "fromPhone",
   ],
   data() {
     return {
@@ -231,10 +232,21 @@ export default {
     },
     handleNodeClick(data) {
       if (data.isLeaf) {
-        this.activeIndex = data.id;
-        this.nodeLevel = data.level_index;
-        this.nodeName = data.name;
-        this.changeId(data.id, data.name, data.is_free_trial);
+        if (this.fromPhone) {
+          this.$router.push(
+            "/courseview?bookId=" +
+              this.$route.query.goods_id +
+              "&showCourse=true&invok_module=" +
+              this.$route.query.invok_module +
+              "&nodeId=" +
+              data.id
+          );
+        } else {
+          this.activeIndex = data.id;
+          this.nodeLevel = data.level_index;
+          this.nodeName = data.name;
+          this.changeId(data.id, data.name, data.is_free_trial);
+        }
       }
     },
     // 返给父级当前高亮节点的index以及level

+ 1 - 0
src/views/bookView.vue

@@ -19,6 +19,7 @@
             :change-id="changeId"
             :changeTreeData="changeTreeData"
             :currentTreeID="chapterId"
+            :fromPhone="fromPhone"
           />
         </div>
       </div>