(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-login-login"],{"00c0":function(t,e,n){"use strict";n.r(e);var i=n("43aa"),a=n("9105");for(var o in a)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(o);n("a168");var s=n("f0c5"),c=Object(s["a"])(a["default"],i["b"],i["c"],!1,null,"337940d1",null,!1,i["a"],void 0);e["default"]=c.exports},"2f50":function(t,e,n){var i=n("dcc2");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var a=n("4f06").default;a("3f774e9d",i,!0,{sourceMap:!1,shadowMode:!1})},"379b":function(t,e){function n(t,e){var n=(65535&t)+(65535&e),i=(t>>16)+(e>>16)+(n>>16);return i<<16|65535&n}function i(t,e,i,a,o,s){return n(function(t,e){return t<>>32-e}(n(n(e,t),n(a,s)),o),i)}function a(t,e,n,a,o,s,c){return i(e&n|~e&a,t,e,o,s,c)}function o(t,e,n,a,o,s,c){return i(e&a|n&~a,t,e,o,s,c)}function s(t,e,n,a,o,s,c){return i(e^n^a,t,e,o,s,c)}function c(t,e,n,a,o,s,c){return i(n^(e|~a),t,e,o,s,c)}function r(t){for(var e=1732584193,i=-271733879,r=-1732584194,u=271733878,l=0;l>2]>>n%4*8+4&15)+"0123456789abcdef".charAt(t[n>>2]>>n%4*8&15);return e}function l(t){for(var e=1+(t.length+8>>6),n=new Array(16*e),i=0;i<16*e;i++)n[i]=0;for(i=0;i>2]|=(255&t.charCodeAt(i))<>2]|=128<0&&n.indexOf("M")>0&&n!==t.username&&uni.showModal({content:"是否自动填充会员号",cancelText:"否",confirmText:"是",success:function(e){e.confirm&&(t.username=n)}})}})},watch:{username:function(t){this.username=this.username.toUpperCase(),this.OnBtnChange()},password:function(t){this.OnBtnChange()},imgcode:function(t){this.OnBtnChange()},phone:function(t){this.OnBtnChange()},checknum:function(t){this.OnBtnChange()}}},(0,a.default)(r,"onShow",(function(){var t=this;this.refreshCaptcha(),uni.getClipboardData({success:function(e){var n=e.data.replace(/(^\s*)|(\s*$)/g,"").toUpperCase();17==n.length&&0==n.indexOf("99")&&n.indexOf("D")>0&&n.indexOf("M")>0&&n!==t.username&&uni.showModal({content:"是否自动填充会员号",cancelText:"否",confirmText:"是",success:function(e){e.confirm&&(t.username=n)}})}})})),(0,a.default)(r,"onUnload",(function(){this.closeSQL()})),(0,a.default)(r,"computed",(0,c.default)({},(0,u.mapState)(["userLoginId"]))),(0,a.default)(r,"methods",(0,c.default)((0,c.default)({},(0,u.mapMutations)(["setUserInfo"])),{},{nav:function(t){uni.navigateTo({url:t})},refreshCaptcha:function(){this.imgcodesrc=this.$base.baseUrl+"/captcha.jpg?t="+(new Date).getTime()},changeStatus:function(){uni.hideKeyboard(),this.initInput(),this.username=this.defaultid,this.status=!this.status,this.refreshCaptcha()},initInput:function(){this.username="",this.password="",this.phone="",this.checknum="",this.imgcode=""},OnBtnChange:function(){this.username&&this.password&&this.imgcode||this.phone&&this.checknum?this.disabled=!1:this.disabled=!0},getCheckNum:function(){var t=this;return(0,s.default)((0,o.default)().mark((function e(){var n,i;return(0,o.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(uni.hideKeyboard(),!(t.codetime>0)){e.next=3;break}return e.abrupt("return");case 3:if(t.phone){e.next=5;break}return e.abrupt("return",uni.showToast({title:"请输入手机号",icon:"none"}));case 5:if(t.$base.phoneRegular.test(t.phone)){e.next=7;break}return e.abrupt("return",uni.showToast({title:"请输入正确的手机号码",icon:"none"}));case 7:return e.next=9,t.$http.get("/sendMsg",{phone:t.phone,type:"0"});case 9:if(n=e.sent,200==n.code){e.next=14;break}return e.abrupt("return",uni.showToast({title:n.data.msg,icon:"none"}));case 14:uni.showToast({title:"发送成功",icon:"none"});case 15:t.codetime=60,i=setInterval((function(){t.codetime--,t.codetime<1&&(clearInterval(i),t.codetime=0)}),1e3);case 17:case"end":return e.stop()}}),e)})))()},getCheckNum1:function(){var t=this;return(0,s.default)((0,o.default)().mark((function e(){var n,i;return(0,o.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(uni.hideKeyboard(),!(t.codetime>0)){e.next=3;break}return e.abrupt("return");case 3:if(t.phone){e.next=5;break}return e.abrupt("return",uni.showToast({title:"请输入手机号",icon:"none"}));case 5:if(t.$base.phoneRegular.test(t.phone)){e.next=7;break}return e.abrupt("return",uni.showToast({title:"请输入正确的手机号码",icon:"none"}));case 7:return e.next=9,t.$http.get("/sendMsg",{phone:t.phone,type:"0"});case 9:if(n=e.sent,200==n.code){e.next=14;break}return e.abrupt("return",uni.showToast({title:n.data.msg,icon:"none"}));case 14:uni.showToast({title:"发送成功",icon:"none"});case 15:t.codetime=60,i=setInterval((function(){t.codetime--,t.codetime<1&&(clearInterval(i),t.codetime=0)}),1e3);case 17:case"end":return e.stop()}}),e)})))()},submit:function(){if(uni.hideKeyboard(),this.status){if(!this.$base.phoneRegular.test(this.phone))return uni.showToast({title:"请输入正确的手机号码",icon:"none"});this.$login({url:"/loginByPhone?phone="+this.phone+"&phoneMsg="+this.checknum}).then((function(t){}))}else{if("ADMIN"==this.username)return uni.showToast({title:"无效账号",icon:"none"});this.$login({url:"/login",data:{account:this.username,password:this.password,captcha:this.imgcode.toLowerCase()}}).then((function(t){l.default.init()}))}},onWxAppLogin:function(){var t=this;uni.login({provider:"weixin",scopes:"auth_user",onlyAuthorize:!0,success:function(e){t.codeRes(e)}})},codeRes:function(t){var e=this;return(0,s.default)((0,o.default)().mark((function n(){return(0,o.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:e.$login({url:"/wechat/login",data:{code:t.code}}).then((function(t){l.default.init()}));case 1:case"end":return n.stop()}}),n)})))()},openSQL:function(){var e=d.default.isOpen();t.log("数据库状态",e?"开启":"关闭"),d.default.openSqlite().then((function(t){})).catch((function(e){t.log(e)}))},closeSQL:function(){var t=d.default.isOpen();t&&d.default.closeSqlite().then((function(t){})).catch((function(t){}))},createTable:function(){var t=d.default.isOpen();if(t){this.openSQL();d.default.createTable("chat",'"id" INTEGER PRIMARY KEY AUTOINCREMENT,"username" text,"password" text,"defaultid" text,"time" text').then((function(t){})).catch((function(t){}))}},insertTableData:function(t,e){var n=this,i=d.default.isOpen();if(i){var a=[{username:t,password:e,defaultid:t}];a.map((function(t){var e=n.formatDate((new Date).getTime()),i="'".concat(t.username,"','").concat(t.password,"','").concat(t.defaultid,"','").concat(e,"'");d.default.insertTableData("chat",i,"'username','password','defaultid','time'").then((function(t){n.selectTableData()})).catch((function(t){}))}))}},selectTableData:function(){var e=this,n=d.default.isOpen();t.log(n),n&&d.default.selectTableData("chat").then((function(n){t.log("contact表数据",n),e.listData=n,e.username=n[0].username,e.defaultid=n[0].defaultid,e.password=n[0].password})).catch((function(t){}))},updateTableData:function(){var e=this,n=d.default.isOpen();if(n){this.formatDate((new Date).getTime());var i="username ='".concat(this.username,"',password ='").concat(this.password,"',defaultid='").concat(this.username,"'");d.default.updateTableData("chat",i).then((function(n){t.log(n),e.showToast("保存成功"),e.selectTableData()})).catch((function(e){t.log(e)}))}},deleteTableData:function(){var t=this,e=d.default.isOpen();e&&d.default.deleteTableData("chat").then((function(e){t.selectTableData()})).catch((function(t){}))},showToast:function(t){uni.showToast({icon:"none",title:t,mask:!0})},formatDate:function(t){var e=new Date(t),n=e.getFullYear(),i=e.getMonth()+1<10?"0"+(e.getMonth()+1):e.getMonth()+1,a=e.getDate()<10?"0"+e.getDate():e.getDate(),o=e.getHours()<10?"0"+e.getHours():e.getHours(),s=e.getMinutes()<10?"0"+e.getMinutes():e.getMinutes(),c=e.getSeconds()<10?"0"+e.getSeconds():e.getSeconds();return n+"-"+i+"-"+a+" "+o+":"+s+":"+c}})),(0,a.default)(r,"onHide",(function(){})),(0,a.default)(r,"onUnload",(function(){})),(0,a.default)(r,"onPullDownRefresh",(function(){})),(0,a.default)(r,"onReachBottom",(function(){})),r);e.default=f}).call(this,n("5a52")["default"])},a168:function(t,e,n){"use strict";var i=n("2f50"),a=n.n(i);a.a},ad14:function(t,e,n){var i=n("24fb");e=i(!1),e.push([t.i,".uni-status-bar[data-v-0196a214]{display:block;width:100%;height:20px;height:0}",""]),t.exports=e},b00d:function(t,e,n){"use strict";n("7a82"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=uni.getSystemInfoSync().statusBarHeight+"px",a={name:"uni-status-bar",props:{bgcolor:{type:String,default:""}},data:function(){return{statusBarHeight:i}}};e.default=a},bed7:function(t,e,n){"use strict";n.r(e);var i=n("69f9"),a=n("4213");for(var o in a)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(o);n("59ba");var s=n("f0c5"),c=Object(s["a"])(a["default"],i["b"],i["c"],!1,null,"0196a214",null,!1,i["a"],void 0);e["default"]=c.exports},dcc2:function(t,e,n){var i=n("24fb");e=i(!1),e.push([t.i,'.shu1[data-v-337940d1]{display:flex;flex-direction:column;justify-content:space-between;align-items:center}.shili_btn[data-v-337940d1]{width:100%;height:%?90?%;border-top:%?2?% solid #f2f2f2}.shili_btn>uni-view[data-v-337940d1]{width:50%;height:100%;background-color:#fff;cursor:pointer}.shili_btn>uni-view[data-v-337940d1]:nth-child(2){color:#fff;background-color:#007bff}.shili>uni-text[data-v-337940d1]:nth-child(1){font-weight:700}.shili[data-v-337940d1]{padding:%?40?%;box-sizing:border-box}.heng[data-v-337940d1]{display:flex;justify-content:space-between;align-items:center}.heng1[data-v-337940d1]{display:flex;justify-content:center;align-items:center}\n\n/* 第三方登录Start */.third_party_login_box[data-v-337940d1]{position:fixed;bottom:%?100?%;left:0;right:0;height:%?170?%;padding:0 %?30?%}.third_party_login_box .third_party_title[data-v-337940d1]{display:flex;align-items:center}.third_party_login_box .third_party_title[data-v-337940d1]:before,\n.third_party_login_box .third_party_title[data-v-337940d1]:after{content:"";flex:1;height:%?2?%;background-color:#f5f5f5}.third_party_login_box .third_party_title uni-text[data-v-337940d1]{font-size:%?24?%;color:#999;flex-shrink:0;padding:0 %?20?%}.third_party_login_box .third_party_content[data-v-337940d1]{height:%?140?%;display:flex;justify-content:center;align-items:center}.third_party_login_box .third_party_content uni-image[data-v-337940d1]{margin:%?0?% %?20?%;width:%?80?%;height:%?80?%}\n\n/* 第三方登录End */.yanzhengmaView1[data-v-337940d1]{background:#fff;border-radius:%?10?%;width:%?150?%;padding:%?5?% 0}.yanzhengmaView2[data-v-337940d1]{background:#fff;border-radius:%?10?%;width:%?220?%;padding:%?5?% 0}',""]),t.exports=e},f4ae:function(t,e,n){var i=n("ad14");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var a=n("4f06").default;a("0c40bfe0",i,!0,{sourceMap:!1,shadowMode:!1})}}]);