11wqe1 1 giorno fa
parent
commit
e8ab445c96
2 ha cambiato i file con 14 aggiunte e 7 eliminazioni
  1. 13 6
      src/App.vue
  2. 1 1
      src/views/coursepage.vue

+ 13 - 6
src/App.vue

@@ -20,6 +20,7 @@ const name = ref('')
 const isShow = ref(true)
 const setTimeState = ref(null)
 const topUserInfo = ref({})
+const gotypeA = ref('')
 
 onMounted(() => {
   registerSetCourseUrl()
@@ -29,15 +30,15 @@ onMounted(() => {
   let userid = getUrlParam(window.parent.location.href, 'userid') 
   // let userid = '0c3735c9-a2ef-11ef-9b30-005056b86db5'
   let gotype = getUrlParam(window.parent.location.href, 'gotype')
-  let cszy = getUrlParam(window.parent.location.href, 'cszy')
+  // let cszy = getUrlParam(window.parent.location.href, 'cszy')
   console.log('gotype',gotype);
-  console.log('cszy',cszy);
-  
+  // console.log('cszy',cszy);
+  gotypeA.value = gotype
   setgotype.setpageType(gotype);
 
-  if (cszy) {
-    router.replace({ path: '/course' })
-  }
+  // if (cszy) {
+  //   router.replace({ path: '/course' })
+  // }
   
   axios.defaults.headers = { 'content-type': 'application/json;charset=utf-8' }
 
@@ -305,6 +306,9 @@ const selectUser = (uid) => {
                 setTimeout(() => {
                   top.US.userInfo = res.value[0][0];
                 }, 60000);
+                if(gotypeA.value == 'cszy'){
+                  router.replace({ path: '/course' })
+                }
             } else {
                 top.U.alert("获取用户信息失败,正在重试!");
                 requestUser();
@@ -338,6 +342,9 @@ const selectUser2 = (uid) => {
               isShow.value = false;
               topUserInfo.value = res.data[0][0];
               store.setUserInfo(res.data[0][0]);
+              if(gotypeA.value == 'cszy'){
+                router.replace({ path: '/course' })
+              }
           } else {
               requestUser();
           }

+ 1 - 1
src/views/coursepage.vue

@@ -50,7 +50,7 @@ const user = userInfoStore()
   gap: 10px;
 }
 .course-page {
-  background: #F0F2F5;
+  background: #F5F8FF;
   padding: 20px 10%;
   min-height: 100vh;
   overflow: auto;