(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/login/login"],{"1ba6":function(e,n,t){e.exports={red_theme:"#FF2C3C",orange_theme:"#f7971e",pink_theme:"#fa444d",gold_theme:"#e0a356",blue_theme:"#2f80ed",green_theme:"#2ec840"}},"31a7":function(e,n,t){"use strict";t.r(n);var i=t("a5ca"),o=t("ce3a");for(var r in o)["default"].indexOf(r)<0&&function(e){t.d(n,e,(function(){return o[e]}))}(r);t("45a5");var a=t("828b"),u=Object(a["a"])(o["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],void 0);n["default"]=u.exports},"45a5":function(e,n,t){"use strict";var i=t("1ba6"),o=t.n(i);o.a},a5ca:function(e,n,t){"use strict";t.d(n,"b",(function(){return o})),t.d(n,"c",(function(){return r})),t.d(n,"a",(function(){return i}));var i={uSticky:function(){return t.e("components/uview-ui/components/u-sticky/u-sticky").then(t.bind(null,"3420"))},uNavbar:function(){return t.e("components/uview-ui/components/u-navbar/u-navbar").then(t.bind(null,"6331"))},uField:function(){return t.e("components/uview-ui/components/u-field/u-field").then(t.bind(null,"d74b"))},uVerificationCode:function(){return t.e("components/uview-ui/components/u-verification-code/u-verification-code").then(t.bind(null,"98f4"))},uCheckbox:function(){return t.e("components/uview-ui/components/u-checkbox/u-checkbox").then(t.bind(null,"8007"))},uModal:function(){return t.e("components/uview-ui/components/u-modal/u-modal").then(t.bind(null,"e709"))},mploginPopup:function(){return t.e("components/mplogin-popup/mplogin-popup").then(t.bind(null,"2196"))}},o=function(){var e=this,n=e.$createElement,t=(e._self._c,e.$getImageUri("resource/image/shopapi/default/login_bg.png")),i=e.phoneLogin&&2==e.loginType?"获取验证码"==e.codeTips&&11!==e.account.length:null,o=e.phoneLogin?e.appConfig.login_way.length:null,r=e.phoneLogin?e.hasLoginWay(2)&&2==e.loginType:null,a=e.phoneLogin?e.hasLoginWay(1)&&1==e.loginType:null;e._isMounted||(e.e0=function(n){e.phoneLogin=!e.phoneLogin},e.e1=function(n){e.isAgree=!0,e.showModel=!1},e.e2=function(n){e.showModel=!1}),e.$mp.data=Object.assign({},{$root:{m0:t,g0:i,g1:o,m1:r,m2:a}})},r=[]},ce3a:function(e,n,t){"use strict";t.r(n);var i=t("f163"),o=t.n(i);for(var r in i)["default"].indexOf(r)<0&&function(e){t.d(n,e,(function(){return i[e]}))}(r);n["default"]=o.a},f163:function(e,n,t){"use strict";(function(e){var i=t("47a9");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=i(t("7eb4")),r=i(t("34cf")),a=i(t("ee10")),u=i(t("7ca3")),c=t("8f59"),s=t("49f8"),l=i(t("d361")),f=t("7398"),p=i(t("00b8")),g=t("30a2"),h=t("bb87");function d(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}function b(e){for(var n=1;n1?this.$Router.back(1,{success:function(){var e=(0,f.currentPage)(),n=e.onLoad,t=e.options;n&&n(t)}}):p.default.get(g.BACK_URL)?this.$Router.replace(p.default.get(g.BACK_URL)):this.$Router.replaceAll("/pages/index/index"),p.default.remove(g.BACK_URL)},changeLoginType:function(){this.loginType==m.ACCOUNT?this.loginType=m.SMS_CODE:this.loginType==m.SMS_CODE&&(this.loginType=m.ACCOUNT)},sendSMS:function(){var e=this;return(0,a.default)(o.default.mark((function n(){var t,i;return o.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(e.$refs.uCode.canGetCode){n.next=2;break}return n.abrupt("return");case 2:if(e.account){n.next=5;break}return e.$toast({title:"请输入手机号"}),n.abrupt("return");case 5:return n.prev=5,n.next=8,(0,s.apiCheckMobile)({mobile:e.account});case 8:if(t=n.sent,i=t.has,0!==i){n.next=12;break}return n.abrupt("return",e.$toast({title:"手机号未注册"}));case 12:(0,s.apiLoginCaptcha)({mobile:e.account}).then((function(n){e.$refs.uCode.start()})).catch((function(e){console.log(e)})),n.next=18;break;case 15:n.prev=15,n.t0=n["catch"](5),console.log(n.t0);case 18:case"end":return n.stop()}}),n,null,[[5,15]])})))()},codeChange:function(e){this.codeTips=e},ttLogin:function(){var n=this;return(0,a.default)(o.default.mark((function t(){var i,a,u,c,l,f,p;return o.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,(0,h.getCode)();case 2:return i=t.sent,t.next=5,e.getUserInfo();case 5:if(a=t.sent,u=(0,r.default)(a,2),u[0],c=u[1],c){t.next=12;break}return n.openSetting(),t.abrupt("return");case 12:l=c.userInfo,f=l.avatarUrl,p=l.nickName,e.showLoading({title:"登录中..."}),(0,s.apiToutiaoAuthLogin)({code:i,avatarUrl:f,nickName:p}).then((function(e){n.loginHandle(e)})).catch((function(n){console.log(n),e.hideLoading()}));case 15:case"end":return t.stop()}}),t)})))()},openSetting:function(){e.showModal({title:"温馨提示",content:"您已拒绝授权,是否前往设置打开个人信息授权?",confirmColor:this.themeColor,success:function(n){n.confirm&&e.openSetting()}})},handleSubmitInfo:function(e){var n=this;return(0,a.default)(o.default.mark((function t(){var i;return o.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return i=n.loginData,t.next=3,(0,s.apiUpdateUser)(e,i.token);case 3:t.sent,n.loginHandle(i);case 5:case"end":return t.stop()}}),t)})))()},closePopup:function(){this.showLoginPop=!1}}),computed:{isPhoneRegister:function(){var e=this.appConfig.register_way;return!!e&&e.some((function(e){return 1==e}))},isBindMobile:function(){var e=this.appConfig.coerce_mobile;return e},loginWay:function(){var e=this.appConfig.login_way;return!!e&&(this.loginType=e[0]||"",e)},hasLoginWay:function(){var e=this;return function(n){return e.loginWay&&e.loginWay.some((function(e){return e==n}))}},isMnpWxAuth:function(){var e=this.appConfig.mnp_wechat_auth;return e},isOaWxAuth:function(){var e=this.appConfig.h5_wechat_auth;return e},isAPPWxAuth:function(){var e=this.appConfig.app_wechat_auth;return e},isOaWxAutoLogin:function(){var e=this.appConfig.h5_auto_wechat_auth;return e},isToutiaoAuth:function(){var e=this.appConfig.toutiao_auth;return e},isDisabled:function(){return(11!=this.account.length||!this.password||1!=this.loginType)&&(11!=this.account.length||!this.code||2!=this.loginType)}},onLoad:function(){this.getPolicyAgreement(),this.mnpLogin=(0,f.trottle)(this.mnpLogin),this.appLogin=(0,f.trottle)(this.appLogin),this.getCodeUrl=(0,f.trottle)(this.getCodeUrl),this.ttLogin=(0,f.trottle)(this.ttLogin)},onUnload:function(){}};n.default=v}).call(this,t("df3c")["default"])},fbc1:function(e,n,t){"use strict";(function(e,n){var i=t("47a9");t("b46f");i(t("3240"));var o=i(t("31a7"));e.__webpack_require_UNI_MP_PLUGIN__=t,n(o.default)}).call(this,t("3223")["default"],t("df3c")["createPage"])}},[["fbc1","common/runtime","common/vendor"]]]);