Ver Fonte

ppt模式修改

SanHQin há 1 dia atrás
pai
commit
5671c04924

+ 5 - 0
src/components/courseDetail.vue

@@ -1956,6 +1956,11 @@ export default {
           }
         }
       }
+
+      if(this.courseDetail.state == 7 && this.tType == 2){
+        this.goToStudyRate('')
+      }
+
       // debugger
     },
     addInviteCode() {

+ 32 - 40
src/components/index.vue

@@ -73,7 +73,22 @@
         <div>
           <div class="main_box">
             <div style="display:flex;flex-wrap:wrap" v-if="!typeCheck">
-              <div class="box_course" v-for="(item, index) in zoneClass" :key="index"  @click="goToCourseDetail(item)">
+              <div class="box_course" v-for="(item, index) in zoneClass" :key="index"  @click="goTo(
+          '/courseDetail?courseId=' +
+          item.courseId +
+          '&userid=' +
+          userid +
+          '&oid=' +
+          oid +
+          '&org=' +
+          org +
+          '&cid=' +
+          classId +
+          '&tType=' +
+          tType +
+          '&screenType=' +
+          screenType,item.courseId
+        )">
                 <div class="wheel">
                   <img :src="
                     item.cover
@@ -132,7 +147,22 @@
               <div class="FirstTypeBox" v-for="(type, tindex) in CourseType2" :key="tindex">
                 <div class="title">{{ type.name }}</div>
                 <div style="display: flex;flex-flow: wrap;margin-top: 20px;">
-                  <div class="box_course" v-for="(item, index) in type.course" :key="tindex + '-' + index" @click="goToCourseDetail(item)">
+                  <div class="box_course" v-for="(item, index) in type.course" :key="tindex + '-' + index" @click="goTo(
+          '/courseDetail?courseId=' +
+          item.courseId +
+          '&userid=' +
+          userid +
+          '&oid=' +
+          oid +
+          '&org=' +
+          org +
+          '&cid=' +
+          classId +
+          '&tType=' +
+          tType +
+          '&screenType=' +
+          screenType,item.courseId
+        )">
                     <div class="wheel">
                       <img :src="
                         item.cover
@@ -875,44 +905,6 @@ export default {
       //   console.error(err);
       // });
     },
-    goToCourseDetail(item){
-      if(this.tType == '2' && item.state == 7){
-        this.goTo(
-          "/pptEasyClass?type="+
-            "&courseId=" +
-            item.courseId +
-            "&userid=" +
-            this.userid +
-            "&oid=" +
-            this.oid +
-            "&org=" +
-            this.org +
-            "&cid=" +
-            this.classId +
-            "&tType=" +
-            this.tType +
-            "&screenType=" +
-            this.screenType
-        );
-      }else{
-        this.goTo(
-          '/courseDetail?courseId=' +
-          item.courseId +
-          '&userid=' +
-          this.userid +
-          '&oid=' +
-          this.oid +
-          '&org=' +
-          this.org +
-          '&cid=' +
-          this.classId +
-          '&tType=' +
-          this.tType +
-          '&screenType=' +
-          this.screenType,item.courseId
-        );
-      }
-    }
   },
   beforeDestroy() {
     clearInterval(this.timer);

+ 36 - 18
src/components/pptEasyClass/index.vue

@@ -22,24 +22,7 @@
             </el-tooltip>
 
             <div
-              @click.stop="
-                goTo(
-                  '/courseDetail?userid=' +
-                    userid +
-                    '&oid=' +
-                    oid +
-                    '&org=' +
-                    org +
-                    '&cid=' +
-                    classId +
-                    '&courseId=' +
-                    id +
-                    '&tType=' +
-                    tType +
-                    '&screenType=' +
-                    screenType
-                )
-              "
+              @click.stop="back"
             >
               <img src="../../assets/icon/newIcon/return.png" alt="" />
               <span style="color: #000">返回</span>
@@ -155,6 +138,41 @@ export default {
       }
       return commonElements;
     },
+    back(){
+      if(this.tType!=2){
+        this.goTo(
+          '/courseDetail?userid=' +
+            this.userid +
+            '&oid=' +
+            this.oid +
+            '&org=' +
+            this.org +
+            '&cid=' +
+            this.classId +
+            '&courseId=' +
+            this.id +
+            '&tType=' +
+            this.tType +
+            '&screenType=' +
+            this.screenType
+        )
+      }else{
+        this.goTo(
+          '/index?userid=' +
+            this.userid +
+            '&oid=' +
+            this.oid +
+            '&org=' +
+            this.org +
+            '&cid=' +
+            this.classId +
+            '&tType=' +
+            this.tType +
+            '&screenType=' +
+            this.screenType
+        )
+      }
+    }
   },
   mounted() {
     this.getCourseDetail();