import{a as T,aC as h,_ as v,w as D,f as c,r as p,aH as L,q as G,aj as l,c as k,o as V,b as o,M as N,Q as _,S as n,K as i,G as H,a7 as Q,P as X,u as I,R as O}from"./vue.D1BjjNmv.js";import{_ as W,l as S}from"./background.DGAch4DW.js";import{d as Z,u as J,v as Y,f as ee,i as B,N as oe,E as w,h as te,S as P}from"./index.CL7yl-Wb.js";import{l as ae}from"./logo-mini.D57drHvk.js";import{g as ne,p as se}from"./api.BWHo6Ng2.js";import{_ as le}from"./_plugin-vue_export-helper.DlAUqK2U.js";const ie={class:"login-container flex z-10"},ce={class:"login-right flex z-10"},re={class:"login-right-warp flex-margin"},ue={class:"login-right-warp-mian"},pe={class:"login-right-warp-main-form pt-4"},me={class:"login-authorization z-10"},_e={style:{"font-size":"12px"}},de={key:0},ge=["src"],fe=T({name:"loginIndex"}),he=T({...fe,setup(ve){const{userInfos:U}=h(Z()),z=J(),{themeConfig:F}=h(z),x=v({tabsActiveName:"account",isScan:!1}),{t:we}=Y.useI18n();D(()=>U.value.pwd_change_count,a=>{a===0?x.tabsActiveName="changePwd":x.tabsActiveName="account"},{deep:!0,immediate:!0}),c(()=>F.value);const $=ee(),{systemConfig:A}=h($),r=c(()=>A.value);c(()=>B(r.value["login.site_logo"])?ae:r.value["login.site_logo"]),c(()=>{if(!B(r.value["login.login_background"]))return r.value["login.login_background"]}),p(!0);const d=v({signIn:!1}),s=p({username:"",password:"",captcha:"",captchaKey:"",captchaImgBase:""}),K=v({username:[{required:!0,message:"请输入用户名",trigger:"blur"}],password:[{required:!0,message:"请填写密码",trigger:"blur"}]}),g=p(),M=L();p();const R=a=>{const e=a.getHours(),t=a.getMinutes();return`${e<10?"0"+e:e}:${t<10?"0"+t:t}`};c(()=>R(new Date)),c(()=>!1);const xe=async()=>{s.value.captcha="",ne().then(a=>{s.value.captchaImgBase=a.data.image_base,s.value.captchaKey=a.data.key})},y=async()=>{g.value&&await g.value.validate(async a=>{if(a)try{d.signIn=!0;const e={username:s.value.username,password:s.value.password};se({...e}).then(t=>{console.log(t),(t==null?void 0:t.code)===2e3?(w.success("登录成功"),te.set("username",t.data.username),P.set("token",t.data.token.access),P.set("merchant_info",t.data.merchant_info),M.push("/")):w.error((t==null?void 0:t.msg)||"登录失败")})}catch(e){console.error("登录失败:",e),w.error((e==null?void 0:e.message)||"登录失败，请稍后重试")}finally{d.signIn=!1}})},m=p(!1);return G(()=>{oe.done()}),(a,e)=>{const t=l("ele-User"),C=l("el-icon"),b=l("el-input"),f=l("el-form-item"),j=l("ele-Unlock"),ye=l("ele-Position"),Ce=l("el-col"),be=l("el-image"),E=l("el-button"),q=l("el-form");return V(),k(O,null,[o("div",ie,[e[7]||(e[7]=o("div",{class:"login-left"},[o("div",{class:"login-left-logo"},[o("div",{class:"login-left-logo-text"},[o("span",null,_("奇才, 只选对的!")),o("span",{class:"login-left-logo-text-msg",style:{"margin-top":"5px"}},_("您的人才战略顾问与首席执行官"))])])],-1)),o("div",ce,[e[5]||(e[5]=o("div",{class:"login-right-warp-mian-title"},"客户服务专线：021-8888888",-1)),o("div",re,[o("div",ue,[e[4]||(e[4]=o("div",{class:"login-right-warp-main-title"}," 超级管理员登陆 ",-1)),o("div",pe,[n(q,{ref_key:"superformRef",ref:g,size:"large",class:"login-content-form",model:s.value,rules:K,onKeyup:Q(y,["enter"])},{default:i(()=>[n(f,{class:"login-animation1",prop:"username"},{default:i(()=>[n(b,{type:"text",placeholder:"请输入登录账号",modelValue:s.value.username,"onUpdate:modelValue":e[0]||(e[0]=u=>s.value.username=u),clearable:""},{prefix:i(()=>[n(C,{class:"el-input__icon"},{default:i(()=>[n(t)]),_:1})]),_:1},8,["modelValue"])]),_:1}),n(f,{class:"login-animation2",prop:"password"},{default:i(()=>[n(b,{type:m.value?"text":"password",placeholder:a.$t("message.account.accountPlaceholder4"),modelValue:s.value.password,"onUpdate:modelValue":e[2]||(e[2]=u=>s.value.password=u)},{prefix:i(()=>[n(C,{class:"el-input__icon"},{default:i(()=>[n(j)]),_:1})]),suffix:i(()=>[o("i",{class:H(["iconfont el-input__icon login-content-password",m.value?"icon-yincangmima":"icon-xianshimima"]),onClick:e[1]||(e[1]=u=>m.value=!m.value)},null,2)]),_:1},8,["type","placeholder","modelValue"])]),_:1}),N("",!0),n(f,{class:"login-animation4"},{default:i(()=>[n(E,{type:"primary",class:"login-content-submit w-full",round:"",onClick:y,loading:d.signIn},{default:i(()=>[o("span",null,_(a.$t("message.account.accountBtnText")),1)]),_:1},8,["loading"])]),_:1})]),_:1},8,["model","rules"])])])])]),o("div",me,[o("p",_e,"©上海敏龙智创科技发展有限公司"+_(r.value["login.copyright"]||""),1),e[6]||(e[6]=o("p",{class:"la-other",style:{"margin-top":"5px"}},[o("a",{href:"https://wap.scjgj.sh.gov.cn/businessCheck/verifKey.do?showType=extShow&serial=9031000020250320141804000014054024-SAIC_SHOW_310000-6b70f287e0d2495697591ebb489adbe0956&signData=MEUCIGXojP0+cGcuBbeXVsraC1SL1GH9NehsKT6NwL/dPcjDAiEAryFp/aqoTmP5Z7seNN9eVQ4Rrvk4SsyT0FnqcL4kxFM=",target:"_blank"},[o("img",{style:{display:"inline-block",width:"28px"},src:W,alt:""})]),X("沪ICP备2024071246号-3 ")],-1))])]),I(S)?(V(),k("div",de,[o("img",{src:I(S),class:"loginBg fixed inset-0 z-1 w-full h-full"},null,8,ge)])):N("",!0)],64)}}}),Pe=le(he,[["__scopeId","data-v-af66460b"]]);export{Pe as default};
