(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-630fd981"],{"40b4":function(e,t,o){"use strict"},"5ee3":function(e,t,o){"use strict";o.d(t,"b",(function(){return n})),o.d(t,"a",(function(){return r}));var s=o("b775");function n(){return Object(s["a"])({url:"/open/getNewestAppInfo",method:"get"})}function r(){return Object(s["a"])({url:"/app/getNewestAppInfo",method:"get"})}},"96b1":function(e,t,o){"use strict";o("f8e2")},dd7b:function(e,t,o){"use strict";o.r(t);var s=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{attrs:{id:"login"}},[o("van-nav-bar",{attrs:{fixed:"",title:"登录"}}),o("van-form",{on:{submit:e.onSubmit}},[o("van-cell-group",{attrs:{inset:""}},[o("van-field",{attrs:{rules:[{required:!0,message:"请填写用户名"}],label:"用户名",name:"用户名",placeholder:"用户名"},model:{value:e.loginForm.userName,callback:function(t){e.$set(e.loginForm,"userName",t)},expression:"loginForm.userName"}}),o("van-field",{attrs:{rules:[{required:!0,message:"请填写密码"}],label:"密码",name:"密码",placeholder:"密码",type:"password"},model:{value:e.loginForm.password,callback:function(t){e.$set(e.loginForm,"password",t)},expression:"loginForm.password"}}),o("van-field",{attrs:{rules:[{required:!0,message:"请填写验证码"}],label:"验证码",name:"验证码",placeholder:"验证码"},scopedSlots:e._u([{key:"button",fn:function(){return[o("img",{staticClass:"login-code-img",attrs:{src:e.codeUrl,alt:""},on:{click:e.getCode}})]},proxy:!0}]),model:{value:e.loginForm.code,callback:function(t){e.$set(e.loginForm,"code",t)},expression:"loginForm.code"}}),o("van-cell",{attrs:{center:"",title:"记住密码"},scopedSlots:e._u([{key:"right-icon",fn:function(){return[o("van-switch",{attrs:{size:"24"},model:{value:e.loginForm.rememberMe,callback:function(t){e.$set(e.loginForm,"rememberMe",t)},expression:"loginForm.rememberMe"}})]},proxy:!0}])})],1),o("van-row",{staticClass:"button"},[o("van-button",{attrs:{block:"","native-type":"submit",round:"",type:"info"}},[e._v("提交")])],1)],1),o("van-dialog",{attrs:{title:"正在下载","confirm-button-text":"后台下载"},model:{value:e.showProgress,callback:function(t){e.showProgress=t},expression:"showProgress"}},[o("van-row",{staticClass:"download",staticStyle:{padding:"1rem","text-align":"center"}},[e._v(" 下载进度"),o("span",{staticClass:"theme-blue",staticStyle:{padding:"0 0.2rem"}},[e._v(e._s(e.percentageNum))]),e._v("% ")])],1)],1)},n=[],r=o("7ded"),a=o("24e5"),i=o.n(a),l="MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKoR8mX0rGKLqzcWmOzbfj64K8ZIgOdH\nnzkXSOVOZbFu/TJhZ7rFAN+eaGkl3C4buccQd/EjEsj9ir7ijT7h96MCAwEAAQ==",u="MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEAqhHyZfSsYourNxaY\n7Nt+PrgrxkiA50efORdI5U5lsW79MmFnusUA355oaSXcLhu5xxB38SMSyP2KvuKN\nPuH3owIDAQABAkAfoiLyL+Z4lf4Myxk6xUDgLaWGximj20CUf+5BKKnlrK+Ed8gA\nkM0HqoTt2UZwA5E2MzS4EI2gjfQhz5X28uqxAiEA3wNFxfrCZlSZHb0gn2zDpWow\ncSxQAgiCstxGUoOqlW8CIQDDOerGKH5OmCJ4Z21v+F25WaHYPxCFMvwxpcw99Ecv\nDQIgIdhDTIqD2jfYjPTY8Jj3EDGPbH2HHuffvflECt3Ek60CIQCFRlCkHpi7hthh\nYhovyloRYsM+IS9h/0BzlEAuO0ktMQIgSPT3aFAgJYwKpqRYKlLDVcflZFCKY7u3\nUP8iWi1Qw0Y=";function c(e){var t=new i.a;return t.setPublicKey(l),t.encrypt(e)}function d(e){var t=new i.a;return t.setPrivateKey(u),t.decrypt(e)}var m=o("5ee3"),g=(o("40b4"),{name:"login",data:function(){return{codeUrl:"",loginForm:{userName:"",password:"",code:"",rememberMe:!1,uuid:""},percentageNum:0,showProgress:!1}},mounted:function(){this.getCode(),this.getCookie(),window.plus?this.plusReady():document.addEventListener("plusready",this.plusReady,!1)},methods:{plusReady:function(){var e=this;plus.runtime.getProperty(plus.runtime.appid,(function(t){Object(m["b"])().then((function(o){if(o.data.version!==t.version){var s=plus.downloader.createDownload(o.data.downloadUrl,{},(function(t,o){200===o?(console.log("下载更新成功:"+t.filename),e.installWgt(t.filename)):(console.log("下载更新失败!"),plus.nativeUI.toast("下载更新失败!")),plus.nativeUI.closeWaiting()}));s.start();var n=0;e.showProgress=!0,s.addEventListener("statechanged",(function(t,o){switch(t.state){case 1:plus.push.createMessage("正在下载···");break;case 2:plus.push.createMessage("已连接到服务器···");break;case 3:n=parseInt(parseFloat(t.downloadedSize)/parseFloat(t.totalSize)*100),e.percentageNum=n;break;case 4:e.showProgress=!1;break}}))}}))}))},installWgt:function(e){plus.nativeUI.showWaiting("安装更新"),plus.runtime.install(e,{},(function(){plus.nativeUI.closeWaiting(),console.log("安装更新成功!"),plus.nativeUI.alert("更新完成!",(function(){plus.runtime.restart()}))}),(function(e){plus.nativeUI.closeWaiting(),console.log("安装更新失败!["+e.code+"]:"+e.message),plus.nativeUI.toast("安装更新失败!")}))},onSubmit:function(){var e=this;this.loginForm.rememberMe?(this.setLocal("userName",this.loginForm.userName,{expires:30}),this.setLocal("password",c(this.loginForm.password),{expires:30}),this.setLocal("rememberMe",this.loginForm.rememberMe,{expires:30})):(this.removeLocal("userName"),this.removeLocal("password"),this.removeLocal("rememberMe")),this.$store.dispatch("Login",this.loginForm).then((function(){e.$router.push({path:"/homepage"})})).catch((function(){e.getCode()}))},getCookie:function(){var e=this.getLocal("userName"),t=this.getLocal("password")||"",o=this.getLocal("rememberMe")||!1;this.loginForm={userName:void 0===e?this.loginForm.userName:e,password:void 0===t?this.loginForm.password:d(t),rememberMe:void 0!==o&&o}},getCode:function(){var e=this;Object(r["a"])().then((function(t){e.codeUrl="data:image/gif;base64,"+t.img,e.loginForm.uuid=t.uuid}))}}}),p=g,f=(o("96b1"),o("2877")),h=Object(f["a"])(p,s,n,!1,null,"62c59fb5",null);t["default"]=h.exports},f8e2:function(e,t,o){}}]);