1 line
5.7 KiB
JavaScript
1 line
5.7 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["unlock"],{"03fa":function(e,t,s){var i=s("3193"),r=s("2d82"),a="["+r+"]",n=RegExp("^"+a+a+"*"),c=RegExp(a+a+"*$"),o=function(e){return function(t){var s=String(i(t));return 1&e&&(s=s.replace(n,"")),2&e&&(s=s.replace(c,"")),s}};e.exports={start:o(1),end:o(2),trim:o(3)}},"2d82":function(e,t){e.exports="\t\n\v\f\r \u2028\u2029\ufeff"},"641b":function(e,t,s){"use strict";var i=s("8d2b"),r=s.n(i);r.a},"8d2b":function(e,t,s){},"94ec":function(e,t,s){"use strict";var i=s("91fe"),r=s("03fa").trim,a=s("b680");i({target:"String",proto:!0,forced:a("trim")},{trim:function(){return r(this)}})},b680:function(e,t,s){var i=s("f30e"),r=s("2d82"),a="
";e.exports=function(e){return i((function(){return!!r[e]()||a[e]()!=a||r[e].name!==e}))}},ca94:function(e,t,s){"use strict";s.r(t);var i=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"unlock",class:e.settings.is_dark_mode?"dark-theme-unlock":""},[s("icon",{staticClass:"logo",attrs:{name:"canary"}}),s("p",{staticClass:"md-title center"},[e._v(e._s(e.is_create?e.lang.subheader[0]:e.lang.subheader[1]))]),s("md-field",{staticClass:"input-box",class:e.messageClass},[s("label",[e._v(e._s(e.is_create?e.lang.pwd_label[0]:e.lang.pwd_label[1]))]),s("md-input",{attrs:{type:"password"},model:{value:e.pwd,callback:function(t){e.pwd=t},expression:"pwd"}}),s("span",{staticClass:"md-error"},[e._v(e._s(e.err_msg))])],1),e.is_create?s("md-field",{staticClass:"input-box",class:e.messageClass},[s("label",[e._v(e._s(e.lang.repeat_pwd))]),s("md-input",{attrs:{type:"password"},model:{value:e.repeat,callback:function(t){e.repeat=t},expression:"repeat"}}),s("span",{staticClass:"md-error"},[e._v(e._s(e.err_msg))])],1):e._e(),e.is_create?s("md-field",{staticClass:"input-box",class:e.drivceMessageClass},[s("label",[e._v(e._s(e.lang.drivce_label))]),s("md-input",{model:{value:e.drivce,callback:function(t){e.drivce=t},expression:"drivce"}}),s("span",{staticClass:"md-error"},[e._v(e._s(e.drivce_err_msg))])],1):e._e(),s("md-button",{staticClass:"md-raised md-primary center",on:{click:function(t){return e.judgePwd()}}},[e._v(e._s(e.lang.enter))]),e._m(0),s("p",{staticClass:"center tips tips-buttom"},[e._v(" 此密码本为长理专版,未开启同步密码将加密后存放本地,开启同步密码将加密后存放在您的长理网盘中,请放心使用 "),s("span",{staticClass:"qq-link",on:{click:function(t){return e.openQQ()}}},[e._v("点我加入用户群")])]),s("md-dialog-confirm",{attrs:{"md-active":e.show_dialog,"md-title":e.lang.dialog.title,"md-content":e.lang.dialog.content,"md-confirm-text":e.lang.dialog.confirm,"md-cancel-text":e.lang.dialog.cancel},on:{"update:mdActive":function(t){e.show_dialog=t},"update:md-active":function(t){e.show_dialog=t},"md-cancel":e.onCancel,"md-confirm":e.submit}}),s("md-snackbar",{attrs:{"md-position":"center","md-active":e.show_snackbar,"md-persistent":""},on:{"update:mdActive":function(t){e.show_snackbar=t},"update:md-active":function(t){e.show_snackbar=t}}},[s("span",[e._v(e._s(e.snakebar_msg))])])],1)},r=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("p",{staticClass:"center tips "},[e._v(" Tips1: 主密码可以是中文,怕忘了甚至可以是自己的名字,别让别人知道就好 "),s("br"),s("br"),e._v(" Tips2: 使用安卓客户端的同学不要长按输入框粘贴,会闪退,推荐使用chrome或者firefox添加到桌面使用 ")])}],a=(s("d780"),s("94ec"),s("b54b")),n=s("08c1"),c=s("c71e"),o=s("36f0"),l=s("bfd3"),d={name:"Unlock",data(){return{pwd:"",repeat:"",drivce:"",is_err:!1,is_drivce_err:!1,err_msg:"",drivce_err_msg:"",show_dialog:!1,is_create:!1,show_snackbar:!1,snakebar_msg:"",lang:""}},computed:Object(a["a"])({},Object(n["c"])(["row_data","settings","user_infos"]),{messageClass(){return{"md-invalid":this.is_err}},drivceMessageClass(){return{"md-invalid":this.is_drivce_err}}}),methods:Object(a["a"])({},Object(n["b"])(["setRowPwd","setSettings","setUserInfo"]),{init(){l["a"].call(this),this.initLanguage(),this.is_create=!this.row_data&&!this.user_infos.drivce},initLanguage(){this.settings.is_chinese?this.lang=Object(o["a"])().unlock.CHS:this.lang=Object(o["a"])().unlock.EN,console.log("语言配置完成")},judgePwd(){if(0==this.pwd.trim().length)return this.is_err=!0,this.err_msg=this.lang.empty_pwd_error,void console.log("密码为空拦截");if(this.is_create){if(0==this.drivce.trim().length)return this.is_drivce_err=!0,this.drivce_err_msg=this.lang.drivce_error,void console.log("设备名为空拦截");this.pwd==this.repeat?this.show_dialog=!0:(this.is_err=!0,this.err_msg=this.lang.match_pwd_error,console.log("密码两次输入不一致拦截"))}else{try{Object(c["a"])(this.pwd,this.row_data)}catch(e){return this.is_err=!0,this.err_msg=this.lang.wrong_pwd_error,void console.log("密码输入错误拦截")}this.submit()}},onCancel(){console.log("用户点击取消")},submit(){var e=Object(c["d"])(this.pwd),t={main_code:e,create_time:(new Date).getTime()},s=this.user_infos;s.drivce=this.drivce,this.setUserInfo([s,this]),this.setRowPwd([t,this]),console.log("主密码设置完成,返回Home"),this.$router.replace("/")},openQQ(){window.open("https://jq.qq.com/?_wv=1027&k=KIKWmqys")}}),created(){this.lang=Object(o["a"])().unlock.CHS,console.log("临时语言系统加载完成"),this.init()},mounted(){this.$route.params.msg&&(this.snakebar_msg=this.$route.params.msg,this.show_snackbar=!0)},watch:{pwd:function(){this.is_err=!1,this.err_msg=""},repeat:function(){this.is_err=!1,this.err_msg=""},drivce:function(){this.is_drivce_err=!1,this.drivce_err_msg=""}},beforeDestroy(){},components:{}},_=d,m=(s("641b"),s("623f")),u=Object(m["a"])(_,i,r,!1,null,"788f1817",null);t["default"]=u.exports}}]); |