ソースを参照

fix: 多课程双师制去掉点击切换

xuqiaoying 3 年 前
コミット
940e46edd5
2 ファイル変更26 行追加26 行削除
  1. 2 2
      common/request.js
  2. 24 24
      pages3/polyv/detail.vue

+ 2 - 2
common/request.js

@@ -5,8 +5,8 @@ import api from './api.js'
 var num = 1
 //接口api   
 // export const BASE_URL = 'https://api.xyyxt.net'   //release
-export const BASE_URL = 'https://test.xyyxt.net'   //预发布
-// export const BASE_URL = 'http://120.79.166.78:19012' // 测试环境
+// export const BASE_URL = 'https://test.xyyxt.net'   //预发布
+export const BASE_URL = 'http://120.79.166.78:19012' // 测试环境
 // export const BASE_URL = 'http://42.192.164.187:19005'    //test(后端本地)
 // export const BASE_URL = 'http://192.168.1.222:5055'    //后端本地更新到222
 // export const BASE_URL = 'http://192.168.1.24:5055'    //后端本地

+ 24 - 24
pages3/polyv/detail.vue

@@ -576,7 +576,7 @@
                           </view>
                           <view v-if="courseItem.teaList && courseItem.teaList.length > 0" class='teacher_names' >
                               <view v-for="(tea, tindex) in courseItem.teaList" :key="tindex" class="names"
-                               :class="{nactive: teaIndex == tindex}"  @click.stop="switchTeacher(tea, tindex)">{{tea.aliasName}}</view>
+                              >{{tea.aliasName}}</view>
                           </view>
                           <view class="course_pros">
                             学习进度
@@ -727,7 +727,7 @@ export default {
       subIndex: 0,
       goodsTeacher: [],
       teacherList: [],
-      teaIndex: 0,
+      // teaIndex: 0,
       teacherIndex: 0,
       newActiveSubjectId: "", //当前选中ID
     };
@@ -1076,27 +1076,27 @@ export default {
       this.toggleCourseShow = false
     },
     //切换老师
-    switchTeacher(data, tindex){
-        console.log(data,'data');
-        this.teaIndex = tindex
-        this.goodsTeacher.forEach((item,index) => {
-            if(item.teaList && item.teaList.length > 0){
-               let list = item.teaList.filter(x => x.courseId == data.courseId)
-               if(list && list.length > 0){
-                  item.courseList.forEach((course,courseIndex) => {
-                      if(course.courseId == data.courseId){
-                        console.log(index,'index');
-                         console.log(courseIndex,'courseIndex');
-                        this.$set(this.goodsTeacher[index].courseList[courseIndex],"show",1)
-                      }else{
-                        this.$set(this.goodsTeacher[index].courseList[courseIndex],"show",0)
-                      }
-                  })
-               }
-            }
-        })
-        console.log('切换后的this.goodsTeacher, ', this.goodsTeacher)
-    },
+    // switchTeacher(data, tindex){
+    //     console.log(data,'data');
+    //     this.teaIndex = tindex
+    //     this.goodsTeacher.forEach((item,index) => {
+    //         if(item.teaList && item.teaList.length > 0){
+    //            let list = item.teaList.filter(x => x.courseId == data.courseId)
+    //            if(list && list.length > 0){
+    //               item.courseList.forEach((course,courseIndex) => {
+    //                   if(course.courseId == data.courseId){
+    //                     console.log(index,'index');
+    //                      console.log(courseIndex,'courseIndex');
+    //                     this.$set(this.goodsTeacher[index].courseList[courseIndex],"show",1)
+    //                   }else{
+    //                     this.$set(this.goodsTeacher[index].courseList[courseIndex],"show",0)
+    //                   }
+    //               })
+    //            }
+    //         }
+    //     })
+    //     console.log('切换后的this.goodsTeacher, ', this.goodsTeacher)
+    // },
     async activeFunc(item, index) {
       console.log('item', item, this.goodsTeacher)
       this.teacherIndex = index
@@ -1130,7 +1130,7 @@ export default {
       await this.originUnload()
 
       if (type) {
-        this.teacherIndex = this.teaIndex
+        this.teacherIndex = 0
         this.goodsTeacher.forEach((citem) => {
             if(citem.courseList.some(x => x.courseId == item.courseId)){
               this.teacherList = citem.teaList