sf_web_dist/js/index.1758872782626DnYH9qoP.js

2 lines
5.3 KiB
JavaScript
Raw Normal View History

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