1 |
- import{u as e,r as l,w as s,a9 as a,p as t,o,b as n,c as i,d as u,k as r,h as d,e as c,j as p,ac as m,Y as v,t as g,i as x,V as h,ad as w,m as k,T as f,S as _,U as y,H as b,l as V,B as C,C as S,N as L,v as j,g as U,ab as M,ae as B}from"./index.1702580971041.js";const E={class:"userLogin"},O={key:0,class:"loginPage"},F={class:"loginCard"},P={class:"rightLogin"},z={class:"text-lg font-bold mb-6 flex items-center"},I={key:0,class:"mt-3 login"},H={class:"input_div"},q=c("div",{class:"input_title"}," 邮箱账号 ",-1),R=c("div",{class:"input_title mt-3"}," 登录密码 ",-1),A=["onKeyup"],K={class:"flex mt-4"},T=c("hr",{class:"mt-6 mb-6 hr-login"},null,-1),D={class:"flex"},G={key:1,class:"mt-3 register"},N={class:"input_div"},Y=c("div",{class:"input_title"}," 邮箱账号 ",-1),J=c("div",{class:"input_title mt-3"}," 注册密码 ",-1),Q=["onKeyup"],W=c("div",{class:"input_title mt-3"}," 验证码 ",-1),X={class:"flex gap-4"},Z={key:1,class:"SmsCodeButton"},$={class:"flex mt-4"},ee=c("hr",{class:"mt-6 mb-6 hr-login"},null,-1),le={class:"flex"},se={key:2,class:"mt-3 register"},ae={class:"input_div"},te=c("div",{class:"input_title"}," 邮箱账号 ",-1),oe=c("div",{class:"input_title mt-3"}," 新密码 ",-1),ne=c("div",{class:"input_title mt-3"}," 邮件验证码 ",-1),ie={class:"flex gap-4"},ue={key:1,class:"SmsCodeButton"},re={class:"flex mt-4"},de=c("hr",{class:"mt-6 mb-6 hr-login"},null,-1),ce={class:"flex"},pe={__name:"userLogin",setup(V){const C=e(),S=l(1),L=l(60),j=l(!1);s(j,(e=>{document.body.style.overflow=e?"hidden":"scroll"}));const U=()=>{j.value=!1},M=a({username:"",password:""}),B=a({username:"",password:"",code:""}),pe=a({username:"",password:"",code:""}),me=()=>{_({url:"/user/forgetPass",method:"post",data:{username:pe.username,password:pe.password,code:pe.code}}).then((e=>{1===e.code?(M.username=pe.username,M.password=pe.password,y.success("重置成功,已为您自动登录"),ge()):y.error(e.msg)}))},ve=()=>{_({url:"/user/register",method:"post",data:{username:B.username,password:B.password,code:B.code}}).then((e=>{1===e.code?(M.username=B.username,M.password=B.password,y.success("从现在起你就是我的主人了,已为您自动登录"),ge()):y.error(e.msg)}))},ge=()=>{_({url:"/user/login",method:"post",data:{username:M.username,password:M.password}}).then((e=>{if(1===e.code){const{user_id:l,token:s}=e.data;b.set("token",s).set("user_id",l),C.dispatch("loginIn"),j.value=!1}else y.error(e.msg)}))},xe=e=>{_({url:"/api/getMailCode",method:"post",data:{mail:e}}).then((e=>{if(1===e.code){y.success(e.msg);let l=setInterval((()=>{L.value-=1,L.value<=0&&(clearInterval(l),L.value=60)}),1e3)}else y.error(e.msg)}))},he=(e=1)=>{S.value=e,j.value=!0};return t.on("openLogin",he),o((()=>{t.off("openLogin",he)})),(e,l)=>{const s=n("el-icon");return i(),u("div",E,[r(f,{name:"loginFade"},{default:d((()=>[j.value?(i(),u("div",O,[c("div",F,[c("div",P,[r(s,{onClick:U,size:"25px",class:"closeLogin"},{default:d((()=>[r(p(m))])),_:1}),c("h2",z,[c("img",{class:"loginIco",src:"/favicon",alt:""}),v(" "+g(["登录","注册","重置"][S.value-1])+"您的账户 ",1)]),1===S.value?(i(),u("div",I,[c("div",H,[q,x(c("input",{"onUpdate:modelValue":l[0]||(l[0]=e=>M.username=e),class:"inputLogin",placeholder:"请输入邮箱"},null,512),[[h,M.username]]),R,x(c("input",{type:"password","onUpdate:modelValue":l[1]||(l[1]=e=>M.password=e),placeholder:"请输入6-18位密码",class:"inputLogin",onKeyup:w(ge,["enter"])},null,40,A),[[h,M.password]])]),c("div",K,[c("span",{class:"hover text-blue-500 ml-auto text-sm",onClick:l[2]||(l[2]=e=>S.value=3)},"忘记密码?")]),c("div",{class:"mt-4 flex"},[c("button",{class:"loginBtn",onClick:ge}," 登录 ")]),T,c("div",D,[c("div",{class:"text-gray-500 text-sm m-auto cursor-pointer",onClick:l[3]||(l[3]=e=>S.value=2)},"还没有账号?去注册")])])):k("",!0),2===S.value?(i(),u("div",G,[c("div",N,[Y,x(c("input",{class:"inputLogin","onUpdate:modelValue":l[4]||(l[4]=e=>B.username=e),placeholder:"请输入邮箱"},null,512),[[h,B.username]]),J,x(c("input",{"onUpdate:modelValue":l[5]||(l[5]=e=>B.password=e),placeholder:"请输入6-18位密码",class:"inputLogin",type:"password",onKeyup:w(ge,["enter"])},null,40,Q),[[h,B.password]]),W,c("div",X,[x(c("input",{type:"number",class:"inputLogin","onUpdate:modelValue":l[6]||(l[6]=e=>B.code=e),placeholder:"请输入验证码"},null,512),[[h,B.code]]),60===L.value?(i(),u("button",{key:0,class:"SmsCodeButton",onClickOnce:l[7]||(l[7]=e=>xe(B.username))},"获取 ",32)):(i(),u("button",Z,g(L.value)+"s",1))])]),c("div",$,[c("span",{class:"hover text-blue-500 ml-auto text-sm",onClick:l[8]||(l[8]=e=>S.value=1)},"已有账号?去登录")]),c("div",{class:"mt-4 flex"},[c("button",{class:"loginBtn",onClick:ve}," 提交注册 ")]),ee,c("div",le,[c("div",{class:"text-gray-500 text-sm m-auto cursor-pointer",onClick:l[9]||(l[9]=e=>S.value=3)},"忘记密码?去找回")])])):k("",!0),3===S.value?(i(),u("div",se,[c("div",ae,[te,x(c("input",{class:"inputLogin","onUpdate:modelValue":l[10]||(l[10]=e=>pe.username=e),placeholder:"请输入邮箱"},null,512),[[h,pe.username]]),oe,x(c("input",{"onUpdate:modelValue":l[11]||(l[11]=e=>pe.password=e),placeholder:"请输入6-18位密码",type:"password",class:"inputLogin"},null,512),[[h,pe.password]]),ne,c("div",ie,[x(c("input",{type:"number",class:"inputLogin","onUpdate:modelValue":l[12]||(l[12]=e=>pe.code=e),placeholder:"请输入验证码"},null,512),[[h,pe.code]]),60===L.value?(i(),u("button",{key:0,class:"SmsCodeButton",onClickOnce:l[13]||(l[13]=e=>xe(B.username))},"获取 ",32)):(i(),u("button",ue,g(L.value)+"s",1))])]),c("div",re,[c("span",{class:"hover text-blue-500 ml-auto text-sm",onClick:l[14]||(l[14]=e=>S.value=1)},"已有账号?去登录")]),c("div",{class:"mt-4 flex"},[c("button",{class:"loginBtn",onClick:me}," 提交 ")]),de,c("div",ce,[c("div",{class:"text-gray-500 text-sm m-auto cursor-pointer",onClick:l[15]||(l[15]=e=>S.value=2)},"还没有账号?去注册")])])):k("",!0)])])])):k("",!0)])),_:1})])}}},me=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var l=16*Math.random()|0;return("x"==e?l:3&l|8).toString(16)})),ve={class:"linkEdit"},ge={class:"grid grid-rows-1 grid-cols-5"},xe={class:"space-y-4 col-span-3"},he={class:"col-span-2 ml-3"},we=["src"],ke={class:"flex mt-3"},fe={__name:"linkEdit",setup(s){const a=window.isMobile,m=l(!1),g=e(),x={id:"",name:"",src:"",url:"",size:"1x1",type:"icon"},h=l(Object.assign({},x)),w=e=>{1==e.code&&(h.value.src=e.url)},k=()=>{if(""==h.value.id)h.value.id=me(),g.state.link.push(h.value);else{const e=g.state.link.findIndex((e=>e.id==h.value.id));g.state.link[e]=h.value}g.commit("updateLink",g.state.link),m.value=!1};return t.on("linkEdit",((e=!1)=>{h.value=Object.assign({},x),e&&(h.value=e),m.value=!0})),o((()=>{t.off("linkEdit".open)})),(e,l)=>{const s=n("el-input"),t=n("el-button"),o=n("el-upload"),x=n("el-dialog");return i(),u("div",ve,[r(x,{modelValue:m.value,"onUpdate:modelValue":l[3]||(l[3]=e=>m.value=e),"close-on-click-modal":!1,width:p(a)?"350px":"600px",title:"编辑标签"},{default:d((()=>[c("div",ge,[c("div",xe,[c("div",null,[r(s,{modelValue:h.value.name,"onUpdate:modelValue":l[0]||(l[0]=e=>h.value.name=e),placeholder:"标签名称"},null,8,["modelValue"])]),c("div",null,[r(s,{modelValue:h.value.url,"onUpdate:modelValue":l[1]||(l[1]=e=>h.value.url=e),placeholder:"标签url"},{append:d((()=>[r(t,{type:"primary"},{default:d((()=>[v("获取图标")])),_:1})])),_:1},8,["modelValue"])]),c("div",null,[r(s,{modelValue:h.value.src,"onUpdate:modelValue":l[2]||(l[2]=e=>h.value.src=e),placeholder:"标签图标地址"},{append:d((()=>[r(o,{class:"upload-demo","show-file-list":!1,"on-success":w,action:p(g).state.site.upload},{default:d((()=>[r(t,{type:"primary"},{default:d((()=>[v("上传")])),_:1})])),_:1},8,["action"])])),_:1},8,["modelValue"])])]),c("div",he,[c("img",{src:h.value.src,class:"w-9/12 rounded-2xl"},null,8,we)])]),c("div",ke,[r(t,{class:"ml-auto bg-blue-400",type:"primary",onClick:V(k,["stop"])},{default:d((()=>[v("保存")])),_:1},8,["onClick"])])])),_:1},8,["modelValue","width"])])}}},_e={iconGroup:C((()=>S((()=>import("./iconGroup.1702580971041.js")),["assets/iconGroup.1702580971041.js","assets/iconGroup.1702580971041.css","assets/index.1702580971041.js","assets/index.17025809710415.css","assets/jquery.1702580971041.js"]))),addicon:C((()=>S((()=>import("./addicon.1702580971041.js")),["assets/addicon.1702580971041.js","assets/addicon.1702580971041.css","assets/index.1702580971041.js","assets/index.17025809710415.css"])))};const ye={key:0,class:"framer"},be={class:"flex justify-end"},Ve=[c("svg",{width:"24",height:"24",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[c("path",{d:"M33 6H42V15",stroke:"var(--framerSvg)","stroke-width":"4","stroke-linecap":"round","stroke-linejoin":"round"}),c("path",{d:"M42 33V42H33",stroke:"var(--framerSvg)","stroke-width":"4","stroke-linecap":"round","stroke-linejoin":"round"}),c("path",{d:"M15 42H6V33",stroke:"var(--framerSvg)","stroke-width":"4","stroke-linecap":"round","stroke-linejoin":"round"}),c("path",{d:"M6 15V6H15",stroke:"var(--framerSvg)","stroke-width":"4","stroke-linecap":"round","stroke-linejoin":"round"})],-1)],Ce=[c("svg",{width:"24",height:"24",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[c("path",{d:"M8 8L40 40",stroke:"var(--framerSvg)","stroke-width":"4","stroke-linecap":"round","stroke-linejoin":"round"}),c("path",{d:"M8 40L40 8",stroke:"var(--framerSvg)","stroke-width":"4","stroke-linecap":"round","stroke-linejoin":"round"})],-1)],Se={class:"componentView"},Le={__name:"framer",setup(e){const s=l(!1),a=l({}),m=l(!0);let v=!1;const g=l(null);let h={width:"800px",height:"500px"};const w=()=>{if(0==v){const e=document.querySelector(".framerAlert");(e.requestFullscreen||e.mozRequestFullScreen||e.webkitRequestFullscreen||e.msRequestFullscreen).call(e),v=!0}else{(document.exitFullScreen||document.mozCancelFullScreen||document.webkitExitFullscreen||document.msExitFullscreen).call(document),v=!1}},f=l(Object.assign({},h)),_=L(_e.note),y=e=>{const{full:l=!0}=e;m.value=l;const{size:t=!1}=e;t?(f.value.width=t.width,f.value.height=t.height):f.value=Object.assign({},h),B("--frameHeight",f.value.height),_.value=_e[e.component];const{data:o={}}=e;a.value=o,s.value=!0},b=()=>{s.value=!1},C=e=>{s.value=!1,e()};return t.on("openPlugin",y),t.on("closePlugin",b),o((()=>{t.off("openPlugin",y),t.off("closePlugin",b)})),(e,l)=>{const t=n("el-dialog");return s.value?(i(),u("div",ye,[r(t,{modelValue:s.value,"onUpdate:modelValue":l[1]||(l[1]=e=>s.value=e),"append-to-body":"","show-close":!1,"close-on-click-modal":!1,width:f.value.width,"before-close":C,class:"framerAlert",ref_key:"framers",ref:g,draggable:""},{header:d((()=>[c("div",be,[x(c("div",{size:"30px",class:"cursor-pointer windowController windowfull",onClick:w,onMousemove:l[0]||(l[0]=V((()=>{}),["stop"])),title:"全屏"},Ve,544),[[j,m.value]]),c("div",{size:"30px",class:"cursor-pointer windowController windowclose",onClick:b,title:"关闭窗口"},Ce)])])),default:d((()=>[c("div",Se,[(i(),U(M(p(_)),{data:a.value,onClose:b},null,40,["data"]))])])),_:1},8,["modelValue","width"])])):k("",!0)}}};const je={class:"appSide"},Ue={__name:"appSide",setup:l=>(e(),(e,l)=>(i(),u("div",je,[r(pe),r(fe),r(Le)])))};var Me=Object.freeze(Object.defineProperty({__proto__:null,default:Ue},Symbol.toStringTag,{value:"Module"}));export{Me as a,me as u};
|