Selaa lähdekoodia

单点登录修改

zy1125 1 vuosi sitten
vanhempi
commit
70435be869
1 muutettua tiedostoa jossa 4 lisäystä ja 4 poistoa
  1. 4 4
      src/router/index.js

+ 4 - 4
src/router/index.js

@@ -2,7 +2,7 @@
2 2
  * @Author: zy1125 1515706227@qq.com
3 3
  * @Date: 2023-11-09 09:07:06
4 4
  * @LastEditors: zy1125 1515706227@qq.com
5
- * @LastEditTime: 2023-12-25 10:54:48
5
+ * @LastEditTime: 2023-12-25 13:59:36
6 6
  * @FilePath: \v3_yyz\src\router\index.js
7 7
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
8 8
  */
@@ -41,9 +41,9 @@ router.beforeEach(function (to, from, next) {
41 41
   } else {
42 42
     const url = window.location.href;
43 43
     const paramStr = url.split("?")[1].split("#")[0];
44
-    console.log('sadasd' ,paramStr);
44
+    // console.log('sadasd' ,paramStr);
45 45
     let query = {
46
-      casLoginUrl: "https://cas.huanghuai.edu.cn/cas/serviceValidate?" + paramStr + '&service=weizhi.huanghuai.edu.cn/xyyzioc/#/'
46
+      casLoginUrl: "https://cas.huanghuai.edu.cn/cas/serviceValidate?" + paramStr + '&service=https://weizhi.huanghuai.edu.cn/xyyzioc/#/'
47 47
     }
48 48
     console.log('aslddddd',query);
49 49
     getvalidateLogin(query).then(res => {
@@ -55,7 +55,7 @@ router.beforeEach(function (to, from, next) {
55 55
 
56 56
       if (resjson.indexOf('INVALID_TICKET')!==-1) {
57 57
         console.log('校验失效了');
58
-        window.location.href='https://weizhi.huanghuai.edu.cn/xyyzioc/#/login'
58
+        window.location.href='https://cas.huanghuai.edu.cn/cas/?service=https://weizhi.huanghuai.edu.cn/xyyzioc/#/'
59 59
       }
60 60
 
61 61
     })