feat(admin): 新增管理后台前端资源文件 feat(api): 实现获取用户统计数据的API接口 - 添加获取用户道具卡数量、优惠券数量和积分余额的接口 - 实现设置默认地址和删除地址的接口 feat(service): 新增用户统计服务方法 - 实现GetUserStats方法查询用户统计数据 - 添加地址管理相关服务方法 fix(core): 修复静态资源路由问题 - 调整静态资源路由配置 - 优化404路由处理逻辑 chore: 更新前端构建配置 - 添加Windows平台构建命令 - 更新README构建说明
2 lines
11 KiB
JavaScript
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 k,j,k as _,l as B,m as M,p as T,q as $,s as E,v as P,w as V,x as O,A as F,y as I,z as L,B as R,C,D as S,E as z,F as U,G as X,H as A,I as D,J as N,K as q,L as H,M as Y,N as K}from"./index-ip5gDR6L.js";/* empty css *//* empty css *//* empty css */import{_ as G}from"./index.vue_vue_type_script_setup_true_lang-CCGboj8m.js";import{_ as J}from"./_plugin-vue_export-helper-BCo6x5W8.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{_ as W,a as Z}from"./LoginLeftView-Bs-_43dk.js";import{M as Q}from"./md5-DDluZiyF.js";import{E as ee,a as te}from"./index-CxGOZAw2.js";import{E as se,a as ae}from"./index-Br3btmwp.js";import{E as le}from"./index-DfrOVkw6.js";import{E as re}from"./index-KXWZe8V3.js";import{E as oe}from"./index-opP5No9I.js";import"./el-dropdown-item-DEgPCg9g.js";import"./index-C9KXwj2c.js";import"./index-fnD_mPvE.js";import"./index-CHAf6FpU.js";import"./use-form-item-BDb3ZgPk.js";import"./use-form-common-props-BwBs_jod.js";import"./index-DbRz3Zuu.js";import"./index-D-10FtUD.js";import"./refs-Cw5r5QN8.js";import"./useHeaderBar-DPCTFiDX.js";import"./index-BOPvNXEP.js";import"./_initCloneObject-DwsgJamq.js";import"./index-D1xXI5gl.js";import"./token-DWNpOE8r.js";import"./scroll-ChxXkPhM.js";import"./debounce-B9s63_mG.js";import"./index-Jz5GfFad.js";import"./vnode-6FKeug3R.js";import"./index-D-iZIej9.js";const ie=J(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(),$=c();let E,P,V,O;const F=e=>{E=e.targetTouches[0].pageX,P=e.targetTouches[0].pageY},I=e=>{V=e.targetTouches[0].pageX,O=e.targetTouches[0].pageY,Math.abs(V-E)>Math.abs(O-P)&&e.preventDefault()};document.addEventListener("touchstart",F),document.addEventListener("touchmove",I,{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",F),document.addEventListener("touchmove",I,{passive:!1})}),v(()=>{document.removeEventListener("touchstart",F),document.removeEventListener("touchmove",I)});const R={left:"0",width:l.height+"px",height:l.height+"px",background:l.handlerBg},C=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})),S={background:l.progressBarBg,height:l.height+"px",borderRadius:l.circle?l.height/2+"px 0 0 "+l.height/2+"px":l.radius},z=h(()=>({fontSize:l.textSize})),U=h(()=>l.value?l.successText:l.text),X=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")},A=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",$.value.style.width=s+l.height/2+"px"):s>t-l.height&&(u.value.style.left=t-l.height+"px",$.value.style.width=t-l.height/2+"px",N())}},D=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",$.value.style.width="0",r.isOk=!1):(u.value.style.transition="none",u.value.style.left=t-l.height+"px",$.value.style.width=t-l.height/2+"px",N()),r.isMoving=!1}},N=()=>{a("update:value",!0),r.isMoving=!1,$.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",$.value.style.width="0",$.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=G;return x(),f("div",{ref_key:"dragVerify",ref:i,class:"drag_verify",style:y(b(C)),onMousemove:A,onMouseup:D,onMouseleave:D,onTouchmove:A,onTouchend:D},[w("div",{class:k(["dv_progress_bar",{goFirst2:b(o)}]),ref_key:"progressBar",ref:$,style:S},null,2),w("div",{class:"dv_text",style:y(b(z)),ref_key:"messageRef",ref:n},[t.$slots.textBefore?j(t.$slots,"textBefore",{key:0},void 0,!0):_("",!0),B(" "+M(b(U))+" ",1),t.$slots.textAfter?j(t.$slots,"textAfter",{key:1},void 0,!0):_("",!0)],4),w("div",{class:k(["dv_handler dv_handler_bg",{goFirst:b(o)}]),onMousedown:X,onTouchstart:X,ref_key:"handler",ref:u,style:R},[T(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=J(u(n(i({},{name:"Login"}),{__name:"index",setup(e){const t=$(),{isDark:s}=E(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=O(),u=C(),p=c(!1),g=c(!1),v=F.systemInfo.name,y=c(),j=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"}]})),Y=c(!1);m(()=>{G("super")});const G=e=>{var t,s;const a=o.value.find(t=>t.key===e);j.account=e,j.username=null!=(t=null==a?void 0:a.userName)?t:"",j.password=null!=(s=null==a?void 0:a.password)?s:""},J=()=>{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);Y.value=!0;const{username:e,password:t}=j,{token:s,refreshToken:a}=yield q({userName:e,password:Q(t).toString()});if(!s)throw new Error("Login failed - no token received");n.setToken(s,a);const l=yield H();n.setUserInfo(l),n.setLoginStatus(!0),ye(),u.push("/")}catch(e){}finally{Y.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(()=>{K({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=Z,n=ae,u=se,d=te,c=le,m=ie,v=re,h=S("RouterLink"),$=oe,E=ee,P=z("ripple");return x(),f("div",ne,[T(a),w("div",ue,[T(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(),I(E,{ref_key:"formRef",ref:y,model:b(j),rules:b(_),key:b(r),onKeyup:R(J,["enter"]),style:{"margin-top":"25px"}},{default:L(()=>[T(d,{prop:"account"},{default:L(()=>[T(u,{modelValue:b(j).account,"onUpdate:modelValue":t[0]||(t[0]=e=>b(j).account=e),onChange:G},{default:L(()=>[(x(!0),f(U,null,X(b(o),e=>(x(),I(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}),T(d,{prop:"username"},{default:L(()=>[T(c,{class:"custom-height",placeholder:e.$t("login.placeholder.username"),modelValue:b(j).username,"onUpdate:modelValue":t[1]||(t[1]=e=>b(j).username=e),modelModifiers:{trim:!0}},null,8,["placeholder","modelValue"])]),_:1}),T(d,{prop:"password"},{default:L(()=>[T(c,{class:"custom-height",placeholder:e.$t("login.placeholder.password"),modelValue:b(j).password,"onUpdate:modelValue":t[2]||(t[2]=e=>b(j).password=e),modelModifiers:{trim:!0},type:"password",autocomplete:"off","show-password":""},null,8,["placeholder","modelValue"])]),_:1}),w("div",ge,[w("div",{class:k(["relative z-[2] overflow-hidden select-none rounded-lg border border-transparent tad-300",{"!border-[#FF4E4F]":!b(p)&&b(g)}])},[T(m,{ref_key:"dragVerify",ref:i,value:b(p),"onUpdate:value":t[3]||(t[3]=e=>D(p)?p.value=e:null),text:e.$t("login.sliderText"),textColor:"var(--art-gray-700)",successText:e.$t("login.sliderSuccessText"),progressBarBg:b(A)("--el-color-primary"),background:b(s)?"#26272F":"#F1F1F4",handlerBg:"var(--default-box-color)"},null,8,["value","text","successText","progressBarBg","background"])],2),w("p",{class:k(["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,[T(v,{modelValue:b(j).rememberPassword,"onUpdate:modelValue":t[4]||(t[4]=e=>b(j).rememberPassword=e)},{default:L(()=>[B(M(e.$t("login.rememberPwd")),1)]),_:1},8,["modelValue"]),T(h,{class:"text-theme",to:{name:"ForgetPassword"}},{default:L(()=>[B(M(e.$t("login.forgetPwd")),1)]),_:1})]),w("div",he,[N((x(),I($,{class:"w-full custom-height",type:"primary",onClick:J,loading:b(Y)},{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),T(h,{class:"text-theme",to:{name:"Register"}},{default:L(()=>[B(M(e.$t("login.register")),1)]),_:1})])]),_:1},8,["model","rules"]))])])])])}}})),[["__scopeId","data-v-242b3ba1"]]);export{xe as default};
|