(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/Login/Login"],{"009d":function(e,t,n){"use strict";n.r(t);var r=n("9773"),o=n.n(r);for(var i in r)"default"!==i&&function(e){n.d(t,e,(function(){return r[e]}))}(i);t["default"]=o.a},"0253":function(e,t,n){},"124b":function(e,t,n){"use strict";(function(e){n("eea4");r(n("66fd"));var t=r(n("8f80"));function r(e){return e&&e.__esModule?e:{default:e}}wx.__webpack_require_UNI_MP_PLUGIN__=n,e(t.default)}).call(this,n("543d")["createPage"])},"1dcd":function(e,t,n){"use strict";var r=n("24dd"),o=n.n(r);o.a},"24dd":function(e,t,n){},"83da":function(e,t,n){"use strict";var r;n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){return r}));var o=function(){var e=this,t=e.$createElement;e._self._c},i=[]},"8f80":function(e,t,n){"use strict";n.r(t);var r=n("83da"),o=n("009d");for(var i in o)"default"!==i&&function(e){n.d(t,e,(function(){return o[e]}))}(i);n("1dcd"),n("a413");var a,c=n("f0c5"),u=Object(c["a"])(o["default"],r["b"],r["c"],!1,null,"61df9bc8",null,!1,r["a"],a);t["default"]=u.exports},9773:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n("a34a")),o=n("26cb"),i=n("bcb6");function a(e){return e&&e.__esModule?e:{default:e}}function c(e,t,n,r,o,i,a){try{var c=e[i](a),u=c.value}catch(s){return void n(s)}c.done?t(u):Promise.resolve(u).then(r,o)}function u(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){c(i,r,o,a,u,"next",e)}function u(e){c(i,r,o,a,u,"throw",e)}a(void 0)}))}}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var d={data:function(){return{isAgree:!1}},methods:f(f({},(0,o.mapMutations)(["setUserInfo"])),{},{agreeChange:function(){this.isAgree=!this.isAgree},toUserArgeement:function(){e.navigateTo({url:"/pages/userAgreement/userAgreement"})},toPrivacyPolicy:function(){e.navigateTo({url:"/pages/privacyPolicy/privacyPolicy"})},valiAgree:function(){this.isAgree||e.showToast({title:"请先同意《服务协议》与《隐私政策》",duration:2e3,icon:"none"})},login:function(t){var n=this;return u(r.default.mark((function o(){var a,c,u,s;return r.default.wrap((function(r){while(1)switch(r.prev=r.next){case 0:if("getPhoneNumber:ok"===t.detail.errMsg){r.next=2;break}return r.abrupt("return");case 2:if(!t.detail.iv){r.next=12;break}return a={departmentId:1,code:t.detail.code},console.log(a),r.next=7,(0,i.getMobile)(a);case 7:c=r.sent,u=c.data,200==u.state?(s={phone:u.data.phoneNumber},e.setStorageSync("userInfo",JSON.stringify(s)),n.setUserInfo(s),e.showToast({title:"登录成功",icon:"none"}),setTimeout((function(){e.navigateBack()}),300)):(console.log(u),e.showToast({title:u.message,icon:"none"})),r.next=13;break;case 12:e.showToast({title:"授权失败",icon:"none"});case 13:case"end":return r.stop()}}),o)})))()},onAuthError:function(t){e.showToast({title:"您已拒绝授权~",icon:"none"})}})};t.default=d}).call(this,n("543d")["default"])},a413:function(e,t,n){"use strict";var r=n("0253"),o=n.n(r);o.a}},[["124b","common/runtime","common/vendor"]]]);