1 line
6.0 KiB
JavaScript
1 line
6.0 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["unlock"],{"0861":function(e,t,s){"use strict";var i=s("a09b"),r=s("9414").trim,n=s("1ba2");i({target:"String",proto:!0,forced:n("trim")},{trim:function(){return r(this)}})},"0e4b":function(e,t,s){},1609:function(e,t,s){var i=s("a09b"),r=s("273e");i({target:"String",proto:!0},{repeat:r})},"1ba2":function(e,t,s){var i=s("2bc8"),r=s("1fef"),n="
";e.exports=function(e){return i((function(){return!!r[e]()||n[e]()!=n||r[e].name!==e}))}},"273e":function(e,t,s){"use strict";var i=s("0296"),r=s("4340");e.exports="".repeat||function(e){var t=String(r(this)),s="",n=i(e);if(n<0||n==1/0)throw RangeError("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(t+=t))1&n&&(s+=t);return s}},5121:function(e,t,s){"use strict";s("0e4b")},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]))]),e.is_create?s("md-input",{attrs:{type:"password"},model:{value:e.pwd,callback:function(t){e.pwd=t},expression:"pwd"}}):s("md-input",{attrs:{type:"password"},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.judgePwd(t)}},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.is_create?s("p",{staticClass:"center tips "},[e._v(" Tips1: 主密码可以是中文,怕忘了甚至可以是自己的名字,别让别人知道就好 "),s("br"),s("br"),e._v(" Tips2: 使用安卓客户端的同学不要长按输入框粘贴,会闪退,推荐使用chrome或者firefox添加到桌面使用 ")]):e._e(),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=[],n=(s("0bd5"),s("1609"),s("9b42"),s("0861"),s("d211")),a=s("cf6b"),c=s("c71e"),o=s("36f0"),d=s("bfd3"),l={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(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(n["a"])({},Object(a["b"])(["setRowPwd","setSettings","setUserInfo"])),{},{init:function(){d["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(e){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 e=Object(c["d"])(this.pwd),t={main_code:e,create_time:(new Date).getTime()};if(this.is_create){var s=this.user_infos;s.drivce=this.drivce,this.setUserInfo([s,this])}this.setRowPwd([t,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:{}},_=l,u=(s("5121"),s("5d22")),m=Object(u["a"])(_,i,r,!1,null,"ad388aae",null);t["default"]=m.exports}}]); |