(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pageTwo/login/login"],{"336f":function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){}));var o=function(){var e=this.$createElement;this._self._c},i=[]},"4af0":function(e,t,n){},"553d":function(e,t,n){"use strict";var o=n("4af0"),i=n.n(o);i.a},"60c1":function(e,t,n){"use strict";(function(e,t){var o=n("47a9");n("6c4c");o(n("3240"));var i=o(n("e0c6"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(i.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},7342:function(e,t,n){"use strict";n.r(t);var o=n("e302"),i=n.n(o);for(var a in o)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(a);t["default"]=i.a},e0c6:function(e,t,n){"use strict";n.r(t);var o=n("336f"),i=n("7342");for(var a in i)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(a);n("553d");var s=n("828b"),c=Object(s["a"])(i["default"],o["b"],o["c"],!1,null,"aeec535c",null,!1,o["a"],void 0);t["default"]=c.exports},e302:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={data:function(){return{phone:"",code:"",password:"",disabled:!1,second:60,value:0,isCode:!0,loginCode:""}},onLoad:function(){this.login()},methods:{checkboxChange:function(e){this.value=e.detail.value.length?e.detail.value[0]:"0"},handleTelLogin:function(){var t=this,n=-1!==t.phone.indexOf("@");0!=t.value?n||/^1[3456789]\d{9}$/.test(t.phone)?!n||/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(t.phone)?!t.isCode||t.code?t.isCode||t.password?this.$model.getonlogin({data:t.phone,validate_data:t.isCode?t.code:t.password,validate_type:t.isCode?"code":"password"}).then((function(n){console.log("data",n.data),t.$tools.msg(n.msg),0==n.code&&(t.$tools.msg("登录成功"),e.setStorageSync("token",n.data.token),setTimeout((function(){e.reLaunch({url:"/pages/index/index"})}),2e3))})).catch((function(e){})):t.$tools.msg("请输入正确密码"):t.$tools.msg("请输入验证码"):t.$tools.msg("请输入正确的邮箱"):t.$tools.msg("请输入正确的手机号"):t.$tools.msg("请先确认勾选协议")},handleCode:function(){var e=this,t=-1!==e.phone.indexOf("@");t||/^1[3456789]\d{9}$/.test(e.phone)?!t||/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(e.phone)?e.$model.getSendCode({data:e.phone,type:"login"}).then((function(t){if(console.log(t),0==t.code){e.disabled=!0;var n=setInterval((function(){--e.second}),1e3);setTimeout((function(){clearInterval(n),e.disabled=!1,e.second=60}),6e4)}else e.$tools.msg(t.msg)})).catch((function(e){})):e.$tools.msg("请输入正确的邮箱"):e.$tools.msg("请输入正确的手机号")},login:function(){var t=this;e.login({success:function(e){e.code&&(e.errMsg="login:ok")&&(t.loginCode=e.code)}})},getPhoneNumber:function(t){var n=this;"getPhoneNumber:ok"==t.detail.errMsg&&this.$model.getRegisterPhone({code:n.loginCode,encryptedData:t.detail.encryptedData,iv:t.detail.iv}).then((function(t){0==t.code&&(n.value=1,e.setStorageSync("token",t.data.token),setTimeout((function(){e.reLaunch({url:"/pages/index/index"})}),1e3))}))},handleIsTel:function(){0!=this.value||this.$tools.msg("请先确认勾选协议")},handleToggle:function(){this.phone="",this.isCode=!this.isCode},handlePassword:function(t){e.navigateTo({url:"/pageTwo/login/forgetPassword?type="+t})},handlexieyi:function(){e.navigateTo({url:"/pageTwo/webview/webview?url=https://tc.pcxbc.com/kitchenscale_all/privacy_index.html"})},handleUserXieyi:function(){}}};t.default=n}).call(this,n("df3c")["default"])}},[["60c1","common/runtime","common/vendor"]]]);