sf_web_dist/js/index.1756805733068SYCQkJen.js

2 lines
5.4 KiB
JavaScript
Raw Normal View History

2025-09-02 17:37:22 +08:00
import{d as e,bn as a,aN as l,aL as s,m as n,w as o,l as t,N as i,c,a8 as u,a7 as r,e as d,g as v,O as p,t as m,aO as g,aH as h,aQ as y,r as b,b7 as f,bo as _,bj as k,F as w,a9 as x,ag as V,aK as j,o as S,b0 as T,D as z,al as C,b9 as K,ba as E,aY as I,bb as N,am as U,P as D,Q as L,an as R,bp as A,ap as H,b2 as O}from"./index.1756805733068DEMWadOr.js";import{E as q}from"./el-card.1756805733068OVUnE59u.js";import{_ as B}from"./index.1756805733068vfDKHJHn.js";/* empty css */import{a as Q,E as Y,b as Z}from"./el-dropdown.1756805733068VrViPr8N.js";import{g as $}from"./payee-user.1756805733068CnYM2KJc.js";import"./dropdown.1756805733068BJTplrKI.js";const F=e({__name:"index",props:{size:{type:String,required:!1}},setup(e){const h=[{label:"中文",value:a.ZH_CN},{label:"English",value:a.EN}],y=l(),{locale:b,t:f}=s();function _(e){b.value=e,y.changeLanguage(e),g.success(f("langSelect.message.success"))}return(a,l)=>{const s=B,g=Z,b=Y,f=Q;return d(),n(f,{trigger:"click",onCommand:_},{dropdown:o(()=>[i(b,null,{default:o(()=>[(d(),c(r,null,u(h,e=>i(g,{key:e.value,disabled:v(y).language===e.value,command:e.value},{default:o(()=>[p(m(e.label),1)]),_:2},1032,["disabled","command"])),64))]),_:1})]),default:o(()=>[t("div",null,[i(s,{"icon-class":"language",size:e.size},null,8,["size"])])]),_:1})}}}),G="/media/bg.1756805733068bhY6atRT.mp4",J={class:"login-container"},M={class:"absolute-lt flex-x-end p-3 w-full"},P={key:1,class:"video-background"},W={autoplay:"",loop:"",muted:"",playsinline:""},X=["src"],ee={class:"content"},ae={class:"content-login"},le={key:2,class:"video-background"},se={autoplay:"",loop:"",muted:"",playsinline:""},ne=["src"],oe={class:"content"},te={class:"google-content-login"},ie={key:0,class:"google-content-login-img"},ce=["src"],ue={class:"google-content-login-text"},re={key:0,class:"tips"},de=O(e({__name:"index",setup(e){l();const a=h(),s=y(),n=T(),u=b(s.theme===f.DARK),r=b(!0),g=b(!1),A=b(!1),{height:H}=(b(_),k()),O=b(""),q=b(!1),B=b(!1),Q=b(""),Y=b({username:"",password:"",google_code:""});function Z(){let e=Y.value;const a=he.value.active;return"payer"===a?e={...Y.value,mer_name:Y.value.username}:"payee"===a&&(e={...Y.value,ms_name:Y.value.username}),e}w(()=>({}));function de(){const e="/"+he.value.active;j.push({path:e})}function ve(){g.value=!0;const e=Z();a.login(e).then(e=>{if(1==e.google_check)return q.value=!0,void(0==e.google2fa_bind&&(B.value=!0,Q.value=e.qr_code_url));de()}).catch(()=>{}).finally(()=>{g.value=!1})}b("");const pe=()=>{const e=Z();$(e).then(()=>{B.value=!0,ve()})},me=()=>{const e=s.theme===f.DARK?f.LIGHT:f.DARK;s.changeTheme(e)};function ge(e){e instanceof KeyboardEvent&&(A.value=e.getModifierState("CapsLock"))}x(()=>{H.value<600?r.value=!1:r.value=!0});const he=b({active:"",list:[{identity:"other",name:"总后台"},{identity:"payer",name:"商户后台"},{identity:"payee",name:"四方管理后台"}]});V({visible:!1,type:"user-form",width:400,title:"",leftBtnText:"确 定",rightBtnText:""});let ye=JSON.parse(sessionStorage.getItem("loginInfo")||"{}");he.value.active=ye.loginType,O.value&&O.value!==he.value.active&&!["other","payee","payer"].includes(he.value.active)&&(localStorage.clear(),j.push({path:"/login",replace:!0})),O.value=he.value.active;return localStorage.getItem(O.value+"accessToken")&&de(),S(()=>{he.value.active}),z(()=>n.path,e=>{e.startsWith("/login/")&&he.value.active}),(e,a)=>{const l=N,s=F,n=U,r=R;return d(),c("div",J,[t("div",M,[i(l,{modelValue:v(u),"onUpdate:modelValue":a[0]||(a[0]=e=>I(u)?u.value=e:null),"inline-prompt":"","active-icon":v(E),"inactive-icon":v(K),onChange:me},null,8,["modelValue","active-icon","inactive-icon"]),i(s,{class:"ml-2 cursor-pointer"})]),(v(he).active,C("",!0)),v(he).active&&!v(q)?(d(),c("div",P,[t("video",W,[t("source",{src:v(G),type:"video/mp4"},null,8,X)]),t("div",ee,[t("h2",null,m(v(he).list.find(e=>e.identity===v(he).active).name),1),t("div",ae,[i(n,{ref:"username",modelValue:v(Y).username,"onUpdate:modelValue":a[4]||(a[4]=e=>v(Y).username=e),placeholder:e.$t("login.username"),name:"username",class:"