wszhyWx/unpackage/dist/build/mp-weixin/pages/login/login.js

1 line
2.9 KiB
JavaScript

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/login/login"],{"0195":function(e,n,t){"use strict";(function(e,n){var u=t("4ea4");t("d913");u(t("66fd"));var o=u(t("b209"));e.__webpack_require_UNI_MP_PLUGIN__=t,n(o.default)}).call(this,t("bc2e")["default"],t("543d")["createPage"])},"0a89":function(e,n,t){},"0dd7":function(e,n,t){"use strict";(function(e){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var t={data:function(){return{background:{backgroundColor:"transparent"},form:{name:"jiaxinglihe2",password:"lihe-control303"},rules:{name:[{required:!0,message:"请输入用户名",trigger:["blur"]}],password:[{required:!0,message:"请输入密码",trigger:["blur"]}]},checked:!1,token:""}},onReady:function(){this.$refs.uForm.setRules(this.rules)},mounted:function(){e.removeStorage({key:"token",success:function(e){}})},methods:{submit:function(){var n=this;this.$refs.uForm.validate((function(t){t?1==n.checked?n.$http({url:n.api.user_login,data:{username:n.form.name,password:n.form.password}}).then((function(n){e.setStorage({key:"token",data:n.data.token}),e.setStorage({key:"userid",data:n.data.userid}),e.showToast({icon:"success",title:"登录成功!",duration:2e3}),e.switchTab({url:"/pages/timeEnvironment/timeEnvironment"})})):e.showToast({icon:"error",title:"请同意协议!",duration:2e3}):console.log("验证失败")}))}}};n.default=t}).call(this,t("543d")["default"])},9122:function(e,n,t){"use strict";var u=t("0a89"),o=t.n(u);o.a},b209:function(e,n,t){"use strict";t.r(n);var u=t("c39e"),o=t("f452");for(var r in o)["default"].indexOf(r)<0&&function(e){t.d(n,e,(function(){return o[e]}))}(r);t("9122");var i=t("f0c5"),a=Object(i["a"])(o["default"],u["b"],u["c"],!1,null,"4599a4ac",null,!1,u["a"],void 0);n["default"]=a.exports},c39e:function(e,n,t){"use strict";t.d(n,"b",(function(){return o})),t.d(n,"c",(function(){return r})),t.d(n,"a",(function(){return u}));var u={uNavbar:function(){return t.e("node-modules/uview-ui/components/u-navbar/u-navbar").then(t.bind(null,"ce19"))},uForm:function(){return t.e("node-modules/uview-ui/components/u-form/u-form").then(t.bind(null,"2664"))},uFormItem:function(){return Promise.all([t.e("common/vendor"),t.e("node-modules/uview-ui/components/u-form-item/u-form-item")]).then(t.bind(null,"6c64"))},uInput:function(){return Promise.all([t.e("common/vendor"),t.e("node-modules/uview-ui/components/u-input/u-input")]).then(t.bind(null,"40e0"))},uButton:function(){return t.e("node-modules/uview-ui/components/u-button/u-button").then(t.bind(null,"267c"))},uCheckbox:function(){return t.e("node-modules/uview-ui/components/u-checkbox/u-checkbox").then(t.bind(null,"f637"))}},o=function(){var e=this.$createElement;this._self._c},r=[]},f452:function(e,n,t){"use strict";t.r(n);var u=t("0dd7"),o=t.n(u);for(var r in u)["default"].indexOf(r)<0&&function(e){t.d(n,e,(function(){return u[e]}))}(r);n["default"]=o.a}},[["0195","common/runtime","common/vendor"]]]);