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