forked from MarSeventh/CloudFlare-ImgBed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
343.cd915158.js.map
1 lines (1 loc) · 6.85 KB
/
343.cd915158.js.map
1
{"version":3,"file":"js/343.cd915158.js","mappings":"uQAEaA,MAAM,mB,UACPC,EAAAA,EAAAA,IAAc,UAAV,SAAK,K,+FAFjBC,EAAAA,EAAAA,IAcM,OAdDF,MAAM,QAASG,OADxBC,EAAAA,EAAAA,IAC+BC,EAAAC,gB,EACvBL,EAAAA,EAAAA,IAYM,MAZNM,EAYM,CAXFC,GACAC,EAAAA,EAAAA,IAQWC,EAAA,CAPPV,MAAM,iBALtBW,WAMyBC,EAAAC,SANzB,sBAAAC,EAAA,KAAAA,EAAA,GAAAC,GAMyBH,EAAAC,SAAQE,GACjBC,YAAY,kBACZC,KAAK,WACL,mBACCC,SAVjBC,EAAAA,EAAAA,IAUqCd,EAAAe,MAAK,qB,kCAG9BX,EAAAA,EAAAA,IAA0EY,EAAA,CAA/DrB,MAAM,SAASiB,KAAK,UAAWK,QAAOjB,EAAAe,O,CAb7DG,SAAAC,EAAAA,EAAAA,KAaoE,IAAM,EAb1EC,EAAAA,EAAAA,IAaoE,aAbpEC,EAAA,G,uEAuBA,GACIC,IAAAA,GACI,MAAO,CACHd,SAAU,GACVe,YAAa,GACbC,mBAAoB,EACpBC,qBAAsB,EAE9B,EACAC,SAAU,KACHC,EAAAA,EAAAA,IAAW,CAAC,aAAc,mBAC7B1B,aAAAA,GACI,IAAI2B,EAAS,GAQb,OANIA,EADgC,SAAhCC,KAAKC,YAAYC,WACR,OAAOF,KAAKG,eAAeH,KAAKL,qBAAqBS,OAErDJ,KAAKC,YAAYC,YAAYG,OAAS,EACjC,OAAOL,KAAKC,WAAWC,WAAWF,KAAKJ,yBACzC,iEAET,CACHU,gBAAiBP,EAEzB,GAEJQ,OAAAA,GACwC,SAAhCP,KAAKC,YAAYC,YACjBF,KAAKQ,OAAOC,SAAS,uBACrBC,aAAY,KACRV,KAAKL,oBAAsBK,KAAKL,mBAAqB,GAAKK,KAAKG,eAAeE,MAAK,GACpF,MACIL,KAAKC,YAAYC,YAAYG,OAAS,GAC7CK,aAAY,KACRV,KAAKJ,sBAAwBI,KAAKJ,qBAAuB,GAAKI,KAAKC,WAAWC,WAAWG,MAAK,GAC/F,IAEX,EACAM,QAAS,CACLzB,KAAAA,GAE0B,KAAlBc,KAAKrB,SACLqB,KAAKN,YAAc,QAEnBM,KAAKN,YAAcM,KAAKrB,SAE5BiC,EAAAA,EAAMC,KAAK,SAAU,CACjBC,SAAUd,KAAKrB,WAChBoC,MAAKC,IACe,MAAfA,EAAIC,QAIRC,IAAAA,IAAY,WAAYlB,KAAKN,YAAa,OAC1CM,KAAKmB,QAAQC,KAAK,KAClBpB,KAAKqB,SAASC,QAAQ,UALlBtB,KAAKqB,SAASE,MAAM,mBAKM,IAC/BC,OAAMC,IACLzB,KAAKqB,SAASE,MAAM,mBAAmB,GAE/C,I,UC1ER,MAAMG,GAA2B,OAAgB,EAAQ,CAAC,CAAC,SAASC,GAAQ,CAAC,YAAY,qBAEzF,O","sources":["webpack://sanyue_imghub/./src/views/Login.vue","webpack://sanyue_imghub/./src/views/Login.vue?240b"],"sourcesContent":["<template>\r\n <div class=\"login\" :style=\"backgroundImg\">\r\n <div class=\"login-container\">\r\n <h1>Login</h1>\r\n <el-input \r\n class=\"password-input\" \r\n v-model=\"password\" \r\n placeholder=\"输入认证码,若未设置留空即可~\" \r\n type=\"password\" \r\n show-password\r\n @keyup.enter.native=\"login\"\r\n >\r\n </el-input>\r\n <el-button class=\"submit\" type=\"primary\" @click=\"login\">submit</el-button>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport cookies from 'vue-cookies'\r\nimport axios from 'axios'\r\nimport { mapGetters } from 'vuex'\r\n\r\nexport default {\r\n data() {\r\n return {\r\n password: '',\r\n writtenPass: '',\r\n bingWallPaperIndex: 0,\r\n customWallPaperIndex: 0\r\n }\r\n },\r\n computed: {\r\n ...mapGetters(['userConfig', 'bingWallPapers']),\r\n backgroundImg() {\r\n let imgUrl = ''\r\n if (this.userConfig?.loginBkImg === 'bing') {\r\n imgUrl = `url(${this.bingWallPapers[this.bingWallPaperIndex]?.url})`\r\n } else {\r\n imgUrl = this.userConfig?.loginBkImg?.length > 0\r\n ? `url(${this.userConfig.loginBkImg[this.customWallPaperIndex]})` :\r\n 'url(https://imgbed.sanyue.site/file/0dbd5add3605a0b2e8994.jpg)'\r\n }\r\n return {\r\n backgroundImage: imgUrl\r\n }\r\n }\r\n },\r\n mounted() {\r\n if (this.userConfig?.loginBkImg === 'bing') {\r\n this.$store.dispatch('fetchBingWallPapers')\r\n setInterval(() => {\r\n this.bingWallPaperIndex = (this.bingWallPaperIndex + 1) % this.bingWallPapers.length\r\n }, 3000)\r\n } else if (this.userConfig?.loginBkImg?.length > 1) {\r\n setInterval(() => {\r\n this.customWallPaperIndex = (this.customWallPaperIndex + 1) % this.userConfig.loginBkImg.length\r\n }, 3000)\r\n }\r\n },\r\n methods: {\r\n login() {\r\n // set authCode to Cookie, expires in 2 weeks\r\n if (this.password === '') {\r\n this.writtenPass = 'unset'\r\n } else {\r\n this.writtenPass = this.password\r\n }\r\n axios.post('/login', {\r\n authCode: this.password\r\n }).then(res => {\r\n if (res.status !== 200) {\r\n this.$message.error('登录失败,请检查认证码是否正确~')\r\n return\r\n }\r\n cookies.set('authCode', this.writtenPass, '14d')\r\n this.$router.push('/')\r\n this.$message.success('登录成功~')\r\n }).catch(err => {\r\n this.$message.error('登录失败,请检查认证码是否正确~')\r\n })\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style scoped>\r\n.login {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n height: 100vh;\r\n transition: background-image 1s ease-in-out;\r\n background-size: cover;\r\n background-attachment: fixed;\r\n}\r\n.login-container {\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: space-around;\r\n align-items: center;\r\n height: 40vh;\r\n width: 40vw;\r\n border-radius: 12px;\r\n box-shadow: 0 0 12px rgba(0, 0, 0, 0.12);\r\n background-color: rgba(255, 255, 255, 0.6);\r\n backdrop-filter: blur(8px);\r\n transition: all 0.3s ease;\r\n}\r\n.login-container:hover {\r\n box-shadow: 0 0 12px 4px rgba(0, 0, 0, 0.24);\r\n transform: translateY(-5px);\r\n}\r\n.password-input {\r\n margin-bottom: 15px;\r\n width: 30vw;\r\n}\r\n.submit {\r\n margin-top: 10px;\r\n}\r\n</style>","import { render } from \"./Login.vue?vue&type=template&id=3b453c48&scoped=true\"\nimport script from \"./Login.vue?vue&type=script&lang=js\"\nexport * from \"./Login.vue?vue&type=script&lang=js\"\n\nimport \"./Login.vue?vue&type=style&index=0&id=3b453c48&scoped=true&lang=css\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-3b453c48\"]])\n\nexport default __exports__"],"names":["class","_createElementVNode","_createElementBlock","style","_normalizeStyle","$options","backgroundImg","_hoisted_1","_hoisted_2","_createVNode","_component_el_input","modelValue","$data","password","_cache","$event","placeholder","type","onKeyup","_withKeys","login","_component_el_button","onClick","default","_withCtx","_createTextVNode","_","data","writtenPass","bingWallPaperIndex","customWallPaperIndex","computed","mapGetters","imgUrl","this","userConfig","loginBkImg","bingWallPapers","url","length","backgroundImage","mounted","$store","dispatch","setInterval","methods","axios","post","authCode","then","res","status","cookies","$router","push","$message","success","error","catch","err","__exports__","render"],"sourceRoot":""}