Explorar el Código

refactor(pptEasyClass): 统一不同屏幕类型的退出逻辑

为pptEasyClass的两个组件添加屏幕类型判断,根据screenType分别执行返回页面或跳转课程管理页的逻辑,优化退出流程的一致性
lsc hace 3 semanas
padre
commit
9aabc6ed5c

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

@@ -776,6 +776,11 @@ export default {
                 setTimeout(() => {
                   this.tcid2 = ""
                   this.refreshCourse()
+                  if(this.screenType != 2){
+                    this.back()
+                  }else if(this.screenType == 2){
+                    this.gotoCourseManage()
+                  }
                 }, 1000)
               },
               cancelCallback: () => {

+ 6 - 1
src/components/pptEasyClass/indexPS.vue

@@ -69,7 +69,7 @@
             <el-switch v-model="isCan" :active-value="true" :inactive-value="false" class="custom-switch"
               active-color="#03ae2b" inactive-color="#d8d8d8" @change="onIsCanChange"></el-switch>
             <span class="switch-label" :class="{ active: isCan }">{{ isCan ? lang.ssShowResult : lang.ssHideResult }}</span>
-          </div>
+          </div> 
           <div class="free-browse-switch" v-if="tType == 2">
             <span class="switch-label" :class="{ active: freeBrowse }">{{ freeBrowse ? lang.ssFreeBrowse :
               lang.ssFollowMode }}</span>
@@ -776,6 +776,11 @@ export default {
                 setTimeout(() => {
                   this.tcid2 = ""
                   this.refreshCourse()
+                  if(this.screenType != 2){
+                    this.back()
+                  }else if(this.screenType == 2){
+                    this.gotoCourseManage()
+                  }
                 }, 1000)
               },
               cancelCallback: () => {