WXL (wul)
17 小时以前 7a3bba9960237ef9b9714ff3fa7a4f9499601443
测试完成
已修改1个文件
18 ■■■■■ 文件已修改
src/views/loginSSO.vue 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/loginSSO.vue
@@ -63,14 +63,18 @@
      try {
        console.log(11);
        // 从URL参数中获取token和机构信息
        let { token, orgid, orgname, ZuHuID, deptCode, redirect } =
          this.$route.query;
        let { token, orgid, orgname, ZuHuID, deptCode } = this.$route.query;
        // token =
        //   "eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6Ijc5MWVkODNlLWE2MWYtNDI2MS05ZDZlLTNhOTVjYTU2YjZhMiJ9.q6jrRj8fwtb3FOqqwaxIFDr824hf85DW8heCj4qWYgRE55Pn0vkmcujFsYMrz9qqo047Gl7lv3rnok8pk7SKYQ"; // 验证必要参数
        // orgid = "30001002";
        if (!token) {
          throw new Error("缺少认证令牌(token)");
        }
        console.log(token);
        console.log(orgid);
        console.log(orgname);
        // console.log(redirect,'redirect');
        this.mateOrgid(orgid);
        setToken(token);
        this.$store.commit("SET_TOKEN", token);
@@ -89,9 +93,11 @@
        // 确定重定向路径
        let redirectPath = "/index";
        if (redirect) {
          redirectPath = decodeURIComponent(redirect);
        } else {
        // if (redirect) {
        //   console.log(redirect,'888');
        //   redirectPath = decodeURIComponent(redirect);
        // } else {
          // 根据用户角色决定默认跳转页面
          const roles = this.$store.state.user.roles;
          const username = this.$store.state.user.name;
@@ -101,7 +107,7 @@
          } else {
            redirectPath = "/followvisit/discharge";
          }
        }
        // }
        // 跳转到目标页面
        this.$router.replace({ path: redirectPath });