(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/user/login/login"],{"164e":function(n,e,t){"use strict";t.r(e);var o=t("519f"),u=t("82a3");for(var r in u)"default"!==r&&function(n){t.d(e,n,(function(){return u[n]}))}(r);t("40df");var i,c=t("f0c5"),a=Object(c["a"])(u["default"],o["b"],o["c"],!1,null,"78896221",null,!1,o["a"],i);e["default"]=a.exports},"40df":function(n,e,t){"use strict";var o=t("631d"),u=t.n(o);u.a},"519f":function(n,e,t){"use strict";t.d(e,"b",(function(){return u})),t.d(e,"c",(function(){return r})),t.d(e,"a",(function(){return o}));var o={uAvatar:function(){return t.e("uni_modules/vk-uview-ui/components/u-avatar/u-avatar").then(t.bind(null,"2143"))},uForm:function(){return t.e("uni_modules/vk-uview-ui/components/u-form/u-form").then(t.bind(null,"ce96"))},uFormItem:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/vk-uview-ui/components/u-form-item/u-form-item")]).then(t.bind(null,"23cb"))},uInput:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/vk-uview-ui/components/u-input/u-input")]).then(t.bind(null,"6943"))},uGap:function(){return t.e("uni_modules/vk-uview-ui/components/u-gap/u-gap").then(t.bind(null,"dc7f"))},uButton:function(){return t.e("uni_modules/vk-uview-ui/components/u-button/u-button").then(t.bind(null,"ce9e"))},uLine:function(){return t.e("uni_modules/vk-uview-ui/components/u-line/u-line").then(t.bind(null,"a2cb"))},uIcon:function(){return t.e("uni_modules/vk-uview-ui/components/u-icon/u-icon").then(t.bind(null,"ba35"))},uModal:function(){return t.e("uni_modules/vk-uview-ui/components/u-modal/u-modal").then(t.bind(null,"f813"))}},u=function(){var n=this,e=n.$createElement;n._self._c},r=[]},"631d":function(n,e,t){},"81ce":function(n,e,t){"use strict";(function(n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o,u=r(t("a34a"));function r(n){return n&&n.__esModule?n:{default:n}}function i(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,o)}return t}function c(n){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};o=this,o.options=n,o.init(n)},onReady:function(){this.$refs.uForm.setRules(this.rules)},onShareAppMessage:function(n){},methods:{getPhoneNumber:function(e){var t=e.detail||{},o=this;n.login({success:function(e){e.code?n.api.base.apiwxlogin({code:e.code,phone_code:t.code,iv:t.iv,encrypted_data:t.encryptedData}).then((function(e){n.setStorageSync("MD_token",e.token),n.setStorageSync("MD_userInfo",e),n.setStorageSync("MD_phone",e.phone),n.$msg("登录成功~"),o.getUserInfo()})).catch((function(n){console.log(n)})):console.log("登录失败!"+e.errMsg)}})},init:function(){var e=arguments,t=this;return l(u.default.mark((function o(){var r;return u.default.wrap((function(o){while(1)switch(o.prev=o.next){case 0:e.length>0&&void 0!==e[0]?e[0]:{},r=n.getStorageSync("MD_phone"),t.form1.username=r;case 3:case"end":return o.stop()}}),o)})))()},loginHandle:function(){var e=this,t=this;this.$refs.uForm.validate((function(o){o?n.api.base.apilogin({phone:e.form1.username,password:e.form1.password}).then((function(e){n.setStorageSync("MD_userInfo",e),n.setStorageSync("MD_phone",e.phone),n.setStorageSync("MD_token",e.token),n.$msg("登录成功~"),t.getUserInfo()})):console.log("验证失败")}))},getUserInfo:function(){n.api.base.apiuserinfo().then((function(e){n.reLaunch({url:"/pages/index/index"}),n.setStorageSync("MD_userInfo2",e)})),n.api.base.apidicttree().then((function(e){var t=e||{},o={};for(var u in t){var r=t[u].map((function(n){return c(c({},n),{},{key:n.dict_label,val:n.dict_value})}));o[u]=r}n.setStorageSync("MD_dict",o)}))},loginByWeixin:function(){}},watch:{},computed:{}};e.default=f}).call(this,t("543d")["default"])},"82a3":function(n,e,t){"use strict";t.r(e);var o=t("81ce"),u=t.n(o);for(var r in o)"default"!==r&&function(n){t.d(e,n,(function(){return o[n]}))}(r);e["default"]=u.a},f1c3:function(n,e,t){"use strict";(function(n){t("3690");o(t("66fd"));var e=o(t("164e"));function o(n){return n&&n.__esModule?n:{default:n}}wx.__webpack_require_UNI_MP_PLUGIN__=t,n(e.default)}).call(this,t("543d")["createPage"])}},[["f1c3","common/runtime","common/vendor"]]]);