lcny-admin-mobile-vue/dist/build/mp-weixin/pages/login/login.js

1 line
2.9 KiB
JavaScript

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/login/login"],{"0036":function(e,t,n){"use strict";(function(e,t){var o=n("4ea4");n("6cdc");o(n("66fd"));var i=o(n("a86a"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(i.default)}).call(this,n("bc2e")["default"],n("543d")["createPage"])},"0faa":function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return o}));var o={uButton:function(){return n.e("node-modules/uview-ui/components/u-button/u-button").then(n.bind(null,"d9ad"))}},i=function(){var e=this,t=e.$createElement;e._self._c},a=[]},"21da":function(e,t,n){"use strict";var o=n("ec9a"),i=n.n(o);i.a},3285:function(e,t,n){"use strict";n.r(t);var o=n("8edd"),i=n.n(o);for(var a in o)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(a);t["default"]=i.a},"8edd":function(e,t,n){"use strict";(function(e){var o=n("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;n("815d");var i=o(n("0cc2")),a=o(n("8237")),s=function(){n.e("components/jp-verification-literalness/jp-verification-literalness").then(function(){return resolve(n("08d3"))}.bind(null,n)).catch(n.oe)};t.default={components:{Security:s},data:function(){return{identify:"123s",username:"",password:"",identifyCode:""}},onLoad:function(){},methods:{randomNum:function(e,t){return Math.floor(Math.random()*(t-e)+e)},refreshCode:function(){this.identifyCode="",this.makeCode()},makeCode:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:4,t="1234567890abcdef",n="",o=0;o<e;o++)n+=t[this.randomNum(0,t.length)];this.identify=n},login:function(){var t=this;if(this.username)if(this.password)if(this.identifyCode)if(this.identifyCode==this.identify){var n={username:this.username,password:(0,a.default)(this.password),identifyCode:this.identifyCode};this.$http.post("/api/auth/login",n,{custom:{auth:!1}}).then((function(n){var o=n.data;if(console.log(o),200==o.code){var a=o.data;a.info;console.log(a),i.default.setAccessToken(a.token),t.$store.dispatch("getUserInfo"),"admin"==t.username&&e.setStorage({key:"redirect",data:"/pages/basics/profile"}),e.switchTab({url:"/pages/index/index"}),e.showToast({title:"登录成功!",icon:"none"})}})).catch((function(t){e.showToast({title:t.data.message,icon:"none"})}))}else e.showToast({title:"验证码不正确",icon:"none"});else e.showToast({title:"请输入验证码",icon:"none"});else e.showToast({title:"请输入您的密码",icon:"none"});else e.showToast({title:"请输入您的账号",icon:"none"})}}}}).call(this,n("543d")["default"])},a86a:function(e,t,n){"use strict";n.r(t);var o=n("0faa"),i=n("3285");for(var a in i)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(a);n("21da");var s,u=n("f0c5"),c=Object(u["a"])(i["default"],o["b"],o["c"],!1,null,"48e0aa94",null,!1,o["a"],s);t["default"]=c.exports},ec9a:function(e,t,n){}},[["0036","common/runtime","common/vendor"]]]);