1 line
1.7 KiB
JavaScript
1 line
1.7 KiB
JavaScript
|
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0dd6ad"],{"80fe":function(e,t,s){"use strict";s.r(t);s("d9e2");var o=s("7a23"),n=s("5502"),i=(s("f3e4"),s("5d2d")),r=s("92c2"),d=s("986e"),c=s("5f87"),u={__name:"zeroTrust_login",setup(e){Object(o["ref"])(!1),Object(o["ref"])([]);const t=Object(n["b"])(),s=()=>{fetch("https://pcs.lz.dsj.xz:9020/getSession",{method:"GET",headers:{"Content-Type":"application/json"},credentials:"include"}).then(e=>{if(!e.ok)throw new Error("HTTP error! status: "+e.status);return e.json()}).then(e=>{let{placeId:t,userId:s}=e.rows[0];"amdin"==t&&(t=""),a(s,t)}).catch(e=>{console.error("获取会话信息失败:",e)})};function u(){const e=window.location.href,t=new URL(e);t.hostname.split(".")[0];s()}const a=(e,s)=>{Object(r["y"])({idCardNo:e,orgCode:s}).then(e=>{t.commit("user/setToken",e.jwtToken),t.commit("user/setDeptList",e.deptList),t.commit("user/setUserName",e.userName),t.commit("user/setMenuList",e.menuList),t.commit("user/setUserInfo",{token:e.jwtToken,permission:{buttonPermission:["removeTest","viewTest"],menus:e.menuCodeSet},menuList:e.menuList,deptList:e.deptList}),Object(i["d"])("USERNAME",e.userName),Object(i["d"])("SFRH",e.sfrh),Object(i["d"])("USERID",e.userId),Object(i["d"])("menusPermission",e.menuCodeSet),Object(i["d"])("idEntityCard",e.idEntityCard),Object(i["d"])("deptId",e.deptList),Object(c["b"])(),d["a"].emit("handleClick"),setTimeout(()=>{window.parent!==window.self?window.location.hash=window.location.href.split("#")[1]:(console.log("首页"),window.location.hash="/")},1e3)}).catch(e=>{console.error("免登失败:",e)})};return Object(o["onMounted"])(()=>{u()}),(e,t)=>null}};const a=u;t["default"]=a}}]);
|