(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/ucenter/login-withpwd"],{7448:function(e,n,t){"use strict";(function(e,n){var i=t("4ea4");t("baca"),t("a9ff");i(t("66fd"));var o=i(t("8d1a"));e.__webpack_require_UNI_MP_PLUGIN__=t,n(o.default)}).call(this,t("bc2e")["default"],t("543d")["createPage"])},"87cb":function(e,n,t){},8905:function(e,n,t){"use strict";t.d(n,"b",(function(){return o})),t.d(n,"c",(function(){return s})),t.d(n,"a",(function(){return i}));var i={uniNavBar:function(){return t.e("uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar").then(t.bind(null,"f033"))},uniForms:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/uni-forms/components/uni-forms/uni-forms")]).then(t.bind(null,"7a0e"))},uniFormsItem:function(){return t.e("uni_modules/uni-forms/components/uni-forms-item/uni-forms-item").then(t.bind(null,"5b3b"))},uniEasyinput:function(){return t.e("uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput").then(t.bind(null,"2920"))},uniIdPagesAgreements:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/uni-id-pages/components/uni-id-pages-agreements/uni-id-pages-agreements")]).then(t.bind(null,"202c"))},uNotify:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/uview-ui/components/u-notify/u-notify")]).then(t.bind(null,"26f7"))},uToast:function(){return t.e("uni_modules/uview-ui/components/u-toast/u-toast").then(t.bind(null,"c097"))}},o=function(){var e=this,n=e.$createElement;e._self._c;e._isMounted||(e.e0=function(n){return e.$store.state.utils.back()},e.e1=function(n){e.focusUsername=!1},e.e2=function(n){e.focusPassword=!1})},s=[]},"8d1a":function(e,n,t){"use strict";t.r(n);var i=t("8905"),o=t("b778");for(var s in o)["default"].indexOf(s)<0&&function(e){t.d(n,e,(function(){return o[e]}))}(s);t("e823");var r=t("f0c5"),u=Object(r["a"])(o["default"],i["b"],i["c"],!1,null,"b3c81034",null,!1,i["a"],void 0);n["default"]=u.exports},"9ca5":function(e,n,t){"use strict";(function(e){var i=t("4ea4");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=i(t("9523")),s=t("26cb");function r(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}var u={data:function(){return{password:"",username:"",focusUsername:!1,focusPassword:!1,needAgreements:!0,logo:"/static/image/logo.png",isDebug:!1,isSync:!1}},onShow:function(){this.isDebug=e.getStorageSync("isDebug")},computed:function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?r(Object(t),!0).forEach((function(n){(0,o.default)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):r(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}({},(0,s.mapState)({utils:function(e){return e.utils}})),methods:{pwdLogin:function(){if(!this.username.length)return this.focusUsername=!0,this.showToast("请输入邮箱");if(!this.password.length)return this.focusPassword=!0,this.showToast("请输入密码");if(this.needAgreements&&this.$refs.agreements&&!this.$refs.agreements.getAgree())return this.$refs.agreements.popup(this.pwdLogin);var n={password:this.password,email:this.username},t=this;e.showLoading({title:"请求中..."}),e.request({url:getApp().globalData.server+"/api/auth",method:"POST",data:JSON.stringify(n),success:function(n){if(e.hideLoading(),n=n.data,"000000"===n.status)return t.$store.dispatch("loginWithpwd",n),setTimeout((function(){e.switchTab({url:"/pages/chat/session"})}),1e3),t.showNotify("登录成功!","success");var i=n.msg;return"400001"===n.status?i="邮箱或密码错误":"400002"===n.status&&(i="登录频繁!请稍后重试!"),i||(i="请求出错!"),t.showNotify(i,"error")},fail:function(n){return e.hideLoading(),t.showNotify("请求出错!","error")}})},setSync:function(n){this.isSync=!this.isSync,e.setStorageSync("sync_session",this.isSync)},apiLogin:function(){e.navigateTo({url:"/pages/ucenter/login-withapi"})},tokenLogin:function(){e.navigateTo({url:"/pages/ucenter/login-withtoken"})},showNotify:function(e,n){this.$refs.uNotify.show({type:n,message:e,duration:3e3,safeAreaInsetTop:!0})},showToast:function(e){this.$refs.uToast.show({message:e,type:"error",duration:2e3,position:"bottom"})}}};n.default=u}).call(this,t("543d")["default"])},b778:function(e,n,t){"use strict";t.r(n);var i=t("9ca5"),o=t.n(i);for(var s in i)["default"].indexOf(s)<0&&function(e){t.d(n,e,(function(){return i[e]}))}(s);n["default"]=o.a},e823:function(e,n,t){"use strict";var i=t("87cb"),o=t.n(i);o.a}},[["7448","common/runtime","common/vendor"]]]);