UnisKB/static/admin/chat/assets/wecomQrCode-D76xRhWM.js

2 lines
842 B
JavaScript

import{aW as a,aZ as i,bc as s,b9 as l,bR as d,co as p,ce as g}from"./chat-BQoI2g3l.js";const _=["src"],m=a({__name:"wecomQrCode",props:{config:{}},setup(c){const t=c,r=i("");return(async()=>{await d();const e={corpId:t.config.corp_id,agentId:t.config.agent_id,redirectUri:t.config.callback_url};let o=localStorage.getItem("MaxKB-locale")||p()||"en-US";o==="en-US"?o="en":o="zh";const n=encodeURIComponent(e.redirectUri);console.log("redirectUri",e.redirectUri),r.value=`https://login.work.weixin.qq.com/wwlogin/sso/login?login_type=CorpApp&appid=${e.corpId}&agentid=${e.agentId}&redirect_uri=${n}&state=fit2cloud-wecom-qr&lang=${o}&panel_size=small`})(),(e,o)=>(l(),s("iframe",{src:r.value,width:"100%",height:"380px",frameborder:"0",style:{"margin-top":"-30px"}},null,8,_))}}),w=g(m,[["__scopeId","data-v-c3a3b381"]]);export{w as default};