Browse Source

返回时清除数据

11wqe1 2 months ago
parent
commit
5b93570d00
1 changed files with 8 additions and 1 deletions
  1. 8 1
      src/views/main.vue

+ 8 - 1
src/views/main.vue

@@ -64,7 +64,7 @@
         </div>
       </div>
       <div class="main" :style="leftShow ? { width: '100%' } : ''" v-if="activeIndex == 0" :class="[gotype ? 'liyuan' : '']">
-        <div class="pgb" v-if="gotype">
+        <div class="pgb" v-if="gotype && gotype == '/CourseCon'">
           <div @click="backO" class="pgbL">
               <img src="../assets/icon/backPage.svg" alt="">
               <div>AI通识课</div>
@@ -283,6 +283,13 @@ const copyEmail = () => {
 }
 const backO = () => {
   window.location.href = `https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/CourseCon?userid=${user.user.userid}&oid=${user.user.oid}&org=${user.user.org}&role=${user.user.role}&tType=${user.user.tType}`
+  try {
+      window.topU.gotype2 = '' 
+      window.topU.gotype = '' 
+    } catch (error) {
+      console.log(error);
+    }
+    sessionStorage.removeItem('gotype2');
 }
 const show = () => {
   console.log('show')