3 lines
13 KiB
JavaScript
3 lines
13 KiB
JavaScript
|
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./dingtalkQrCode-BIIN4tRQ.js","./logo_dingtalk-CyDPr22R.js","./chat-BQoI2g3l.js","./chat-CQu7LEiR.css","./dingtalkQrCode-CulsC8mV.css","./larkQrCode-CFN1JypB.js","./logo_lark-DULIW3z6.js","./wecomQrCode-CUMYoTI8.js","./wecomQrCode-yBUt_167.css"])))=>i.map(i=>d[i]);
|
||
|
|
import{aW as ee,aZ as d,bj as j,bN as ue,aY as Y,b1 as b,a$ as f,b9 as n,b7 as ge,b0 as m,b2 as y,b5 as de,b6 as T,aT as L,bp as pe,bR as he,da as ye,ce as me,bc as k,b4 as i,cG as be,be as _e,bk as O,cr as we,cs as ke,bd as Z,ct as W,cu as Ce,aX as Le,bU as G,bq as xe,br as Ae,bl as C,d0 as ce,cv as Oe,bw as De,db as ie,c6 as $e,cx as qe,c7 as Re}from"./chat-BQoI2g3l.js";import{_ as Ie,a as Ve,f as X,d as Pe}from"./index-D1MOs4fe.js";const Se=ee({__name:"password",setup(I){const g=d(),{chatUser:V}=j(),t=d(!1),E=ue(),U=Y(),P=()=>V.passwordAuthentication(v.value.password).then($=>{E.push({name:"chat",params:{accessToken:V.accessToken},query:U.query})}),D=($,x,a)=>{x===""?a(new Error(L("chat.passwordValidator.errorMessage1"))):P().catch(()=>{a(new Error(L("chat.passwordValidator.errorMessage2")))})},S=()=>{g.value.validate()},p={password:[{required:!0,validator:D,trigger:"manual"}]},v=d({password:""});return($,x)=>{const a=b("el-input"),K=b("el-form-item"),N=b("el-button"),B=b("el-form");return n(),f(B,{ref_key:"FormRef",ref:g,model:v.value,onSubmit:ge(S,["prevent"])},{default:m(()=>[y(K,{prop:"value",rules:p.password},{default:m(()=>[y(a,{"show-password":"",modelValue:v.value.password,"onUpdate:modelValue":x[0]||(x[0]=Q=>v.value.password=Q)},null,8,["modelValue"])]),_:1},8,["rules"]),y(N,{class:"w-full mt-8",type:"primary",onClick:S,loading:t.value},{default:m(()=>[de(T($.$t("common.confirm")),1)]),_:1},8,["loading"])]),_:1},8,["model"])}}}),Te=768,Ee=()=>{const{common:I}=j(),g=()=>{var t;return((t=document.body)==null?void 0:t.getBoundingClientRect()).width-1<Te};pe(()=>{he(()=>{g()&&I.toggleDevice(ye.Mobile)})})},Ue={},Me={class:"login-warp flex-center"},Qe={class:"login-container w-full h-full"},Fe={class:"flex-center w-full h-full"};function Be(I,g){return n(),k("div",Me,[i("div",Qe,[i("div",Fe,[be(I.$slots,"default",{},void 0,!0)])])])}const ze=me(Ue,[["render",Be],["__scopeId","data-v-e5a94abc"]]),je={key:0,class:"text-center"},Ke=ee({__name:"QrCodeTab",props:{tabs:{}},setup(I){const{chatUser:g}=j(),V=I,t=d(""),E=d([]),U=d({app_key:"",app_secret:""});async function P(){try{return await g.getQrSource()}catch{return[]}}pe(async()=>{V.tabs.length>0&&(t.value=V.tabs[0].key),E.value=await P(),D(t.value)});const D=p=>{const v=E.value.find($=>$.auth_type===p);v&&v.config&&(U.value=v.config)},S=p=>{t.value=p,D(p)};return(p,v)=>{const $=b("el-tab-pane"),x=b("el-tabs");return n(),f(x,{modelValue:t.value,"onUpdate:modelValue":v[0]||(v[0]=a=>t.value=a),onTabChange:S},{default:m(()=>[(n(!0),k(Z,null,_e(I.tabs,a=>(n(),f($,{key:a.key,label:a.value,name:a.key},{default:m(()=>[a.key===t.value?(n(),k("div",je,[(n(),f(we(ke(()=>Ie(Object.assign({"./dingtalkQrCode.vue":()=>W(()=>import("./dingtalkQrCode-BIIN4tRQ.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url),"./larkQrCode.vue":()=>W(()=>import("./larkQrCode-CFN1JypB.js"),__vite__mapDeps([5,6,2,3]),import.meta.url),"./wecomQrCode.vue":()=>W(()=>import("./wecomQrCode-CUMYoTI8.js"),__vite__mapDeps([7,2,3,8]),import.meta.url)}),`./${a.key}QrCode.vue`,2))),{config:U.value},null,8,["config"]))])):O("",!0)]),_:2},1032,["label","name"]))),128))]),_:1},8,["modelValue"])}}}),Ne={class:"user-login-container p-24"},He={key:0,class:"flex-center",style:{"margin-bottom":"32px"}},Je=["src"],We={key:1,class:"user-login__header"},Ge={class:"flex-between"},Xe={class:"flex align-center"},Ye={class:"mr-12 ml-16 flex"},Ze=["src"],et=["title"],tt={class:"mb-24"},ot={key:0,class:"mb-24"},at={key:1},st={class:"mb-24"},lt={class:"mb-24"},nt={key:0,class:"mb-24"},rt={class:"flex-between w-full"},ct=["src"],it={key:2},ut={key:3,class:"login-gradient-divider lighter mt-24"},dt={class:"text-center mt-16"},pt=ee({__name:"index",setup(I){Ee();const g=ue(),{theme:V,chatUser:t,common:E}=j(),{locale:U}=Ce({useScope:"global"}),P=d(!1),D=Y(),S=d(""),{params:{accessToken:p},query:{mode:v}}=D,$=Le(()=>{console.log(E.isMobile());let e="";return!v||v==="pc"?e=E.isMobile()?"mobile":"pc":e=v,console.log(e),e==="pc"}),x=d(),a=d({username:"",password:"",captcha:""}),K=d(1),N=d({username:[{required:!0,message:L("views.login.l
|