forked from MarSeventh/CloudFlare-ImgBed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
220.356adac2.js
2 lines (2 loc) · 2.99 KB
/
220.356adac2.js
1
2
"use strict";(self["webpackChunksanyue_imghub"]=self["webpackChunksanyue_imghub"]||[]).push([[220],{8220:function(s,e,t){t.r(e),t.d(e,{default:function(){return k}});var a=t(6768),i=t(5130);const n=s=>((0,a.Qi)("data-v-4b708caf"),s=s(),(0,a.jt)(),s),l={class:"login"},o=n((()=>(0,a.Lk)("img",{id:"bg1",class:"background-image1",alt:"Background Image"},null,-1))),r=n((()=>(0,a.Lk)("img",{id:"bg2",class:"background-image2",alt:"Background Image"},null,-1))),g={class:"login-container"},u=n((()=>(0,a.Lk)("h1",null,"Login",-1)));function d(s,e,t,n,d,c){const p=(0,a.g2)("el-input"),h=(0,a.g2)("el-button");return(0,a.uX)(),(0,a.CE)("div",l,[o,r,(0,a.Lk)("div",g,[u,(0,a.bF)(p,{class:"password-input",modelValue:d.password,"onUpdate:modelValue":e[0]||(e[0]=s=>d.password=s),placeholder:"输入认证码,若未设置留空即可~",type:"password","show-password":"",onKeyup:(0,i.jR)(c.login,["enter","native"])},null,8,["modelValue","onKeyup"]),(0,a.bF)(h,{class:"submit",type:"primary",onClick:c.login},{default:(0,a.k6)((()=>[(0,a.eW)("submit")])),_:1},8,["onClick"])])])}t(4114);var c=t(4570),p=t.n(c),h=t(4373),m=t(782),y={data(){return{password:"",writtenPass:"",bingWallPaperIndex:0,customWallPaperIndex:0}},computed:{...(0,m.L8)(["userConfig","bingWallPapers"])},mounted(){const s=document.getElementById("bg1"),e=document.getElementById("bg2");"bing"===this.userConfig?.loginBkImg?(this.$store.dispatch("fetchBingWallPapers"),s.src=this.bingWallPapers[this.bingWallPaperIndex]?.url,s.onload=()=>{s.style.opacity=1},setInterval((()=>{let t=0!=s.style.opacity?s:e,a=0!=s.style.opacity?e:s;t.style.opacity=0,this.bingWallPaperIndex=(this.bingWallPaperIndex+1)%this.bingWallPapers.length,a.src=this.bingWallPapers[this.bingWallPaperIndex]?.url,a.onload=()=>{a.style.opacity=1}}),3e3)):this.userConfig?.loginBkImg instanceof Array&&this.userConfig?.loginBkImg?.length>1?(s.src=this.userConfig.loginBkImg[this.customWallPaperIndex],s.onload=()=>{s.style.opacity=1},setInterval((()=>{let t=0!=s.style.opacity?s:e,a=0!=s.style.opacity?e:s;t.style.opacity=0,this.customWallPaperIndex=(this.customWallPaperIndex+1)%this.userConfig.loginBkImg.length,a.src=this.userConfig.loginBkImg[this.customWallPaperIndex],a.onload=()=>{a.style.opacity=1}}),3e3)):this.userConfig?.loginBkImg instanceof Array&&1==this.userConfig?.loginBkImg?.length?(s.src=this.userConfig.loginBkImg[0],s.onload=()=>{s.style.opacity=1}):(s.src="https://imgbed.sanyue.site/file/0dbd5add3605a0b2e8994.jpg",s.onload=()=>{s.style.opacity=1})},methods:{login(){""===this.password?this.writtenPass="unset":this.writtenPass=this.password,h.A.post("/login",{authCode:this.password}).then((s=>{200===s.status?(p().set("authCode",this.writtenPass,"14d"),this.$router.push("/"),this.$message.success("登录成功~")):this.$message.error("登录失败,请检查认证码是否正确~")})).catch((s=>{this.$message.error("登录失败,请检查认证码是否正确~")}))}}},b=t(1241);const I=(0,b.A)(y,[["render",d],["__scopeId","data-v-4b708caf"]]);var k=I}}]);
//# sourceMappingURL=220.356adac2.js.map