2 lines
880 B
JavaScript
2 lines
880 B
JavaScript
import{ay as s,aQ as l,aB as p,aE as d,aW as g,bD as _,co as m,cf as f}from"./admin-DgPvPHD7.js";const u=["src"],w=s({__name:"wecomQrCode",props:{config:{}},setup(r){const n=l(),t=r,{params:{accessToken:c}}=n,a=p("");return(async()=>{await _();const o={corpId:t.config.corp_id,agentId:t.config.agent_id,redirectUri:t.config.callback_url};let e=localStorage.getItem("MaxKB-locale")||m()||"en-US";e==="en-US"?e="en":e="zh";const i=encodeURIComponent(o.redirectUri);console.log("redirectUri",o.redirectUri),a.value=`https://login.work.weixin.qq.com/wwlogin/sso/login?login_type=CorpApp&appid=${o.corpId}&agentid=${o.agentId}&redirect_uri=${i}&state=${c}&lang=${e}&lang=${e}&panel_size=small`})(),(o,e)=>(d(),g("iframe",{src:a.value,width:"100%",height:"380px",frameborder:"0",style:{"margin-top":"-30px"}},null,8,u))}}),h=f(w,[["__scopeId","data-v-3f7b93a6"]]);export{h as default};
|