邹方成 2a89a1ab9d
Some checks failed
Build docker and publish / linux (1.24.5) (push) Failing after 39s
feat(admin): 更新前端资源文件及修复相关功能
refactor(service): 修改banner和guild删除逻辑为软删除
fix(service): 修复删除操作使用软删除而非物理删除

build: 添加SQLite测试仓库实现
docs: 新增奖励管理字段拆分和批量抽奖UI改造文档

ci: 更新CI忽略文件
style: 清理无用资源文件
2025-11-19 01:35:55 +08:00

2 lines
11 KiB
JavaScript

var e=Object.defineProperty,t=Object.defineProperties,s=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,o=(t,s,a)=>s in t?e(t,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[s]=a,i=(e,t)=>{for(var s in t||(t={}))l.call(t,s)&&o(e,s,t[s]);if(a)for(var s of a(t))r.call(t,s)&&o(e,s,t[s]);return e},n=(e,a)=>t(e,s(a));import{d as u,r as d,t as p,a as c,o as m,n as g,b as v,c as h,e as f,f as x,g as y,u as b,h as w,i as j,j as k,k as _,l as B,m as M,p as E,q as T,s as $,v as P,w as V,x as I,A as O,y as F,z as L,B as C,C as R,D as z,E as S,F as U,G as A,H as D,I as X,J as N,K as q,L as H,M as K,N as G}from"./index-CZ0Lvzl5.js";/* empty css *//* empty css *//* empty css */import{_ as J}from"./index.vue_vue_type_script_setup_true_lang-DkYjV9Ul.js";import{_ as Y}from"./_plugin-vue_export-helper-BCo6x5W8.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{_ as W,a as Q}from"./LoginLeftView-DQuNwejA.js";import{M as Z}from"./md5-FaX5g_uo.js";import{E as ee,a as te}from"./index-DhBIlDpg.js";import{E as se,a as ae}from"./index-pVAXVlCV.js";import{E as le}from"./index-6-f3xsy2.js";import{E as re}from"./index-BZS0BBj4.js";import{E as oe}from"./index-CWBrZtwn.js";import"./el-dropdown-item-DcxLwUbk.js";import"./index-C6fEXl-e.js";import"./index-BW22oPP6.js";import"./index-K2zzami3.js";import"./use-form-item-BsnpemL_.js";import"./use-form-common-props-U6f9D53_.js";import"./index-BierC7rd.js";import"./index-DH_vX4BK.js";import"./refs-Cw5r5QN8.js";import"./useHeaderBar-B-Loh-tq.js";import"./index-2mJ3Csno.js";import"./_initCloneObject-DfOnBHdn.js";import"./index-BQ-mpgoy.js";import"./token-DWNpOE8r.js";import"./scroll-bFiZhqzI.js";import"./debounce-BWBxuUbE.js";import"./_baseIteratee-iUx42eT-.js";import"./index-ZgXgJNHL.js";import"./vnode-C4RX5enz.js";import"./index-MV2EqMi7.js";const ie=Y(u(n(i({},{name:"ArtDragVerify"}),{__name:"index",props:{value:{type:Boolean,default:!1},width:{default:"100%"},height:{default:40},text:{default:"按住滑块拖动"},successText:{default:"success"},background:{default:"#eee"},progressBarBg:{default:"#1385FF"},completedBg:{default:"#57D187"},circle:{type:Boolean,default:!1},radius:{default:"calc(var(--custom-radius) / 3 + 2px)"},handlerIcon:{default:"solar:double-alt-arrow-right-linear"},successIcon:{default:"ri:check-fill"},handlerBg:{default:"#fff"},textSize:{default:"13px"},textColor:{default:"#333"}},emits:["handlerMove","update:value","passCallback"],setup(e,{expose:t,emit:s}){const a=s,l=e,r=d({isMoving:!1,x:0,isOk:!1}),{isOk:o}=p(r),i=c(),n=c(),u=c(),T=c();let $,P,V,I;const O=e=>{$=e.targetTouches[0].pageX,P=e.targetTouches[0].pageY},F=e=>{V=e.targetTouches[0].pageX,I=e.targetTouches[0].pageY,Math.abs(V-$)>Math.abs(I-P)&&e.preventDefault()};document.addEventListener("touchstart",O),document.addEventListener("touchmove",F,{passive:!1});const L=()=>{var e;return"string"==typeof l.width?(null==(e=i.value)?void 0:e.offsetWidth)||260:l.width};m(()=>{var e;null==(e=i.value)||e.style.setProperty("--textColor",l.textColor),g(()=>{var e,t;const s=L();null==(e=i.value)||e.style.setProperty("--width",Math.floor(s/2)+"px"),null==(t=i.value)||t.style.setProperty("--pwidth",-Math.floor(s/2)+"px")}),document.addEventListener("touchstart",O),document.addEventListener("touchmove",F,{passive:!1})}),v(()=>{document.removeEventListener("touchstart",O),document.removeEventListener("touchmove",F)});const C={left:"0",width:l.height+"px",height:l.height+"px",background:l.handlerBg},R=h(()=>({width:"string"==typeof l.width?l.width:l.width+"px",height:l.height+"px",lineHeight:l.height+"px",background:l.background,borderRadius:l.circle?l.height/2+"px":l.radius})),z={background:l.progressBarBg,height:l.height+"px",borderRadius:l.circle?l.height/2+"px 0 0 "+l.height/2+"px":l.radius},S=h(()=>({fontSize:l.textSize})),U=h(()=>l.value?l.successText:l.text),A=e=>{l.value||(r.isMoving=!0,u.value.style.transition="none",r.x=(e.pageX||e.touches[0].pageX)-parseInt(u.value.style.left.replace("px",""),10)),a("handlerMove")},D=e=>{if(r.isMoving&&!l.value){const t=L();let s=(e.pageX||e.touches[0].pageX)-r.x;s>0&&s<=t-l.height?(u.value.style.left=s+"px",T.value.style.width=s+l.height/2+"px"):s>t-l.height&&(u.value.style.left=t-l.height+"px",T.value.style.width=t-l.height/2+"px",N())}},X=e=>{if(r.isMoving&&!l.value){const t=L();(e.pageX||e.changedTouches[0].pageX)-r.x<t-l.height?(r.isOk=!0,u.value.style.left="0",u.value.style.transition="all 0.2s",T.value.style.width="0",r.isOk=!1):(u.value.style.transition="none",u.value.style.left=t-l.height+"px",T.value.style.width=t-l.height/2+"px",N()),r.isMoving=!1}},N=()=>{a("update:value",!0),r.isMoving=!1,T.value.style.background=l.completedBg,n.value.style["-webkit-text-fill-color"]="unset",n.value.style.animation="slidetounlock2 2s cubic-bezier(0, 0.2, 1, 1) infinite",n.value.style.color="#fff",a("passCallback")};return t({reset:()=>{u.value.style.left="0",T.value.style.width="0",T.value.style.background=l.progressBarBg,n.value.style["-webkit-text-fill-color"]="transparent",n.value.style.animation="slidetounlock 2s cubic-bezier(0, 0.2, 1, 1) infinite",n.value.style.color=l.background,a("update:value",!1),r.isOk=!1,r.isMoving=!1,r.x=0}}),(t,s)=>{const a=J;return x(),f("div",{ref_key:"dragVerify",ref:i,class:"drag_verify",style:y(b(R)),onMousemove:D,onMouseup:X,onMouseleave:X,onTouchmove:D,onTouchend:X},[w("div",{class:j(["dv_progress_bar",{goFirst2:b(o)}]),ref_key:"progressBar",ref:T,style:z},null,2),w("div",{class:"dv_text",style:y(b(S)),ref_key:"messageRef",ref:n},[t.$slots.textBefore?k(t.$slots,"textBefore",{key:0},void 0,!0):_("",!0),B(" "+M(b(U))+" ",1),t.$slots.textAfter?k(t.$slots,"textAfter",{key:1},void 0,!0):_("",!0)],4),w("div",{class:j(["dv_handler dv_handler_bg",{goFirst:b(o)}]),onMousedown:A,onTouchstart:A,ref_key:"handler",ref:u,style:C},[E(a,{icon:e.value?e.successIcon:e.handlerIcon,class:"text-g-600"},null,8,["icon"])],34)],36)}}})),[["__scopeId","data-v-471ea464"]]),ne={class:"flex w-full h-screen"},ue={class:"relative flex-1"},de={class:"auth-right-wrap"},pe={class:"form"},ce={class:"title"},me={class:"sub-title"},ge={class:"relative pb-5 mt-6"},ve={class:"flex-cb mt-2 text-sm"},he={style:{"margin-top":"30px"}},fe={class:"mt-5 text-sm text-gray-600"},xe=Y(u(n(i({},{name:"Login"}),{__name:"index",setup(e){const t=T(),{isDark:s}=$(t),{t:a,locale:l}=P(),r=c(0);V(l,()=>{r.value++});const o=h(()=>[{key:"super",label:a("login.roles.super"),userName:"Super",password:"123456",roles:["R_SUPER"]},{key:"admin",label:a("login.roles.admin"),userName:"Admin",password:"123456",roles:["R_ADMIN"]},{key:"user",label:a("login.roles.user"),userName:"User",password:"123456",roles:["R_USER"]}]),i=c(),n=I(),u=R(),p=c(!1),g=c(!1),v=O.systemInfo.name,y=c(),k=d({account:"",username:"",password:"",rememberPassword:!0}),_=h(()=>({username:[{required:!0,message:a("login.placeholder.username"),trigger:"blur"}],password:[{required:!0,message:a("login.placeholder.password"),trigger:"blur"}]})),K=c(!1);m(()=>{J("super")});const J=e=>{var t,s;const a=o.value.find(t=>t.key===e);k.account=e,k.username=null!=(t=null==a?void 0:a.userName)?t:"",k.password=null!=(s=null==a?void 0:a.password)?s:""},Y=()=>{return e=this,t=null,s=function*(){if(y.value)try{if(!(yield y.value.validate()))return;if(!p.value)return void(g.value=!0);K.value=!0;const{username:e,password:t}=k,{token:s}=yield q({userName:e,password:Z(t).toString()});if(!s)throw new Error("Login failed - no token received");n.setToken(s);const a=yield H();n.setUserInfo(a),n.setLoginStatus(!0),ye(),u.push("/")}catch(e){}finally{K.value=!1,xe()}},new Promise((a,l)=>{var r=e=>{try{i(s.next(e))}catch(t){l(t)}},o=e=>{try{i(s.throw(e))}catch(t){l(t)}},i=e=>e.done?a(e.value):Promise.resolve(e.value).then(r,o);i((s=s.apply(e,t)).next())});var e,t,s},xe=()=>{i.value.reset()},ye=()=>{setTimeout(()=>{G({title:a("login.success.title"),type:"success",duration:2500,zIndex:1e4,message:`${a("login.success.message")}, ${v}!`})},150)};return(e,t)=>{const a=W,l=Q,n=ae,u=se,d=te,c=le,m=ie,v=re,h=z("RouterLink"),T=oe,$=ee,P=S("ripple");return x(),f("div",ne,[E(a),w("div",ue,[E(l),w("div",de,[w("div",pe,[w("h3",ce,M(e.$t("login.title")),1),w("p",me,M(e.$t("login.subTitle")),1),(x(),F($,{ref_key:"formRef",ref:y,model:b(k),rules:b(_),key:b(r),onKeyup:C(Y,["enter"]),style:{"margin-top":"25px"}},{default:L(()=>[E(d,{prop:"account"},{default:L(()=>[E(u,{modelValue:b(k).account,"onUpdate:modelValue":t[0]||(t[0]=e=>b(k).account=e),onChange:J},{default:L(()=>[(x(!0),f(U,null,A(b(o),e=>(x(),F(n,{key:e.key,label:e.label,value:e.key},{default:L(()=>[w("span",null,M(e.label),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),E(d,{prop:"username"},{default:L(()=>[E(c,{class:"custom-height",placeholder:e.$t("login.placeholder.username"),modelValue:b(k).username,"onUpdate:modelValue":t[1]||(t[1]=e=>b(k).username=e),modelModifiers:{trim:!0}},null,8,["placeholder","modelValue"])]),_:1}),E(d,{prop:"password"},{default:L(()=>[E(c,{class:"custom-height",placeholder:e.$t("login.placeholder.password"),modelValue:b(k).password,"onUpdate:modelValue":t[2]||(t[2]=e=>b(k).password=e),modelModifiers:{trim:!0},type:"password",autocomplete:"off","show-password":""},null,8,["placeholder","modelValue"])]),_:1}),w("div",ge,[w("div",{class:j(["relative z-[2] overflow-hidden select-none rounded-lg border border-transparent tad-300",{"!border-[#FF4E4F]":!b(p)&&b(g)}])},[E(m,{ref_key:"dragVerify",ref:i,value:b(p),"onUpdate:value":t[3]||(t[3]=e=>X(p)?p.value=e:null),text:e.$t("login.sliderText"),textColor:"var(--art-gray-700)",successText:e.$t("login.sliderSuccessText"),progressBarBg:b(D)("--el-color-primary"),background:b(s)?"#26272F":"#F1F1F4",handlerBg:"var(--default-box-color)"},null,8,["value","text","successText","progressBarBg","background"])],2),w("p",{class:j(["absolute top-0 z-[1] px-px mt-2 text-xs text-[#f56c6c] tad-300",{"translate-y-10":!b(p)&&b(g)}])},M(e.$t("login.placeholder.slider")),3)]),w("div",ve,[E(v,{modelValue:b(k).rememberPassword,"onUpdate:modelValue":t[4]||(t[4]=e=>b(k).rememberPassword=e)},{default:L(()=>[B(M(e.$t("login.rememberPwd")),1)]),_:1},8,["modelValue"]),E(h,{class:"text-theme",to:{name:"ForgetPassword"}},{default:L(()=>[B(M(e.$t("login.forgetPwd")),1)]),_:1})]),w("div",he,[N((x(),F(T,{class:"w-full custom-height",type:"primary",onClick:Y,loading:b(K)},{default:L(()=>[B(M(e.$t("login.btnText")),1)]),_:1},8,["loading"])),[[P]])]),w("div",fe,[w("span",null,M(e.$t("login.noAccount")),1),E(h,{class:"text-theme",to:{name:"Register"}},{default:L(()=>[B(M(e.$t("login.register")),1)]),_:1})])]),_:1},8,["model","rules"]))])])])])}}})),[["__scopeId","data-v-ed78a757"]]);export{xe as default};