(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["unlock"],{"3d9a":function(e,s,t){"use strict";t("fccd")},ca94:function(e,s,t){"use strict";t.r(s);var i=function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("div",{staticClass:"unlock",class:e.settings.is_dark_mode?"dark-theme-unlock":""},[t("icon",{staticClass:"logo",attrs:{name:"canary"}}),t("p",{staticClass:"md-title center"},[e._v(e._s(e.is_create?e.lang.subheader[0]:e.lang.subheader[1]))]),t("md-field",{staticClass:"input-box",class:e.messageClass},[t("label",[e._v(e._s(e.is_create?e.lang.pwd_label[0]:e.lang.pwd_label[1]))]),e.is_create?t("md-input",{attrs:{type:"password"},model:{value:e.pwd,callback:function(s){e.pwd=s},expression:"pwd"}}):t("md-input",{attrs:{type:"password"},on:{keyup:function(s){return!s.type.indexOf("key")&&e._k(s.keyCode,"enter",13,s.key,"Enter")?null:e.judgePwd(s)}},model:{value:e.pwd,callback:function(s){e.pwd=s},expression:"pwd"}}),t("span",{staticClass:"md-error"},[e._v(e._s(e.err_msg))])],1),e.is_create?t("md-field",{staticClass:"input-box",class:e.messageClass},[t("label",[e._v(e._s(e.lang.repeat_pwd))]),t("md-input",{attrs:{type:"password"},model:{value:e.repeat,callback:function(s){e.repeat=s},expression:"repeat"}}),t("span",{staticClass:"md-error"},[e._v(e._s(e.err_msg))])],1):e._e(),e.is_create?t("md-field",{staticClass:"input-box",class:e.drivceMessageClass},[t("label",[e._v(e._s(e.lang.drivce_label))]),t("md-input",{model:{value:e.drivce,callback:function(s){e.drivce=s},expression:"drivce"}}),t("span",{staticClass:"md-error"},[e._v(e._s(e.drivce_err_msg))])],1):e._e(),t("md-button",{staticClass:"md-raised md-primary center",on:{click:function(s){return e.judgePwd()}}},[e._v(e._s(e.lang.enter))]),e.is_create?t("p",{staticClass:"center tips "},[e._v(" Tips1: 主密码可以是中文，怕忘了甚至可以是自己的名字，别让别人知道就好 "),t("br"),t("br"),e._v(" Tips2: 使用安卓客户端的同学不要长按输入框粘贴，会闪退，推荐使用chrome或者firefox添加到桌面使用 ")]):e._e(),t("p",{staticClass:"center tips tips-buttom"},[e._v(" 此密码本为长理专版，未开启同步密码将加密后存放本地，开启同步密码将加密后存放在您的长理网盘中，请放心使用 "),t("span",{staticClass:"qq-link",on:{click:function(s){return e.openQQ()}}},[e._v("点我加入用户群")])]),t("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(s){e.show_dialog=s},"update:md-active":function(s){e.show_dialog=s},"md-cancel":e.onCancel,"md-confirm":e.submit}}),t("md-snackbar",{attrs:{"md-position":"center","md-active":e.show_snackbar,"md-persistent":""},on:{"update:mdActive":function(s){e.show_snackbar=s},"update:md-active":function(s){e.show_snackbar=s}}},[t("span",[e._v(e._s(e.snakebar_msg))])])],1)},a=[],r=(t("9b42"),t("cf6b")),n=t("c71e"),c=t("36f0"),o=t("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(r["c"])(["row_data","settings","user_infos"]),messageClass(){return{"md-invalid":this.is_err}},drivceMessageClass(){return{"md-invalid":this.is_drivce_err}}},methods:{...Object(r["b"])(["setRowPwd","setSettings","setUserInfo"]),init(){o["a"].call(this),this.initLanguage(),this.is_create=!this.row_data&&!this.user_infos.drivce},initLanguage(){this.settings.is_chinese?this.lang=Object(c["a"])().unlock.CHS:this.lang=Object(c["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{let s;try{s=Object(n["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(){let e=Object(n["d"])(this.pwd),s={main_code:e,create_time:(new Date).getTime()},t=this.user_infos;t.drivce=this.drivce,this.setUserInfo([t,this]),this.setRowPwd([s,this]),console.log("主密码设置完成，返回Home"),this.$router.replace("/")},openQQ(){window.open("https://jq.qq.com/?_wv=1027&k=KIKWmqys")}},created(){this.lang=Object(c["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:{}},l=d,_=(t("3d9a"),t("5d22")),m=Object(_["a"])(l,i,a,!1,null,"7da8472a",null);s["default"]=m.exports},fccd:function(e,s,t){}}]);