Parcourir la source

feat(course,ppt): add noLogin query parameter support

新增noLogin路由查询参数的支持,用于控制部分界面的返回按钮显示逻辑以及接口请求参数传递,调整了pptEasyClass和courseDetail组件中的相关判断与请求拼接逻辑
lsc il y a 5 jours
Parent
commit
dcaa7d5529
2 fichiers modifiés avec 12 ajouts et 6 suppressions
  1. 7 2
      src/components/courseDetail.vue
  2. 5 4
      src/components/pptEasyClass/index.vue

+ 7 - 2
src/components/courseDetail.vue

@@ -1215,6 +1215,7 @@ export default {
       classId: this.$route.query.cid,
       tType: this.$route.query.tType,
       screenType: this.$route.query.screenType,
+      noLogin: this.$route.query.noLogin,
       courseDetail: {},
       classList: [],
       aStudentName: [],
@@ -1500,7 +1501,9 @@ export default {
               "&screenType=" +
               this.screenType +
               "&tcid=" +
-              id
+              id +
+              "&noLogin=" +
+              this.noLogin
           );
         }else {
           let psOrg = ['311882ee-4e86-11f1-9985-005056924926']
@@ -1729,7 +1732,9 @@ export default {
                   "&tType=" +
                   this.tType +
                   "&screenType=" +
-                  this.screenType
+                  this.screenType +
+                  "&noLogin=" +
+                  this.noLogin
               );
             // this.gotoCourse(this.classId);
           }

+ 5 - 4
src/components/pptEasyClass/index.vue

@@ -7,10 +7,10 @@
       <div class="pec_header">
         <div class="pec_h_left">
           <!-- || tType == 1 -->
-          <div @click.stop="back" class="backBtn" v-if="screenType != 2">
+          <div @click.stop="back" class="backBtn" v-if="screenType != 2 && noLogin != 2">
             <img src="../../assets/icon/newIcon/return.svg" alt="" />
           </div>
-          <div @click.stop="gotoCourseManage" class="backBtn" v-if="screenType == 2 && tType == 1">
+          <div @click.stop="gotoCourseManage" class="backBtn" v-if="screenType == 2 && tType == 1 && noLogin != 2">
             <img src="../../assets/icon/newIcon/return.svg" alt="" />
           </div>
           <div v-if="tcid" class="class-info-group">
@@ -153,6 +153,7 @@ export default {
       courseType: this.$route.query.type,
       screenType: this.$route.query.screenType,
       tcid2: this.$route.query.tcid,
+      noLogin: this.$route.query.noLogin,
       classList: [],
       tcid: "",
       className: "",
@@ -672,7 +673,7 @@ export default {
           }
           this.setPptIframe()
           this.classList = res.data[2]
-          if(!this.tcid2 && this.tType == '1'){
+          if(!this.tcid2 && this.tType == '1' && this.noLogin != 2){
             this.$refs.selectTeachingClassDialogRef.open({classList:this.classList})
           }
           this.pageLoading = false;
@@ -1040,7 +1041,7 @@ export default {
       }
     }
     if (!this.userJson || !this.userJson.accountNumber) {
-      let res = await this.ajax.get(this.$store.state.api + "selectUser", {
+      let res = await this.ajax.get(this.$store.state.api + "selectUser2", {
         userid: this.$route.query.userid
       });
       this.userJson = res.data[0][0]