| 1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/user/login/login"],{"290c":function(e,n,t){"use strict";(function(e,n){var o=t("4ea4");t("2ab2");o(t("66fd"));var u=o(t("b6d9"));e.__webpack_require_UNI_MP_PLUGIN__=t,n(u.default)}).call(this,t("bc2e")["default"],t("543d")["createPage"])},"91c7":function(e,n,t){"use strict";t.r(n);var o=t("b0c6"),u=t.n(o);for(var r in o)["default"].indexOf(r)<0&&function(e){t.d(n,e,(function(){return o[e]}))}(r);n["default"]=u.a},a325:function(e,n,t){"use strict";t.d(n,"b",(function(){return u})),t.d(n,"c",(function(){return r})),t.d(n,"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,"c634"))},uForm:function(){return t.e("uni_modules/vk-uview-ui/components/u-form/u-form").then(t.bind(null,"e893"))},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,"a81d"))},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,"830c"))},uGap:function(){return t.e("uni_modules/vk-uview-ui/components/u-gap/u-gap").then(t.bind(null,"9db7"))},uButton:function(){return t.e("uni_modules/vk-uview-ui/components/u-button/u-button").then(t.bind(null,"51b1b"))},uLine:function(){return t.e("uni_modules/vk-uview-ui/components/u-line/u-line").then(t.bind(null,"4dda"))},uModal:function(){return t.e("uni_modules/vk-uview-ui/components/u-modal/u-modal").then(t.bind(null,"85bf"))},uImage:function(){return t.e("uni_modules/vk-uview-ui/components/u-image/u-image").then(t.bind(null,"9340"))}},u=function(){var e=this,n=e.$createElement;e._self._c;e._isMounted||(e.e0=function(n){e.isSelect=!1},e.e1=function(n){e.isSelect=!0})},r=[]},af69:function(e,n,t){"use strict";var o=t("c876"),u=t.n(o);u.a},b0c6:function(e,n,t){"use strict";(function(e){var o=t("4ea4");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var u,r=o(t("2eee")),i=o(t("9523")),c=o(t("c973"));function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){(0,i.default)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var l={data:function(){return{isSelect:!1,loginByWeixinModalShow:!1,data:{},form1:{username:"",password:""},rules:{username:[{required:!0,message:"请输入账号",trigger:"blur,change"}],password:[{min:6,message:"密码不能少于6个字符",trigger:"change"}]},scrollTop:0}},onPageScroll:function(e){this.scrollTop=e.scrollTop},onLoad:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};u=this,u.options=e,u.init(e)},onReady:function(){this.$refs.uForm.setRules(this.rules)},onShareAppMessage:function(e){},methods:{pageTo:function(n){"dev"!==n?e.navigateTo({url:n}):e.$msg("开发中~")},getPhoneNumber:function(n){var t=n.detail||{},o=this;e.login({success:function(n){n.code?e.api.base.apiwxlogin({code:n.code,phone_code:t.code,iv:t.iv,encrypted_data:t.encryptedData}).then((function(n){e.setStorageSync("MD_token",n.token),e.setStorageSync("MD_userInfo",n),e.setStorageSync("MD_phone",n.phone),e.$msg("登录成功~"),o.getUserInfo()})).catch((function(e){console.log(e)})):console.log("登录失败!"+n.errMsg)}})},init:function(){var n=arguments,t=this;return(0,c.default)(r.default.mark((function o(){var u;return r.default.wrap((function(o){while(1)switch(o.prev=o.next){case 0:n.length>0&&void 0!==n[0]?n[0]:{},u=e.getStorageSync("MD_phone"),t.form1.username=u;case 3:case"end":return o.stop()}}),o)})))()},loginHandle:function(){var n=this,t=this;this.$refs.uForm.validate((function(o){o?e.api.base.apilogin({phone:n.form1.username,password:n.form1.password}).then((function(n){e.setStorageSync("MD_userInfo",n),e.setStorageSync("MD_phone",n.phone),e.setStorageSync("MD_token",n.token),e.$msg("登录成功~"),t.getUserInfo()})):console.log("验证失败")}))},getUserInfo:function(){e.api.base.apiuserinfo().then((function(n){e.reLaunch({url:"/pages/index/index"}),e.setStorageSync("MD_userInfo2",n)})),e.api.base.apidicttree().then((function(n){var t=n||{},o={};for(var u in t){var r=t[u].map((function(e){return s(s({},e),{},{key:e.dict_label,val:e.dict_value})}));o[u]=r}e.setStorageSync("MD_dict",o)}))},loginByWeixin:function(){}},watch:{},computed:{}};n.default=l}).call(this,t("543d")["default"])},b6d9:function(e,n,t){"use strict";t.r(n);var o=t("a325"),u=t("91c7");for(var r in u)["default"].indexOf(r)<0&&function(e){t.d(n,e,(function(){return u[e]}))}(r);t("af69");var i=t("f0c5"),c=Object(i["a"])(u["default"],o["b"],o["c"],!1,null,"676a0c1e",null,!1,o["a"],void 0);n["default"]=c.exports},c876:function(e,n,t){}},[["290c","common/runtime","common/vendor"]]]);
|