(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/login/login"],{1166:function(e,t,o){},"2c72":function(e,t,o){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(o("7cc2"));function a(e){return e&&e.__esModule?e:{default:e}}var s={data:function(){return{roleList:[],roleIndex:-1,role:"",username:"",password:""}},onLoad:function(){console.log(e.getStorageSync("userInfo")),null!==e.getStorageSync("userInfo").data&&""!==e.getStorageSync("userInfo")&&e.switchTab({url:"/pages/tabbar/homepage/homepage"}),this.role=e.getStorageSync("loginInfo").user_type,this.username=e.getStorageSync("loginInfo").real_name,this.password=e.getStorageSync("loginInfo").pass_word},onShow:function(){this.getUserType()},methods:{register:function(){e.navigateTo({url:"/pages/login/register"})},forgetPassword:function(){e.showToast({icon:"none",title:"请联系管理员重置密码"})},getUserType:function(){var e=this;n.default.post("/hs/getDictionariesData",{code:"UserType"}).then((function(t){console.log("用户类型",t),e.roleList=[],t.data.forEach((function(t){e.roleList.push(t.dd_detail)}))}),(function(e){console.log("err",e)}))},doLogin:function(){var t=this;""===this.role||void 0===this.role?e.showToast({icon:"none",title:"请选择角色"}):""===this.username||void 0===this.username?e.showToast({icon:"none",title:"请输入账号"}):""===this.password||void 0===this.password?e.showToast({icon:"none",title:"请输入密码"}):n.default.post("/hs/login",{role:this.role,username:this.username,password:this.password}).then((function(o){console.log("登录信息",o),null===o.data?e.showToast({icon:"none",title:"账号或密码错误"}):"1"===o.data.frozen_state?e.showToast({icon:"none",title:"该账号已冻结"}):o.data.user_type!==t.role?e.showToast({icon:"none",title:"角色不匹配"}):"0"===o.data.take_effect?e.showToast({icon:"none",title:"该账号注册流程正在审核"}):(e.setStorageSync("userInfo",o.data),e.setStorageSync("loginInfo",o.data),e.switchTab({url:"/pages/tabbar/homepage/homepage"}))}),(function(e){}))},rolePickerChange:function(e){this.roleIndex=e.detail.value,-1===this.roleIndex&&(this.roleIndex=0),this.role=this.roleList[this.roleIndex]}}};t.default=s}).call(this,o("543d")["default"])},"43bf":function(e,t,o){"use strict";o.r(t);var n=o("2c72"),a=o.n(n);for(var s in n)"default"!==s&&function(e){o.d(t,e,(function(){return n[e]}))}(s);t["default"]=a.a},7679:function(e,t,o){"use strict";var n;o.d(t,"b",(function(){return a})),o.d(t,"c",(function(){return s})),o.d(t,"a",(function(){return n}));var a=function(){var e=this,t=e.$createElement;e._self._c},s=[]},"9dda":function(e,t,o){"use strict";o.r(t);var n=o("7679"),a=o("43bf");for(var s in a)"default"!==s&&function(e){o.d(t,e,(function(){return a[e]}))}(s);o("ce3f");var r,i=o("f0c5"),c=Object(i["a"])(a["default"],n["b"],n["c"],!1,null,"f12f93a6",null,!1,n["a"],r);t["default"]=c.exports},c474:function(e,t,o){"use strict";(function(e){o("813a");n(o("66fd"));var t=n(o("9dda"));function n(e){return e&&e.__esModule?e:{default:e}}e(t.default)}).call(this,o("543d")["createPage"])},ce3f:function(e,t,o){"use strict";var n=o("1166"),a=o.n(n);a.a}},[["c474","common/runtime","common/vendor"]]]);