chunk-43479986.32e237c9.js 10.9 KB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-43479986"],{"1da1":function(t,r,e){"use strict";e.d(r,"a",(function(){return i}));e("d3b7"),e("e6cf");function n(t,r,e,n,i,o,a){try{var u=t[o](a),s=u.value}catch(c){return void e(c)}u.done?r(s):Promise.resolve(s).then(n,i)}function i(t){return function(){var r=this,e=arguments;return new Promise((function(i,o){var a=t.apply(r,e);function u(t){n(a,i,o,u,s,"next",t)}function s(t){n(a,i,o,u,s,"throw",t)}u(void 0)}))}}},"48ca":function(t,r,e){"use strict";e.r(r);var n=function(){var t=this,r=t.$createElement,e=t._self._c||r;return e("div",[e("LoginForm")],1)},i=[],o=function(){var t=this,r=t.$createElement,e=t._self._c||r;return e("v-app",{attrs:{id:"inspire"}},[e("v-content",[e("v-container",{staticClass:"fill-height",attrs:{fluid:""}},[e("v-row",{attrs:{align:"center",justify:"center"}},[e("v-col",{attrs:{cols:"12",sm:"8",md:"4"}},[e("v-card",{staticClass:"elevation-12"},[e("v-toolbar",{attrs:{color:"primary",dark:"",flat:""}},[e("v-toolbar-title",[t._v("KhuLoud")]),e("v-spacer")],1),e("v-card-text",[e("v-form",{on:{submit:function(r){return r.preventDefault(),t.submitForm(r)}}},[e("v-text-field",{attrs:{label:"ID",name:"ID",type:"text"},model:{value:t.id,callback:function(r){t.id=r},expression:"id"}}),e("v-text-field",{attrs:{id:"password",label:"Password",name:"password",type:"password"},model:{value:t.password,callback:function(r){t.password=r},expression:"password"}})],1)],1),e("v-card-actions",[e("v-spacer"),e("v-btn",{attrs:{color:"primary",disabled:!t.id||!t.password,router:"",to:{name:"Main"},exact:""}},[t._v("Login")])],1)],1)],1)],1)],1)],1)],1)},a=[],u=(e("96cf"),e("1da1")),s={data:function(){return{id:"",password:""}},methods:{submitForm:function(){var t=this;return Object(u["a"])(regeneratorRuntime.mark((function r(){var e,n;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.prev=0,{id:t.id,password:t.password},r.next=4,loginUser(userData);case 4:e=r.sent,n=e.data,t.$store.commit("setid",n.user.userid),t.$router.push("/main"),r.next=13;break;case 10:r.prev=10,r.t0=r["catch"](0),console.log(r.t0.response.data);case 13:return r.prev=13,t.initForm(),r.finish(13);case 16:case"end":return r.stop()}}),r,null,[[0,10,13,16]])})))()}},initForm:function(){this.id="",this.password=""}},c=s,l=e("2877"),h=e("6544"),f=e.n(h),d=e("7496"),p=e("8336"),v=e("b0af"),m=e("99d9"),y=e("62ad"),w=e("a523"),g=e("a75b"),b=e("4bd4"),x=e("0fd9"),_=e("2fa4"),L=e("8654"),E=e("71d9"),V=e("2a7f"),O=Object(l["a"])(c,o,a,!1,null,null,null),j=O.exports;f()(O,{VApp:d["a"],VBtn:p["a"],VCard:v["a"],VCardActions:m["a"],VCardText:m["b"],VCol:y["a"],VContainer:w["a"],VContent:g["a"],VForm:b["a"],VRow:x["a"],VSpacer:_["a"],VTextField:L["a"],VToolbar:E["a"],VToolbarTitle:V["a"]});var k={components:{LoginForm:j}},F=k,B=Object(l["a"])(F,n,i,!1,null,null,null);r["default"]=B.exports},"4bd4":function(t,r,e){"use strict";e("4de4"),e("7db0"),e("4160"),e("caad"),e("07ac"),e("2532"),e("159b");var n=e("5530"),i=e("58df"),o=e("7e2b"),a=e("3206");r["a"]=Object(i["a"])(o["a"],Object(a["b"])("form")).extend({name:"v-form",inheritAttrs:!1,props:{lazyValidation:Boolean,value:Boolean},data:function(){return{inputs:[],watchers:[],errorBag:{}}},watch:{errorBag:{handler:function(t){var r=Object.values(t).includes(!0);this.$emit("input",!r)},deep:!0,immediate:!0}},methods:{watchInput:function(t){var r=this,e=function(t){return t.$watch("hasError",(function(e){r.$set(r.errorBag,t._uid,e)}),{immediate:!0})},n={_uid:t._uid,valid:function(){},shouldValidate:function(){}};return this.lazyValidation?n.shouldValidate=t.$watch("shouldValidate",(function(i){i&&(r.errorBag.hasOwnProperty(t._uid)||(n.valid=e(t)))})):n.valid=e(t),n},validate:function(){return 0===this.inputs.filter((function(t){return!t.validate(!0)})).length},reset:function(){this.inputs.forEach((function(t){return t.reset()})),this.resetErrorBag()},resetErrorBag:function(){var t=this;this.lazyValidation&&setTimeout((function(){t.errorBag={}}),0)},resetValidation:function(){this.inputs.forEach((function(t){return t.resetValidation()})),this.resetErrorBag()},register:function(t){this.inputs.push(t),this.watchers.push(this.watchInput(t))},unregister:function(t){var r=this.inputs.find((function(r){return r._uid===t._uid}));if(r){var e=this.watchers.find((function(t){return t._uid===r._uid}));e&&(e.valid(),e.shouldValidate()),this.watchers=this.watchers.filter((function(t){return t._uid!==r._uid})),this.inputs=this.inputs.filter((function(t){return t._uid!==r._uid})),this.$delete(this.errorBag,r._uid)}}},render:function(t){var r=this;return t("form",{staticClass:"v-form",attrs:Object(n["a"])({novalidate:!0},this.attrs$),on:{submit:function(t){return r.$emit("submit",t)}}},this.$slots.default)}})},"96cf":function(t,r,e){var n=function(t){"use strict";var r,e=Object.prototype,n=e.hasOwnProperty,i="function"===typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(t,r,e,n){var i=r&&r.prototype instanceof v?r:v,o=Object.create(i.prototype),a=new k(n||[]);return o._invoke=E(t,e,a),o}function c(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(n){return{type:"throw",arg:n}}}t.wrap=s;var l="suspendedStart",h="suspendedYield",f="executing",d="completed",p={};function v(){}function m(){}function y(){}var w={};w[o]=function(){return this};var g=Object.getPrototypeOf,b=g&&g(g(F([])));b&&b!==e&&n.call(b,o)&&(w=b);var x=y.prototype=v.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(r){t[r]=function(t){return this._invoke(r,t)}}))}function L(t,r){function e(i,o,a,u){var s=c(t[i],t,o);if("throw"!==s.type){var l=s.arg,h=l.value;return h&&"object"===typeof h&&n.call(h,"__await")?r.resolve(h.__await).then((function(t){e("next",t,a,u)}),(function(t){e("throw",t,a,u)})):r.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return e("throw",t,a,u)}))}u(s.arg)}var i;function o(t,n){function o(){return new r((function(r,i){e(t,n,r,i)}))}return i=i?i.then(o,o):o()}this._invoke=o}function E(t,r,e){var n=l;return function(i,o){if(n===f)throw new Error("Generator is already running");if(n===d){if("throw"===i)throw o;return B()}e.method=i,e.arg=o;while(1){var a=e.delegate;if(a){var u=V(a,e);if(u){if(u===p)continue;return u}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(n===l)throw n=d,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n=f;var s=c(t,r,e);if("normal"===s.type){if(n=e.done?d:h,s.arg===p)continue;return{value:s.arg,done:e.done}}"throw"===s.type&&(n=d,e.method="throw",e.arg=s.arg)}}}function V(t,e){var n=t.iterator[e.method];if(n===r){if(e.delegate=null,"throw"===e.method){if(t.iterator["return"]&&(e.method="return",e.arg=r,V(t,e),"throw"===e.method))return p;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var i=c(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,p;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,p):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function O(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function j(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function F(t){if(t){var e=t[o];if(e)return e.call(t);if("function"===typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function e(){while(++i<t.length)if(n.call(t,i))return e.value=t[i],e.done=!1,e;return e.value=r,e.done=!0,e};return a.next=a}}return{next:B}}function B(){return{value:r,done:!0}}return m.prototype=x.constructor=y,y.constructor=m,y[u]=m.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var r="function"===typeof t&&t.constructor;return!!r&&(r===m||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,u in t||(t[u]="GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},_(L.prototype),L.prototype[a]=function(){return this},t.AsyncIterator=L,t.async=function(r,e,n,i,o){void 0===o&&(o=Promise);var a=new L(s(r,e,n,i),o);return t.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(x),x[u]="Generator",x[o]=function(){return this},x.toString=function(){return"[object Generator]"},t.keys=function(t){var r=[];for(var e in t)r.push(e);return r.reverse(),function e(){while(r.length){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=F,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(j),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0],r=t.completion;if("throw"===r.type)throw r.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function i(n,i){return u.type="throw",u.arg=t,e.next=n,i&&(e.method="next",e.arg=r),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=r,o?(this.method="next",this.next=o.finallyLoc,p):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),p},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),j(e),p}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var i=n.arg;j(e)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:F(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),p}},t}(t.exports);try{regeneratorRuntime=n}catch(i){Function("r","regeneratorRuntime = r")(n)}}}]);
//# sourceMappingURL=chunk-43479986.32e237c9.js.map