11wqe1 1 ay önce
ebeveyn
işleme
abfd546cd4
1 değiştirilmiş dosya ile 4 ekleme ve 12 silme
  1. 4 12
      src/App.vue

+ 4 - 12
src/App.vue

@@ -23,6 +23,10 @@ onMounted(() => {
   let isGrantCode = getUrlParam(window.parent.location.href, 'grant_code')
   let ticket = getUrlParam(window.parent.location.href, 'ticket')
   let userid = getUrlParam(window.parent.location.href, 'userid')
+  let gotype = getUrlParam(window.parent.location.href, 'gotype')
+  console.log('gotype',gotype);
+  setgotype.setpageType(gotype);
+  
   axios.defaults.headers = { 'content-type': 'application/json;charset=utf-8' }
 
   if (isGrantCode) {
@@ -65,8 +69,6 @@ onMounted(() => {
   } else {
     linkLogin()
   }
-  // 获取gotype传参
-  pageType2()
 })
 
 const linkLogin = () => {
@@ -78,16 +80,6 @@ const linkLogin = () => {
   }
 }
 
-const pageType2 = () => {
-  // const val = route.query.gotype ? route.query.gotype :''
-  console.log('window.location.search',window.location.search);
-  const urlParams = new URLSearchParams(window.location.search);
-  const gotype = urlParams.get('gotype');
-
-  console.log('gotype',gotype);
-  setgotype.setpageType(gotype);
-}
-
 // 同步登录信息
 const userInfo = (data) => {
   // eduId  - 教育ID