Fix some for iam

This commit is contained in:
Montech
2026-10-11 15:24:16 +03:30
parent 2e21758c2c
commit e4924a28f5
211 changed files with 404 additions and 358 deletions
+1
View File
@@ -0,0 +1 @@
import{d as n,T as c,o as i,W as o,c as m,D as l,b as p}from"./index-Bgewvf3h.js";const _={style:{"min-height":"100vh",display:"grid","place-items":"center"}},u=n({__name:"IamCallback",setup(g){const s=l(),a=c();return i(async()=>{const e=new URLSearchParams(window.location.search);if(sessionStorage.removeItem("gb_iam_sso_checked"),e.get("error")||!e.get("code")||!e.get("state")){sessionStorage.setItem("gb_iam_sso_skip","1"),await s.replace({name:"login"});return}try{const t=await o.ssoCallback(e.get("code"),e.get("state"));a.login(t.token,t.customer.id,t.customer.mobile);try{const r=await o.getExpertIdentity();a.setSalesExpert(r.isSalesExpert)}catch{a.setSalesExpert(!1)}await s.replace({name:"home"})}catch{sessionStorage.setItem("gb_iam_sso_skip","1"),await s.replace({name:"login"})}}),(e,t)=>(p(),m("div",_,"در حال ورود..."))}});export{u as default};