(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/login/login"],{"0111":function(e,n,t){"use strict";t.r(n);var a=t("0713"),o=t("a99d");for(var u in o)["default"].indexOf(u)<0&&function(e){t.d(n,e,(function(){return o[e]}))}(u);t("e0a5");var r=t("828b"),i=Object(r["a"])(o["default"],a["b"],a["c"],!1,null,"7895e878",null,!1,a["a"],void 0);n["default"]=i.exports},"0713":function(e,n,t){"use strict";t.d(n,"b",(function(){return o})),t.d(n,"c",(function(){return u})),t.d(n,"a",(function(){return a}));var a={uNavbar:function(){return Promise.all([t.e("common/vendor"),t.e("uview-ui/components/u-navbar/u-navbar")]).then(t.bind(null,"46db"))},"u-Input":function(){return Promise.all([t.e("common/vendor"),t.e("uview-ui/components/u--input/u--input")]).then(t.bind(null,"609e"))},uCheckboxGroup:function(){return Promise.all([t.e("common/vendor"),t.e("uview-ui/components/u-checkbox-group/u-checkbox-group")]).then(t.bind(null,"63b3"))},uCheckbox:function(){return Promise.all([t.e("common/vendor"),t.e("uview-ui/components/u-checkbox/u-checkbox")]).then(t.bind(null,"b2c0"))},uButton:function(){return Promise.all([t.e("common/vendor"),t.e("uview-ui/components/u-button/u-button")]).then(t.bind(null,"82ae"))},uCodeInput:function(){return Promise.all([t.e("common/vendor"),t.e("uview-ui/components/u-code-input/u-code-input")]).then(t.bind(null,"8208"))}},o=function(){var e=this.$createElement;this._self._c},u=[]},"0772":function(e,n,t){"use strict";(function(e,n){var a=t("47a9");t("9c5b");a(t("3240"));var o=a(t("0111"));e.__webpack_require_UNI_MP_PLUGIN__=t,n(o.default)}).call(this,t("3223")["default"],t("df3c")["createPage"])},5941:function(e,n,t){"use strict";(function(e){var a=t("47a9");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=a(t("7eb4")),u=a(t("ee10")),r={data:function(){return{code:"",openId:"",isShow:!0,isNew:!1,isShowCaptcha:!1,phone:"",checked:[],disabled:!0,captcha:"",time:60,timer:null,isPhoneLogin:!1}},methods:{goRouter:function(){e.switchTab({url:"/pages/home/index"})},getPhoneNumber:function(n){var t=this;return(0,u.default)(o.default.mark((function a(){var u;return o.default.wrap((function(a){while(1)switch(a.prev=a.next){case 0:if("getPhoneNumber:ok"!=n.detail.errMsg){a.next=7;break}return a.next=3,t.$api.login.getTel({code:n.detail.code});case 3:u=a.sent,0==u.status?(e.setStorageSync("token",u.data.token),e.setStorageSync("telNum",u.data.telNum),t.isPhoneLogin=!1,e.setStorageSync("phoneLogin",t.isPhoneLogin),u.data.isNew?e.reLaunch({url:"/pages/realName/realName"}):e.reLaunch({url:"/pages/home/index"})):t.$common.msgToast(u.msg),a.next=8;break;case 7:t.$common.msgToast("请不要拒绝哟~重新点击登录");case 8:case"end":return a.stop()}}),a)})))()},getOpenId:function(){var n=this;return(0,u.default)(o.default.mark((function t(){return o.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.login({provider:"weixin",success:function(){var t=(0,u.default)(o.default.mark((function t(a){var u;return o.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return console.log("res.code",a.code),n.code=a.code,t.next=4,n.$api.login.login({code:a.code});case 4:u=t.sent,0==u.status?(u.data.accountInfo.isNew||!e.getStorageSync("telNum")?n.isShow=!0:e.reLaunch({url:"/pages/home/index"}),e.setStorageSync("token",u.data.token)):n.$common.msgToast(u.msg);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()});case 1:case"end":return t.stop()}}),t)})))()},handleChange:function(){var e=this;this.$nextTick((function(){11===e.phone.length&&e.checked.length>0?e.disabled=!1:e.disabled=!0}))},agreementHandle:function(n){e.navigateTo({url:"/pages/realName/agreement?type="+n})},getCaptcha:function(){var e=this;return(0,u.default)(o.default.mark((function n(){var t;return o.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(e.disabled){n.next=5;break}return n.next=3,e.$api.login.getTelCaptcha({Telnum:e.phone});case 3:t=n.sent,0===t.status?(e.$common.msgToast("验证码已发送"),e.isShowCaptcha=!0,e.timer=setInterval((function(){e.time>0?e.time--:(clearInterval(e.timer),e.time=60,e.timer=null)}),1e3)):e.$common.msgToast("验证码发送失败,请稍后再试");case 5:case"end":return n.stop()}}),n)})))()},resendCaptcha:function(){null===this.timer&&this.getCaptcha()},handleFinish:function(n){var t=this;return(0,u.default)(o.default.mark((function a(){var u;return o.default.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,t.$api.login.checkTelCaptcha({telnum:t.phone,code:n});case 2:u=a.sent,0===u.status?(t.$common.msgToast("请稍等"),e.setStorageSync("token",u.data.token),e.setStorageSync("telNum",t.phone),u.data.isNew?(t.isPhoneLogin=!0,e.setStorageSync("phoneLogin",t.isPhoneLogin),e.reLaunch({url:"/pages/realName/realName"})):e.reLaunch({url:"/pages/home/index"})):t.$common.msgToast(u.msg);case 4:case"end":return a.stop()}}),a)})))()},back:function(){this.isShowCaptcha=!1,this.timer&&(clearInterval(this.timer),this.time=60,this.timer=null)}},onLoad:function(){}};n.default=r}).call(this,t("df3c")["default"])},a99d:function(e,n,t){"use strict";t.r(n);var a=t("5941"),o=t.n(a);for(var u in a)["default"].indexOf(u)<0&&function(e){t.d(n,e,(function(){return a[e]}))}(u);n["default"]=o.a},c103:function(e,n,t){},e0a5:function(e,n,t){"use strict";var a=t("c103"),o=t.n(a);o.a}},[["0772","common/runtime","common/vendor"]]]);