You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
1.6 KiB
JavaScript
2 lines
1.6 KiB
JavaScript
import{_ as p,o as v,r as m,d as c,e as l,i as a,k as n,x as _,f as u,w as k,v as x,H as y,y as h,g}from"./index-e80d57ef.js";const w={class:"his-login-page"},I={key:0,class:"login-loading"},L={key:1,class:"error-card"},C={class:"error-card-icon"},H={class:"error-card-msg"},S={__name:"HisLogin",setup(B){let t=g(!0),s=g("");const f=()=>{t.value=!0,y({usercode:r("usercode"),deptcode:r("deptcode"),cardno:r("cardno")}).then(o=>{if(o.status){sessionStorage.setItem("token",o.data.access_token),sessionStorage.setItem("refreshToken",o.data.refresh_token),sessionStorage.setItem("default_reg_num",r("cardno"));var e=sessionStorage.getItem("token");e!=null&&e==o.data.access_token?(sessionStorage.setItem("LoginType","HisLogin"),window.location.href="./#/yewu/mainList?type=doctor"):(s.value="登录失败",t.value=!1)}else s.value=o.msg,t.value=!1}).catch(()=>{s.value="网络请求失败,请检查网络连接",t.value=!1})};v(()=>{f()});function r(o,e){e||(e=decodeURIComponent(window.location.href)),o=o.replace(/[\[\]]/g,"\\$&");var i=new RegExp("[?&]"+o+"(=([^&#]*)|&|#|$)"),d=i.exec(e);return d?d[2]?decodeURIComponent(d[2].replace(/\+/g," ")):"":null}return(o,e)=>{const i=m("el-icon");return c(),l("div",w,[a(t)&&!a(s)?(c(),l("div",I,[...e[0]||(e[0]=[n("div",{class:"loading-text"},"正在登录...",-1)])])):_("",!0),a(s)?(c(),l("div",L,[n("div",C,[u(i,{size:48,color:"#F56C6C"},{default:k(()=>[u(a(h))]),_:1})]),e[1]||(e[1]=n("div",{class:"error-card-title"},"登录失败",-1)),n("div",H,x(a(s)),1),e[2]||(e[2]=n("div",{class:"error-card-hint"},"请检查 HIS 系统传参配置",-1))])):_("",!0)])}}},R=p(S,[["__scopeId","data-v-84a1486b"]]);export{R as default};
|