(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["unlock"],{"3cdf":function(s,e,t){"use strict";t("aa0a")},aa0a:function(s,e,t){},ca94:function(s,e,t){"use strict";t.r(e);var i=function(){var s=this,e=s.$createElement,t=s._self._c||e;return t("div",{staticClass:"unlock",class:s.settings.is_dark_mode?"dark-theme-unlock":""},[t("icon",{staticClass:"logo",attrs:{name:"canary"}}),t("p",{staticClass:"md-title center"},[s._v(s._s(s.is_create?s.lang.subheader[0]:s.lang.subheader[1]))]),t("md-field",{staticClass:"input-box",class:s.messageClass},[t("label",[s._v(s._s(s.is_create?s.lang.pwd_label[0]:s.lang.pwd_label[1]))]),t("md-input",{attrs:{type:"password"},model:{value:s.pwd,callback:function(e){s.pwd=e},expression:"pwd"}}),t("span",{staticClass:"md-error"},[s._v(s._s(s.err_msg))])],1),s.is_create?t("md-field",{staticClass:"input-box",class:s.messageClass},[t("label",[s._v(s._s(s.lang.repeat_pwd))]),t("md-input",{attrs:{type:"password"},model:{value:s.repeat,callback:function(e){s.repeat=e},expression:"repeat"}}),t("span",{staticClass:"md-error"},[s._v(s._s(s.err_msg))])],1):s._e(),s.is_create?t("md-field",{staticClass:"input-box",class:s.drivceMessageClass},[t("label",[s._v(s._s(s.lang.drivce_label))]),t("md-input",{model:{value:s.drivce,callback:function(e){s.drivce=e},expression:"drivce"}}),t("span",{staticClass:"md-error"},[s._v(s._s(s.drivce_err_msg))])],1):s._e(),t("md-button",{staticClass:"md-raised md-primary center",on:{click:function(e){return s.judgePwd()}}},[s._v(s._s(s.lang.enter))]),s._m(0),t("p",{staticClass:"center tips tips-buttom"},[s._v(" 此密码本为长理专版，未开启同步密码将加密后存放本地，开启同步密码将加密后存放在您的长理网盘中，请放心使用 "),t("span",{staticClass:"qq-link",on:{click:function(e){return s.openQQ()}}},[s._v("点我加入用户群")])]),t("md-dialog-confirm",{attrs:{"md-active":s.show_dialog,"md-title":s.lang.dialog.title,"md-content":s.lang.dialog.content,"md-confirm-text":s.lang.dialog.confirm,"md-cancel-text":s.lang.dialog.cancel},on:{"update:mdActive":function(e){s.show_dialog=e},"update:md-active":function(e){s.show_dialog=e},"md-cancel":s.onCancel,"md-confirm":s.submit}}),t("md-snackbar",{attrs:{"md-position":"center","md-active":s.show_snackbar,"md-persistent":""},on:{"update:mdActive":function(e){s.show_snackbar=e},"update:md-active":function(e){s.show_snackbar=e}}},[t("span",[s._v(s._s(s.snakebar_msg))])])],1)},a=[function(){var s=this,e=s.$createElement,t=s._self._c||e;return t("p",{staticClass:"center tips "},[s._v(" Tips1: 主密码可以是中文，怕忘了甚至可以是自己的名字，别让别人知道就好 "),t("br"),t("br"),s._v(" Tips2: 使用安卓客户端的同学不要长按输入框粘贴，会闪退，推荐使用chrome或者firefox添加到桌面使用 ")])}],r=(t("9b42"),t("cf6b")),n=t("c71e"),c=t("36f0"),o=t("bfd3"),l={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 e;try{e=Object(n["a"])(this.pwd,this.row_data)}catch(s){return this.is_err=!0,this.err_msg=this.lang.wrong_pwd_error,void console.log("密码输入错误拦截")}this.submit()}},onCancel(){console.log("用户点击取消")},submit(){let s=Object(n["d"])(this.pwd),e={main_code:s,create_time:(new Date).getTime()},t=this.user_infos;t.drivce=this.drivce,this.setUserInfo([t,this]),this.setRowPwd([e,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:{}},d=l,_=(t("3cdf"),t("5d22")),m=Object(_["a"])(d,i,a,!1,null,"334be4a0",null);e["default"]=m.exports}}]);