import{aj as o,ae as a,af as n}from"./index-q2k2ACYe.js";import{c as e,a as i}from"./api.DzVGbGbs.js";async function t(t){let d="";if(d=window.location.href.indexOf("//prod-casedata.igandan.com")>-1?o("AUTH_TOKEN_CASEDATA"):o("DEV_AUTH_TOKEN_CASEDATA"),d)n(t);else{let o=e.readCookie("video_token");if(console.log(o),o){let n=(await i.h5Login({token:o})).data.data;console.log(n),window.location.href.indexOf("//prod-casedata.igandan.com")>-1?a("AUTH_TOKEN_CASEDATA",n.token):a("DEV_AUTH_TOKEN_CASEDATA",n.token),a("userInfo",{avatar:n.avatar,user_id:n.user_id,status:n.status,user_name:n.user_name,doctor_id:n.doctor_id}),window.location.reload()}else{let o="https://dev-wx.igandan.com";-1==window.location.href.indexOf("//dev-casedata.igandan.com")&&(o="https://wx.igandan.com"),window.location.href=o+"/hcp/Signup2020online_tologin?back_url="+encodeURIComponent(window.location.href)}}}export{t as n};
