Commit 50dc7722 authored by Kittisak Maneewong's avatar Kittisak Maneewong

config default baseurl axios vue laravel

parent 51ab882a
......@@ -1188,7 +1188,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.common.js\");\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var vuetify__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vuetify */ \"./node_modules/vuetify/dist/vuetify.js\");\n/* harmony import */ var vuetify__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(vuetify__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var iview__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! iview */ \"./node_modules/iview/dist/iview.js\");\n/* harmony import */ var iview__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(iview__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _App_vue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./App.vue */ \"./resources/js/App.vue\");\n/* harmony import */ var _route__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./route */ \"./resources/js/route.js\");\n/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./store */ \"./resources/js/store.js\");\n/* harmony import */ var iview_dist_styles_iview_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! iview/dist/styles/iview.css */ \"./node_modules/iview/dist/styles/iview.css\");\n/* harmony import */ var iview_dist_styles_iview_css__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(iview_dist_styles_iview_css__WEBPACK_IMPORTED_MODULE_6__);\nwindow.Vue = __webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.common.js\");\nwindow._ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\nwindow.axios = __webpack_require__(/*! axios */ \"./node_modules/axios/index.js\");\nwindow.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';\nvar token = document.head.querySelector('meta[name=\"csrf-token\"]');\n\nif (token) {\n window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;\n} else {\n console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');\n}\n\n\n\n\n\n\n\n // Vue.config.productionTip = false;\n\nvue__WEBPACK_IMPORTED_MODULE_0___default.a.use(vuetify__WEBPACK_IMPORTED_MODULE_1___default.a);\nvue__WEBPACK_IMPORTED_MODULE_0___default.a.use(iview__WEBPACK_IMPORTED_MODULE_2___default.a);\niview__WEBPACK_IMPORTED_MODULE_2___default.a.LoadingBar.config({\n height: 3\n});\nvar app = new vue__WEBPACK_IMPORTED_MODULE_0___default.a({\n el: '#app',\n router: _route__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n store: _store__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n render: function render(h) {\n return h(_App_vue__WEBPACK_IMPORTED_MODULE_3__[\"default\"]);\n }\n});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9yZXNvdXJjZXMvanMvYXBwLmpzPzZkNDAiXSwibmFtZXMiOlsid2luZG93IiwiVnVlIiwicmVxdWlyZSIsIl8iLCJheGlvcyIsImRlZmF1bHRzIiwiaGVhZGVycyIsImNvbW1vbiIsInRva2VuIiwiZG9jdW1lbnQiLCJoZWFkIiwicXVlcnlTZWxlY3RvciIsImNvbnRlbnQiLCJjb25zb2xlIiwiZXJyb3IiLCJ1c2UiLCJWdWV0aWZ5I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ltcG9ydCBWdWV0aWZ5IGZyb20gJ3Z1ZXRpZnknO1xyXG5pbXBvcnQgaVZpZXcgZnJvbSAnaXZpZXcnO1xyXG5cclxuaW1wb3J0IEFwcCBmcm9tICcuL0FwcC52dWUnO1xyXG5pbXBvcnQgcm91dGVyIGZyb20gJy4vcm91dGUnO1xyXG5pbXBvcnQgc3RvcmUgZnJvbSAnLi9zdG9yZSc7XHJcblxyXG5pbXBvcnQgJ2l2aWV3L2Rpc3Qvc3R5bGVzL2l2aWV3LmNzcyc7XHJcblxyXG4vLyBWdWUuY29uZmlnLnByb2R1Y3Rpb25UaXAgPSBmYWxzZTtcclxuXHJcblZ1ZS51c2UoVnVldGlmeSk7XHJcblZ1ZS51c2UoaVZpZXcpO1xyXG5cclxuaVZpZXcuTG9hZGluZ0Jhci5jb25maWcoe1xyXG4gICAgaGVpZ2h0OiAzXHJcbn0pO1xyXG5cclxuY29uc3QgYXBwID0gbmV3IFZ1ZSh7XHJcbiAgICBlbDogJyNhcHAnLFxyXG4gICAgcm91dGVyLFxyXG4gICAgc3RvcmUsXHJcbiAgICByZW5kZXI6IGggPT4gaChBcHApXHJcbn0pO1xyXG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./resources/js/app.js\n");
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.common.js\");\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var vuetify__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vuetify */ \"./node_modules/vuetify/dist/vuetify.js\");\n/* harmony import */ var vuetify__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(vuetify__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var iview__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! iview */ \"./node_modules/iview/dist/iview.js\");\n/* harmony import */ var iview__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(iview__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _App_vue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./App.vue */ \"./resources/js/App.vue\");\n/* harmony import */ var _route__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./route */ \"./resources/js/route.js\");\n/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./store */ \"./resources/js/store.js\");\n/* harmony import */ var iview_dist_styles_iview_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! iview/dist/styles/iview.css */ \"./node_modules/iview/dist/styles/iview.css\");\n/* harmony import */ var iview_dist_styles_iview_css__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(iview_dist_styles_iview_css__WEBPACK_IMPORTED_MODULE_6__);\nwindow.Vue = __webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.common.js\");\nwindow._ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\nwindow.axios = __webpack_require__(/*! axios */ \"./node_modules/axios/index.js\");\nwindow.axios.defaults.baseUrl = 'http://localhost:8000/';\n\n\n\n\n\n\n\nvue__WEBPACK_IMPORTED_MODULE_0___default.a.use(vuetify__WEBPACK_IMPORTED_MODULE_1___default.a);\nvue__WEBPACK_IMPORTED_MODULE_0___default.a.use(iview__WEBPACK_IMPORTED_MODULE_2___default.a);\niview__WEBPACK_IMPORTED_MODULE_2___default.a.LoadingBar.config({\n height: 3\n});\nvar app = new vue__WEBPACK_IMPORTED_MODULE_0___default.a({\n el: '#app',\n router: _route__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n store: _store__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n render: function render(h) {\n return h(_App_vue__WEBPACK_IMPORT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cixcclxuICAgIHN0b3JlLFxyXG4gICAgcmVuZGVyOiBoID0+IGgoQXBwKVxyXG59KTtcclxuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./resources/js/app.js\n");
/***/ }),
......@@ -1452,7 +1452,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vue_
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.common.js\");\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n/* harmony import */ var iview__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! iview */ \"./node_modules/iview/dist/iview.js\");\n/* harmony import */ var iview__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(iview__WEBPACK_IMPORTED_MODULE_2__);\n\n\n\nvue__WEBPACK_IMPORTED_MODULE_0___default.a.use(vuex__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n/* harmony default export */ __webpack_exports__[\"default\"] = (new vuex__WEBPACK_IMPORTED_MODULE_1__[\"default\"].Store({\n state: {\n message: 'Kittisak Maneewong',\n user: {\n name: null,\n email: null\n },\n employer: {\n username: null,\n company_name: null,\n email: null\n },\n jwt: localStorage.getItem('access_token') || null,\n jwt_employer: localStorage.getItem('access_token_employer') || null,\n dialog: false,\n snackbar: {\n show: false,\n color: null,\n text: null\n },\n loading: false,\n error: null\n },\n mutations: {\n setJwt: function setJwt(state, payload) {\n state.jwt = payload;\n },\n setJwtEmployer: function setJwtEmployer(state, payload) {\n state.jwt_employer = payload;\n },\n setDialog: function setDialog(state, payload) {\n state.dialog = payload;\n },\n setSnackbar: function setSnackbar(state, payload) {\n state.snackbar = payload;\n },\n setUser: function setUser(state, payload) {\n state.user = payload;\n },\n setEmployer: function setEmployer(state, payload) {\n state.employer = payload;\n },\n setLoading: function setLoading(state, payload) {\n state.loading = payload;\n },\n setError: function setError(state, payload) {\n state.error = payload;\n }\n },\n actions: {\n login: function login(_ref, payload) {\n var commit = _ref.commit,\n dispatch = _ref.dispatch;\n return new Promise(function (resolve, reject) {\n commit('setLoading', true);\n axios.post('api/auth/login', payload).then(function (res) {\n commit('setLoading', false);\n\n if (payload.role == 1) {\n iview__WEBPACK_IMPORTED_MODULE_2___default.a.LoadingBar.finish();\n localStorage.setItem('access_token', res.data.token);\n commit('setJwt', res.data.token);\n dispatch('checkUser');\n } else {\n localStorage.setItem('access_token_employer', res.data.token);\n commit('setJwtEmployer', res.data.token);\n dispatch('checkEmployer');\n }\n\n commit('setSnackbar', {\n show: true,\n color: 'success',\n text: 'เข้าสู่ระบบสำเร็จ!'\n });\n commit('setDialog', false);\n resolve(res);\n console.log(res);\n }).catch(function (err) {\n iview__WEBPACK_IMPORTED_MODULE_2___default.a.LoadingBar.error();\n commit('setLoading', false);\n\n if (err.response.data.error === 'invalid_credentials') {\n if (payload.role === 1) {\n commit('setError', 'อีเมลหรือรหัสผ่านไม่ถูกต้อง');\n } else {\n commit('setError', 'ชื่อผู้ใช้หรือรหัสผ่านไม่ถูกต้อง');\n }\n\n setTimeout(function () {\n commit('setError', null);\n }, 4000);\n }\n\n console.log(err.response);\n reject(err.response);\n });\n });\n },\n register: function register(_ref2, payload) {\n var commit = _ref2.commit;\n return new Promise(function (resolve, reject) {\n commit('setLoading', true);\n axios.post('api/auth/register', payload).then(function (res) {\n if (payload.role === 1) {\n iview__WEBPACK_IMPORTED_MODULE_2___default.a.LoadingBar.finish();\n }\n\n commit('setLoading', false);\n commit('setSnackbar', {\n show: true,\n color: 'success',\n text: 'ลงทะเบียนสำเร็จ!'\n });\n commit('setDialog', false);\n console.log(res);\n resolve(res);\n }).catch(function (err) {\n iview__WEBPACK_IMPORTED_MODULE_2___default.a.LoadingBar.error();\n commit('setLoading', false);\n console.log(err.response);\n var error = JSON.parse(err.response.data);\n\n if (error.username && error.email) {\n commit('setError', 'ชื่อผู้ใช้เเละอีเมลถูกใช้งานเเล้ว');\n setTimeout(function () {\n commit('setError', null);\n }, 4000);\n } else if (error.email) {\n commit('setError', 'อีเมลนี้ถูกใช้งานเเล้ว');\n setTimeout(function () {\n commit('setError', null);\n }, 4000);\n errorMessage = 'อีเมลนี้ถูกใช้งานเเล้ว';\n } else if (error.username) {\n commit('setError', 'ชื่อผู้ใช้นี้ถูกใช้งานเเล้ว');\n setTimeout(function () {\n commit('setError', null);\n }, 4000);\n errorMessage = 'ชื่อผู้ใช้นี้ถูกใช้งานเเล้ว';\n }\n\n reject(err.response);\n });\n });\n },\n logout: function logout(_ref3) {\n var commit = _ref3.commit;\n iview__WEBPACK_IMPORTED_MODULE_2___default.a.LoadingBar.finish();\n localStorage.removeItem('access_token');\n commit('setUser', {\n name: null,\n email: null\n });\n commit('setSnackbar', {\n show: true,\n color: 'success',\n text: 'ออกจากระบบสำเร็จ!'\n });\n },\n logoutEmployer: function logoutEmployer(_ref4) {\n var commit = _ref4.commit;\n localStorage.removeItem('access_token_employer');\n commit('setEmployer', {\n username: null,\n company_name: null,\n email: null\n });\n commit('setSnackbar', {\n show: true,\n color: 'success',\n text: 'ออกจากระบบสำเร็จ!'\n });\n },\n checkUser: function checkUser(_ref5) {\n var commit = _ref5.commit;\n\n if (!!localStorage.getItem('access_token')) {\n axios.get('/api/auth/current', {\n headers: {\n Authorization: \"Bearer \".concat(localStorage.getItem('access_token'))\n }\n }).then(function (res) {\n commit('setUser', {\n name: res.data.user.name,\n email: res.data.user.email_users\n });\n console.log(res);\n }).catch(function (err) {\n console.log(err.response);\n });\n }\n },\n checkEmployer: function checkEmployer(_ref6) {\n var commit = _ref6.commit;\n\n if (!!localStorage.getItem('access_token_employer')) {\n axios.get('/api/auth/current', {\n headers: {\n Authorization: \"Bearer \".concat(localStorage.getItem('access_token_employer'))\n }\n }).then(function (res) {\n commit('setEmployer', {\n username: res.data.user.username,\n company_name: res.data.user.company_name,\n email: res.data.user.email_employers\n });\n console.log(res);\n }).catch(function (err) {\n console.log(err.response);\n });\n }\n }\n },\n getters: {\n welcome: function welcome(state) {\n return state.message;\n },\n getJwt: function getJwt(state) {\n return state.jwt;\n },\n getJwtEmployer: function getJwtEmployer(state) {\n return state.jwt_employer;\n },\n getDialog: function getDialog(state) {\n return state.dialog;\n },\n getSnackbar: function getSnackbar(state) {\n return state.snackbar;\n },\n getUser: function getUser(state) {\n return state.user;\n },\n getEmployer: function getEmployer(state) {\n return state.employer;\n },\n getLoading: function getLoading(state) {\n return state.loading;\n },\n getError: function getError(state) {\n return state.error;\n }\n }\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9yZXNvdXJjZXMvanMvc3RvcmUuanM/MjVjZSJdLCJuYW1lcyI6WyJWdWUiLCJ1c2UiLCJWdWV4IiwiU3RvcmUiLCJzdGF0ZSIsIm1lc3NhZ2UiLCJ1c2VyIiwibmFtZSIsImVtYWlsIiwiZW1wbG95ZXIiLCJ1c2VybmFtZSIsImNvbXBhbnlfbmFtZSIsImp3dCIsImxvY2FsU3RvcmFnZSIsImdldEl0ZW0iLCJqd3RfZW1wbG95ZXIiLCJkaWFsb2ciLCJzbmFja2JhciIsInNob3ciLCJjb2xvciIsInRleHQiLCJsb2FkaW5nIiwiZXJyb3IiLCJtdXRhdGlvbnMiLCJzZXRKd3QiLCJwYXlsb2FkIiwic2V0Snd0RW1wbG95ZXIiLCJzZXREaWFsb2ciLCJzZXRTbmFja2JhciIsInNldFVzZXIiLCJzZXRFbXBsb3llciIsInNldExvYWRpbmciLCJzZXRFcnJvciIsImFjdGlvb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vcjogJ3N1Y2Nlc3MnLFxyXG4gICAgICAgICAgICB0ZXh0OiAn4LmA4LiC4LmJ4Liy4Liq4Li54LmI4Lij4Liw4Lia4Lia4Liq4Liz4LmA4Lij4LmH4LiIISdcclxuICAgICAgICAgIH0pXHJcbiAgICAgICAgICBjb21taXQoJ3NldERpYWxvZycsIGZhbHNlKVxyXG4gICAgICAgICAgcmVzb2x2ZShyZXMpXHJcbiAgICAgICAgICBjb25zb2xlLmxvZyhyZXMpXHJcbiAgICAgICAgfSlcclxuICAgICAgICAuY2F0Y2goZXJyID0+IHtcclxuICAgICAgICAgIGlWaWV3LkxvYWRpbmdCYXIuZXJyb3IoKVxyXG4gICAgICAgICAgY29tbWl0KCdzZXRMb2FkaW5nJywgZmFsc2UpXHJcbiAgICAgICAgICBpZiAoZXJyLnJlc3BvbnNlLmRhdGEuZXJyb3IgPT09ICdpbnZhbGlkX2NyZWRlbnRpYWxzJykge1xyXG4gICAgICAgICAgICBpZiAocGF5bG9hZC5yb2xlID09PSAxKSB7XHJcbiAgICAgICAgICAgICAgY29tbWl0KCdzZXRFcnJvcicsICfguK3guLXguYDguKHguKXguKvguKPguLfguK3guKPguKvguLHguKrguJzguYjguLLguJnguYTguKHguYjguJbguLnguIHguJXguYnguK3guIcnKVxyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgIGNvbW1pdCgnc2V0RXJyb3InLCAn4LiK4Li34LmI4Lit4Lic4Li54LmJ4LmD4LiK4LmJ4Lir4Lij4Li34Lit4Lij4Lir4Lix4Liq4Lic4LmI4Liy4LiZ4LmE4Lih4LmI4LiW4Li54LiB4LiV4LmJ4Lit4LiHJylcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBzZXRUaW1lb3V0KCgpID0+IHtcclxuICAgICAgICAgICAgICBjb21taXQoJ3NldEVycm9yJywgbnVsbClcclxuICAgICAgICAgICAgfSwgNDAwMCk7XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgICBjb25zb2xlLmxvZyhlcnIucmVzcG9uc2UpXHJcbiAgICAgICAgICByZWplY3QoZXJyLnJlc3BvbnNlKVxyXG4gICAgICAgIH0pXHJcbiAgICAgIH0pXHJcbiAgICB9LFxyXG4gICAgcmVnaXN0ZXIgKHtjb21taXR9LCBwYXlsb2FkKSB7XHJcbiAgICAgIHJldHVybiBuZXcgUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7XHJcbiAgICAgICAgY29tbWl0KCdzZXRMb2FkaW5nJywgdHJ1ZSlcclxuICAgICAgICBheGlvcy5wb3N0KCdhcGkvYXV0aC9yZWdpc3RlcicsIHBheWxvYWQpXHJcbiAgICAgICAgICAudGhlbihyZXMgPT4ge1xyXG4gICAgICAgICAgICBpZiAocGF5bG9hZC5yb2xlID09PSAxKSB7XHJcbiAgICAgICAgICAgICAgaVZpZXcuTG9hZGluZ0Jhci5maW5pc2goKVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGNvbW1pdCgnc2V0TG9hZGluZycsIGZhbHNlKVxyXG4gICAgICAgICAgICBjb21taXQoJ3NldFNuYWNrYmFyJywge1xyXG4gICAgICAgICAgICAgIHNob3c6IHRydWUsXHJcbiAgICAgICAgICAgICAgY29sb3I6ICdzdWNjZXNzJyxcclxuICAgICAgICAgICAgICB0ZXh0OiAn4Lil4LiH4LiX4Liw4LmA4Lia4Li14Lii4LiZ4Liq4Liz4LmA4Lij4LmH4LiIISdcclxuICAgICAgICAgICAgfSlcclxuICAgICAgICAgICAgY29tbWl0KCdzZXREaWFsb2cnLCBmYWxzZSlcclxuICAgICAgICAgICAgY29uc29sZS5sb2cocmVzKVxyXG4gICAgICAgICAgICByZXNvbHZlKHJlcylcclxuICAgICAgICAgIH0pXHJcbiAgICAgICAgICAuY2F0Y2goZXJyID0+IHtcclxuICAgICAgICAgICAgaVZpZXcuTG9hZGluZ0Jhci5lcnJvcigpXHJcbiAgICAgICAgICAgIGNvbW1pdCgnc2V0TG9hZGluZycsIGZhbHNlKVxyXG4gICAgICAgICAgICBjb25zb2xlLmxvZyhlcnIucmVzcG9uc2UpXHJcbiAgICAgICAgICAgIGNvbnN0IGVycm9yID0gSlNPTi5wYXJzZShlcnIucmVzcG9uc2UuZGF0YSk7XHJcbiAgICAgICAgICAgIGlmIChlcnJvci51c2VybmFtZSAmJiBlcnJvci5lbWFpbCkge1xyXG4gICAgICAgICAgICAgIGNvbW1pdCgnc2V0RXJyb3InLCAn4LiK4Li34LmI4Lit4Lic4Li54LmJ4LmD4LiK4LmJ4LmA4LmA4Lil4Liw4Lit4Li14LmA4Lih4Lil4LiW4Li54LiB4LmD4LiK4LmJ4LiH4Liy4LiZ4LmA4LmA4Lil4LmJ4LinJylcclxuICAgICAgICAgICAgICBzZXRUaW1lb3V0KCgpID0+IHtcclxuICAgICAgICAgICAgICAgIGNvbW1pdCgnc2V0RXJyb3InLCBudWxsKVxyXG4gICAgICAgICAgICAgIH0sIDQwMDApO1xyXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGVycm9yLmVtYWlsKSB7XHJcbiAgICAgICAgICAgICAgY29tbWl0KCdzZXRFcnJvcicsICfguK3guLXguYDguKHguKXguJnguLXguYnguJbguLnguIHguYPguIrguYnguIfguLLguJnguYDguYDguKXguYnguKcnKVxyXG4gICAgICAgICAgICAgIHNldFRpbWVvdXQoKCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgY29tbWl0KCdzZXRFcnJvcicsIG51bGwpXHJcbiAgICAgICAgICAgICAgfSwgNDAwMCk7XHJcbiAgICAgICAgICAgICAgZXJyb3JNZXNzYWdlID0gJ+C4reC4teC5gOC4oeC4peC4meC4teC5ieC4luC4ueC4geC5g+C4iuC5ieC4h+C4suC4meC5gOC5gOC4peC5ieC4pydcclxuICAgICAgICAgICAgfSBlbHNlIGlmIChlcnJvci51c2VybmFtZSkge1xyXG4gICAgICAgICAgICAgIGNvbW1pdCgnc2V0RXJyb3InLCAn4LiK4Li34LmI4Lit4Lic4Li54LmJ4LmD4LiK4LmJ4LiZ4Li14LmJ4LiW4Li54LiB4LmD4LiK4LmJ4LiH4Liy4LiZ4LmA4LmA4Lil4LmJ4LinJylcclxuICAgICAgICAgICAgICBzZXRUaW1lb3V0KCgpID0+IHtcclxuICAgICAgICAgICAgICAgIGNvbW1pdCgnc2V0RXJyb3InLCBudWxsKVxyXG4gICAgICAgICAgICAgIH0sIDQwMDApO1xyXG4gICAgICAgICAgICAgIGVycm9yTWVzc2FnZSA9ICfguIrguLfguYjguK3guJzguLnguYnguYPguIrguYnguJnguLXguYnguJbguLnguIHguYPguIrguYnguIfguLLguJnguYDguYDguKXguYnguKcnXHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgcmVqZWN0KGVyci5yZXNwb25zZSlcclxuICAgICAgICAgIH0pXHJcbiAgICAgIH0pXHJcbiAgICB9LFxyXG4gICAgbG9nb3V0ICh7Y29tbWl0fSkge1xyXG4gICAgICBpVmlldy5Mb2FkaW5nQmFyLmZpbmlzaCgpXHJcbiAgICAgIGxvY2FsU3RvcmFnZS5yZW1vdmVJdGVtKCdhY2Nlc3NfdG9rZW4nKVxyXG4gICAgICBjb21taXQoJ3NldFVzZXInLCB7XHJcbiAgICAgICAgbmFtZTogbnVsbCxcclxuICAgICAgICBlbWFpbDogbnVsbFxyXG4gICAgICB9KVxyXG4gICAgICBjb21taXQoJ3NldFNuYWNrYmFyJywge1xyXG4gICAgICAgIHNob3c6IHRydWUsXHJcbiAgICAgICAgY29sb3I6ICdzdWNjZXNzJyxcclxuICAgICAgICB0ZXh0OiAn4Lit4Lit4LiB4LiI4Liy4LiB4Lij4Liw4Lia4Lia4Liq4Liz4LmA4Lij4LmH4LiIISdcclxuICAgICAgfSlcclxuICAgIH0sXHJcbiAgICBsb2dvdXRFbXBsb3llciAoe2NvbW1pdH0pIHtcclxuICAgICAgbG9jYWxTdG9yYWdlLnJlbW92ZUl0ZW0oJ2FjY2Vzc190b2tlbl9lbXBsb3llcicpXHJcbiAgICAgIGNvbW1pdCgnc2V0RW1wbG95ZXInLCB7XHJcbiAgICAgICAgdXNlcm5hbWU6IG51bGwsXHJcbiAgICAgICAgY29tcGFueV9uYW1lOiBudWxsLFxyXG4gICAgICAgIGVtYWlsOiBudWxsXHJcbiAgICAgIH0pXHJcbiAgICAgIGNvbW1pdCgnc2V0U25hY2tiYXInLCB7XHJcbiAgICAgICAgc2hvdzogdHJ1ZSxcclxuICAgICAgICBjb2xvcjogJ3N1Y2Nlc3MnLFxyXG4gICAgICAgIHRleHQ6ICfguK3guK3guIHguIjguLLguIHguKPguLDguJrguJrguKrguLPguYDguKPguYfguIghJ1xyXG4gICAgICB9KVxyXG4gICAgfSxcclxuICAgIGNoZWNrVXNlciAoe2NvbW1pdH0pIHtcclxuICAgICAgaWYgKCEhbG9jYWxTdG9yYWdlLmdldEl0ZW0oJ2FjY2Vzc190b2tlbicpKSB7XHJcbiAgICAgICAgYXhpb3MuZ2V0KCcvYXBpL2F1dGgvY3VycmVudCcsIHtcclxuICAgICAgICAgIGhlYWRlcnM6IHtcclxuICAgICAgICAgICAgQXV0aG9yaXphdGlvbjogYEJlYXJlciAke2xvY2FsU3RvcmFnZS5nZXRJdGVtKCdhY2Nlc3NfdG9rZW4nKX1gXHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgfSlcclxuICAgICAgICAgIC50aGVuKHJlcyA9PiB7XHJcbiAgICAgICAgICAgIGNvbW1pdCgnc2V0VXNlcicsIHtcclxuICAgICAgICAgICAgICBuYW1lOiByZXMuZGF0YS51c2VyLm5hbWUsXHJcbiAgICAgICAgICAgICAgZW1haWw6IHJlcy5kYXRhLnVzZXIuZW1haWxfdXNlcnNcclxuICAgICAgICAgICAgfSlcclxuICAgICAgICAgICAgY29uc29sZS5sb2cocmVzKVxyXG4gICAgICAgICAgfSlcclxuICAgICAgICAgIC5jYXRjaChlcnIgPT4ge1xyXG4gICAgICAgICAgICBjb25zb2xlLmxvZyhlcnIucmVzcG9uc2UpXHJcbiAgICAgICAgICB9KVxyXG4gICAgICB9XHJcbiAgICB9LFxyXG4gICAgY2hlY2tFbXBsb3llciAoe2NvbW1pdH0pIHtcclxuICAgICAgaWYgKCEhbG9jYWxTdG9yYWdlLmdldEl0ZW0oJ2FjY2Vzc190b2tlbl9lbXBsb3llcicpKSB7XHJcbiAgICAgICAgYXhpb3MuZ2V0KCcvYXBpL2F1dGgvY3VycmVudCcsIHtcclxuICAgICAgICAgIGhlYWRlcnM6IHtcclxuICAgICAgICAgICAgQXV0aG9yaXphdGlvbjogYEJlYXJlciAke2xvY2FsU3RvcmFnZS5nZXRJdGVtKCdhY2Nlc3NfdG9rZW5fZW1wbG95ZXInKX1gXHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgfSlcclxuICAgICAgICAgIC50aGVuKHJlcyA9PiB7XHJcbiAgICAgICAgICAgIGNvbW1pdCgnc2V0RW1wbG95ZXInLCB7XHJcbiAgICAgICAgICAgICAgdXNlcm5hbWU6IHJlcy5kYXRhLnVzZXIudXNlcm5hbWUsXHJcbiAgICAgICAgICAgICAgY29tcGFueV9uYW1lOiByZXMuZGF0YS51c2VyLmNvbXBhbnlfbmFtZSxcclxuICAgICAgICAgICAgICBlbWFpbDogcmVzLmRhdGEudXNlci5lbWFpbF9lbXBsb3llcnNcclxuICAgICAgICAgICAgfSlcclxuICAgICAgICAgICAgY29uc29sZS5sb2cocmVzKVxyXG4gICAgICAgICAgfSlcclxuICAgICAgICAgIC5jYXRjaChlcnIgPT4ge1xyXG4gICAgICAgICAgICBjb25zb2xlLmxvZyhlcnIucmVzcG9uc2UpXHJcbiAgICAgICAgICB9KVxyXG4gICAgICB9XHJcbiAgICB9XHJcbiAgfSxcclxuICBnZXR0ZXJzOiB7XHJcbiAgICB3ZWxjb21lIChzdGF0ZSkge1xyXG4gICAgICByZXR1cm4gc3RhdGUubWVzc2FnZVxyXG4gICAgfSxcclxuICAgIGdldEp3dCAoc3RhdGUpIHtcclxuICAgICAgcmV0dXJuIHN0YXRlLmp3dFxyXG4gICAgfSxcclxuICAgIGdldEp3dEVtcGxveWVyIChzdGF0ZSkge1xyXG4gICAgICByZXR1cm4gc3RhdGUuand0X2VtcGxveWVyO1xyXG4gICAgfSxcclxuICAgIGdldERpYWxvZyAoc3RhdGUpIHtcclxuICAgICAgcmV0dXJuIHN0YXRlLmRpYWxvZ1xyXG4gICAgfSxcclxuICAgIGdldFNuYWNrYmFyIChzdGF0ZSkge1xyXG4gICAgICByZXR1cm4gc3RhdGUuc25hY2tiYXJcclxuICAgIH0sXHJcbiAgICBnZXRVc2VyIChzdGF0ZSkge1xyXG4gICAgICByZXR1cm4gc3RhdGUudXNlclxyXG4gICAgfSxcclxuICAgIGdldEVtcGxveWVyIChzdGF0ZSkge1xyXG4gICAgICByZXR1cm4gc3RhdGUuZW1wbG95ZXJcclxuICAgIH0sXHJcbiAgICBnZXRMb2FkaW5nIChzdGF0ZSkge1xyXG4gICAgICByZXR1cm4gc3RhdGUubG9hZGluZ1xyXG4gICAgfSxcclxuICAgIGdldEVycm9yIChzdGF0ZSkge1xyXG4gICAgICByZXR1cm4gc3RhdGUuZXJyb3JcclxuICAgIH1cclxuICB9XHJcbn0pO1xyXG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./resources/js/store.js\n");
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.common.js\");\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n/* harmony import */ var iview__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! iview */ \"./node_modules/iview/dist/iview.js\");\n/* harmony import */ var iview__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(iview__WEBPACK_IMPORTED_MODULE_2__);\n\n\n\nvue__WEBPACK_IMPORTED_MODULE_0___default.a.use(vuex__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n/* harmony default export */ __webpack_exports__[\"default\"] = (new vuex__WEBPACK_IMPORTED_MODULE_1__[\"default\"].Store({\n state: {\n message: 'Kittisak Maneewong',\n user: {\n name: null,\n email: null\n },\n employer: {\n username: null,\n company_name: null,\n email: null\n },\n jwt: localStorage.getItem('access_token') || null,\n jwt_employer: localStorage.getItem('access_token_employer') || null,\n dialog: false,\n snackbar: {\n show: false,\n color: null,\n text: null\n },\n loading: false,\n error: null\n },\n mutations: {\n setJwt: function setJwt(state, payload) {\n state.jwt = payload;\n },\n setJwtEmployer: function setJwtEmployer(state, payload) {\n state.jwt_employer = payload;\n },\n setDialog: function setDialog(state, payload) {\n state.dialog = payload;\n },\n setSnackbar: function setSnackbar(state, payload) {\n state.snackbar = payload;\n },\n setUser: function setUser(state, payload) {\n state.user = payload;\n },\n setEmployer: function setEmployer(state, payload) {\n state.employer = payload;\n },\n setLoading: function setLoading(state, payload) {\n state.loading = payload;\n },\n setError: function setError(state, payload) {\n state.error = payload;\n }\n },\n actions: {\n login: function login(_ref, payload) {\n var commit = _ref.commit,\n dispatch = _ref.dispatch;\n return new Promise(function (resolve, reject) {\n commit('setLoading', true);\n axios.post('/api/auth/login', payload).then(function (res) {\n commit('setLoading', false);\n\n if (payload.role == 1) {\n iview__WEBPACK_IMPORTED_MODULE_2___default.a.LoadingBar.finish();\n localStorage.setItem('access_token', res.data.token);\n commit('setJwt', res.data.token);\n dispatch('checkUser');\n } else {\n localStorage.setItem('access_token_employer', res.data.token);\n commit('setJwtEmployer', res.data.token);\n dispatch('checkEmployer');\n }\n\n commit('setSnackbar', {\n show: true,\n color: 'success',\n text: 'เข้าสู่ระบบสำเร็จ!'\n });\n commit('setDialog', false);\n resolve(res);\n console.log(res);\n }).catch(function (err) {\n iview__WEBPACK_IMPORTED_MODULE_2___default.a.LoadingBar.error();\n commit('setLoading', false);\n\n if (err.response.data.error === 'invalid_credentials') {\n if (payload.role === 1) {\n commit('setError', 'อีเมลหรือรหัสผ่านไม่ถูกต้อง');\n } else {\n commit('setError', 'ชื่อผู้ใช้หรือรหัสผ่านไม่ถูกต้อง');\n }\n\n setTimeout(function () {\n commit('setError', null);\n }, 4000);\n }\n\n console.log(err.response);\n reject(err.response);\n });\n });\n },\n register: function register(_ref2, payload) {\n var commit = _ref2.commit;\n return new Promise(function (resolve, reject) {\n commit('setLoading', true);\n axios.post('/api/auth/register', payload).then(function (res) {\n if (payload.role === 1) {\n iview__WEBPACK_IMPORTED_MODULE_2___default.a.LoadingBar.finish();\n }\n\n commit('setLoading', false);\n commit('setSnackbar', {\n show: true,\n color: 'success',\n text: 'ลงทะเบียนสำเร็จ!'\n });\n commit('setDialog', false);\n console.log(res);\n resolve(res);\n }).catch(function (err) {\n iview__WEBPACK_IMPORTED_MODULE_2___default.a.LoadingBar.error();\n commit('setLoading', false);\n console.log(err.response);\n var error = JSON.parse(err.response.data);\n\n if (error.username && error.email) {\n commit('setError', 'ชื่อผู้ใช้เเละอีเมลถูกใช้งานเเล้ว');\n setTimeout(function () {\n commit('setError', null);\n }, 4000);\n } else if (error.email) {\n commit('setError', 'อีเมลนี้ถูกใช้งานเเล้ว');\n setTimeout(function () {\n commit('setError', null);\n }, 4000);\n errorMessage = 'อีเมลนี้ถูกใช้งานเเล้ว';\n } else if (error.username) {\n commit('setError', 'ชื่อผู้ใช้นี้ถูกใช้งานเเล้ว');\n setTimeout(function () {\n commit('setError', null);\n }, 4000);\n errorMessage = 'ชื่อผู้ใช้นี้ถูกใช้งานเเล้ว';\n }\n\n reject(err.response);\n });\n });\n },\n logout: function logout(_ref3) {\n var commit = _ref3.commit;\n iview__WEBPACK_IMPORTED_MODULE_2___default.a.LoadingBar.finish();\n localStorage.removeItem('access_token');\n commit('setUser', {\n name: null,\n email: null\n });\n commit('setSnackbar', {\n show: true,\n color: 'success',\n text: 'ออกจากระบบสำเร็จ!'\n });\n },\n logoutEmployer: function logoutEmployer(_ref4) {\n var commit = _ref4.commit;\n localStorage.removeItem('access_token_employer');\n commit('setEmployer', {\n username: null,\n company_name: null,\n email: null\n });\n commit('setSnackbar', {\n show: true,\n color: 'success',\n text: 'ออกจากระบบสำเร็จ!'\n });\n },\n checkUser: function checkUser(_ref5) {\n var commit = _ref5.commit;\n\n if (!!localStorage.getItem('access_token')) {\n axios.get('/api/auth/current', {\n headers: {\n Authorization: \"Bearer \".concat(localStorage.getItem('access_token'))\n }\n }).then(function (res) {\n commit('setUser', {\n name: res.data.user.name,\n email: res.data.user.email_users\n });\n console.log(res);\n }).catch(function (err) {\n console.log(err.response);\n });\n }\n },\n checkEmployer: function checkEmployer(_ref6) {\n var commit = _ref6.commit;\n\n if (!!localStorage.getItem('access_token_employer')) {\n axios.get('/api/auth/current', {\n headers: {\n Authorization: \"Bearer \".concat(localStorage.getItem('access_token_employer'))\n }\n }).then(function (res) {\n commit('setEmployer', {\n username: res.data.user.username,\n company_name: res.data.user.company_name,\n email: res.data.user.email_employers\n });\n console.log(res);\n }).catch(function (err) {\n console.log(err.response);\n });\n }\n }\n },\n getters: {\n welcome: function welcome(state) {\n return state.message;\n },\n getJwt: function getJwt(state) {\n return state.jwt;\n },\n getJwtEmployer: function getJwtEmployer(state) {\n return state.jwt_employer;\n },\n getDialog: function getDialog(state) {\n return state.dialog;\n },\n getSnackbar: function getSnackbar(state) {\n return state.snackbar;\n },\n getUser: function getUser(state) {\n return state.user;\n },\n getEmployer: function getEmployer(state) {\n return state.employer;\n },\n getLoading: function getLoading(state) {\n return state.loading;\n },\n getError: function getError(state) {\n return state.error;\n }\n }\n}));//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9yZXNvdXJjZXMvanMvc3RvcmUuanM/MjVjZSJdLCJ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AgICAgICAgY29tbWl0KCdzZXRKd3QnLCByZXMuZGF0YS50b2tlbilcclxuICAgICAgICAgICAgZGlzcGF0Y2goJ2NoZWNrVXNlcicpXHJcbiAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICBsb2NhbFN0b3JhZ2Uuc2V0SXRlbSgnYWNjZXNzX3Rva2VuX2VtcGxveWVyJywgcmVzLmRhdGEudG9rZW4pXHJcbiAgICAgICAgICAgIGNvbW1pdCgnc2V0Snd0RW1wbG95ZXInLCByZXMuZGF0YS50b2tlbilcclxuICAgICAgICAgICAgZGlzcGF0Y2goJ2NoZWNrRW1wbG95ZXInKVxyXG4gICAgICAgICAgfVxyXG4gICAgICAgICAgY29tbWl0KCdzZXRTbmFja2JhcicsIHtcclxuICAgICAgICAgICAgc2hvdzogdHJ1ZSxcclxuICAgICAgICAgICAgY29sb3I6ICdzdWNjZXNzJyxcclxuICAgICAgICAgICAgdGV4dDogJ+C5gOC4guC5ieC4suC4quC4ueC5iOC4o+C4sOC4muC4muC4quC4s+C5gOC4o+C5h+C4iCEnXHJcbiAgICAgICAgICB9KVxyXG4gICAgICAgICAgY29tbWl0KCdzZXREaWFsb2cnLCBmYWxzZSlcclxuICAgICAgICAgIHJlc29sdmUocmVzKVxyXG4gICAgICAgICAgY29uc29sZS5sb2cocmVzKVxyXG4gICAgICAgIH0pXHJcbiAgICAgICAgLmNhdGNoKGVyciA9PiB7XHJcbiAgICAgICAgICBpVmlldy5Mb2FkaW5nQmFyLmVycm9yKClcclxuICAgICAgICAgIGNvbW1pdCgnc2V0TG9hZGluZycsIGZhbHNlKVxyXG4gICAgICAgICAgaWYgKGVyci5yZXNwb25zZS5kYXRhLmVycm9yID09PSAnaW52YWxpZF9jcmVkZW50aWFscycpIHtcclxuICAgICAgICAgICAgaWYgKHBheWxvYWQucm9sZSA9PT0gMSkge1xyXG4gICAgICAgICAgICAgIGNvbW1pdCgnc2V0RXJyb3InLCAn4Lit4Li14LmA4Lih4Lil4Lir4Lij4Li34Lit4Lij4Lir4Lix4Liq4Lic4LmI4Liy4LiZ4LmE4Lih4LmI4LiW4Li54LiB4LiV4LmJ4Lit4LiHJylcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICBjb21taXQoJ3NldEVycm9yJywgJ+C4iuC4t+C5iOC4reC4nOC4ueC5ieC5g+C4iuC5ieC4q+C4o+C4t+C4reC4o+C4q+C4seC4quC4nOC5iOC4suC4meC5hOC4oeC5iOC4luC4ueC4geC4leC5ieC4reC4hycpXHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgc2V0VGltZW91dCgoKSA9PiB7XHJcbiAgICAgICAgICAgICAgY29tbWl0KCdzZXRFcnJvcicsIG51bGwpXHJcbiAgICAgICAgICAgIH0sIDQwMDApO1xyXG4gICAgICAgICAgfVxyXG4gICAgICAgICAgY29uc29sZS5sb2coZXJyLnJlc3BvbnNlKVxyXG4gICAgICAgICAgcmVqZWN0KGVyci5yZXNwb25zZSlcclxuICAgICAgICB9KVxyXG4gICAgICB9KVxyXG4gICAgfSxcclxuICAgIHJlZ2lzdGVyICh7Y29tbWl0fSwgcGF5bG9hZCkge1xyXG4gICAgICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUsIHJlamVjdCkgPT4ge1xyXG4gICAgICAgIGNvbW1pdCgnc2V0TG9hZGluZycsIHRydWUpXHJcbiAgICAgICAgYXhpb3MucG9zdCgnL2FwaS9hdXRoL3JlZ2lzdGVyJywgcGF5bG9hZClcclxuICAgICAgICAgIC50aGVuKHJlcyA9PiB7XHJcbiAgICAgICAgICAgIGlmIChwYXlsb2FkLnJvbGUgPT09IDEpIHtcclxuICAgICAgICAgICAgICBpVmlldy5Mb2FkaW5nQmFyLmZpbmlzaCgpXHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgY29tbWl0KCdzZXRMb2FkaW5nJywgZmFsc2UpXHJcbiAgICAgICAgICAgIGNvbW1pdCgnc2V0U25hY2tiYXInLCB7XHJcbiAgICAgICAgICAgICAgc2hvdzogdHJ1ZSxcclxuICAgICAgICAgICAgICBjb2xvcjogJ3N1Y2Nlc3MnLFxyXG4gICAgICAgICAgICAgIHRleHQ6ICfguKXguIfguJfguLDguYDguJrguLXguKLguJnguKrguLPguYDguKPguYfguIghJ1xyXG4gICAgICAgICAgICB9KVxyXG4gICAgICAgICAgICBjb21taXQoJ3NldERpYWxvZycsIGZhbHNlKVxyXG4gICAgICAgICAgICBjb25zb2xlLmxvZyhyZXMpXHJcbiAgICAgICAgICAgIHJlc29sdmUocmVzKVxyXG4gICAgICAgICAgfSlcclxuICAgICAgICAgIC5jYXRjaChlcnIgPT4ge1xyXG4gICAgICAgICAgICBpVmlldy5Mb2FkaW5nQmFyLmVycm9yKClcclxuICAgICAgICAgICAgY29tbWl0KCdzZXRMb2FkaW5nJywgZmFsc2UpXHJcbiAgICAgICAgICAgIGNvbnNvbGUubG9nKGVyci5yZXNwb25zZSlcclxuICAgICAgICAgICAgY29uc3QgZXJyb3IgPSBKU09OLnBhcnNlKGVyci5yZXNwb25zZS5kYXRhKTtcclxuICAgICAgICAgICAgaWYgKGVycm9yLnVzZXJuYW1lICYmIGVycm9yLmVtYWlsKSB7XHJcbiAgICAgICAgICAgICAgY29tbWl0KCdzZXRFcnJvcicsICfguIrguLfguYjguK3guJzguLnguYnguYPguIrguYnguYDguYDguKXguLDguK3guLXguYDguKHguKXguJbguLnguIHguYPguIrguYnguIfguLLguJnguYDguYDguKXguYnguKcnKVxyXG4gICAgICAgICAgICAgIHNldFRpbWVvdXQoKCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgY29tbWl0KCdzZXRFcnJvcicsIG51bGwpXHJcbiAgICAgICAgICAgICAgfSwgNDAwMCk7XHJcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoZXJyb3IuZW1haWwpIHtcclxuICAgICAgICAgICAgICBjb21taXQoJ3NldEVycm9yJywgJ+C4reC4teC5gOC4oeC4peC4meC4teC5ieC4luC4ueC4geC5g+C4iuC5ieC4h+C4suC4meC5gOC5gOC4peC5ieC4pycpXHJcbiAgICAgICAgICAgICAgc2V0VGltZW91dCgoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICBjb21taXQoJ3NldEVycm9yJywgbnVsbClcclxuICAgICAgICAgICAgICB9LCA0MDAwKTtcclxuICAgICAgICAgICAgICBlcnJvck1lc3NhZ2UgPSAn4Lit4Li14LmA4Lih4Lil4LiZ4Li14LmJ4LiW4Li54LiB4LmD4LiK4LmJ4LiH4Liy4LiZ4LmA4LmA4Lil4LmJ4LinJ1xyXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGVycm9yLnVzZXJuYW1lKSB7XHJcbiAgICAgICAgICAgICAgY29tbWl0KCdzZXRFcnJvcicsICfguIrguLfguYjguK3guJzguLnguYnguYPguIrguYnguJnguLXguYnguJbguLnguIHguYPguIrguYnguIfguLLguJnguYDguYDguKXguYnguKcnKVxyXG4gICAgICAgICAgICAgIHNldFRpbWVvdXQoKCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgY29tbWl0KCdzZXRFcnJvcicsIG51bGwpXHJcbiAgICAgICAgICAgICAgfSwgNDAwMCk7XHJcbiAgICAgICAgICAgICAgZXJyb3JNZXNzYWdlID0gJ+C4iuC4t+C5iOC4reC4nOC4ueC5ieC5g+C4iuC5ieC4meC4teC5ieC4luC4ueC4geC5g+C4iuC5ieC4h+C4suC4meC5gOC5gOC4peC5ieC4pydcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICByZWplY3QoZXJyLnJlc3BvbnNlKVxyXG4gICAgICAgICAgfSlcclxuICAgICAgfSlcclxuICAgIH0sXHJcbiAgICBsb2dvdXQgKHtjb21taXR9KSB7XHJcbiAgICAgIGlWaWV3LkxvYWRpbmdCYXIuZmluaXNoKClcclxuICAgICAgbG9jYWxTdG9yYWdlLnJlbW92ZUl0ZW0oJ2FjY2Vzc190b2tlbicpXHJcbiAgICAgIGNvbW1pdCgnc2V0VXNlcicsIHtcclxuICAgICAgICBuYW1lOiBudWxsLFxyXG4gICAgICAgIGVtYWlsOiBudWxsXHJcbiAgICAgIH0pXHJcbiAgICAgIGNvbW1pdCgnc2V0U25hY2tiYXInLCB7XHJcbiAgICAgICAgc2hvdzogdHJ1ZSxcclxuICAgICAgICBjb2xvcjogJ3N1Y2Nlc3MnLFxyXG4gICAgICAgIHRleHQ6ICfguK3guK3guIHguIjguLLguIHguKPguLDguJrguJrguKrguLPguYDguKPguYfguIghJ1xyXG4gICAgICB9KVxyXG4gICAgfSxcclxuICAgIGxvZ291dEVtcGxveWVyICh7Y29tbWl0fSkge1xyXG4gICAgICBsb2NhbFN0b3JhZ2UucmVtb3ZlSXRlbSgnYWNjZXNzX3Rva2VuX2VtcGxveWVyJylcclxuICAgICAgY29tbWl0KCdzZXRFbXBsb3llcicsIHtcclxuICAgICAgICB1c2VybmFtZTogbnVsbCxcclxuICAgICAgICBjb21wYW55X25hbWU6IG51bGwsXHJcbiAgICAgICAgZW1haWw6IG51bGxcclxuICAgICAgfSlcclxuICAgICAgY29tbWl0KCdzZXRTbmFja2JhcicsIHtcclxuICAgICAgICBzaG93OiB0cnVlLFxyXG4gICAgICAgIGNvbG9yOiAnc3VjY2VzcycsXHJcbiAgICAgICAgdGV4dDogJ+C4reC4reC4geC4iOC4suC4geC4o+C4sOC4muC4muC4quC4s+C5gOC4o+C5h+C4iCEnXHJcbiAgICAgIH0pXHJcbiAgICB9LFxyXG4gICAgY2hlY2tVc2VyICh7Y29tbWl0fSkge1xyXG4gICAgICBpZiAoISFsb2NhbFN0b3JhZ2UuZ2V0SXRlbSgnYWNjZXNzX3Rva2VuJykpIHtcclxuICAgICAgICBheGlvcy5nZXQoJy9hcGkvYXV0aC9jdXJyZW50Jywge1xyXG4gICAgICAgICAgaGVhZGVyczoge1xyXG4gICAgICAgICAgICBBdXRob3JpemF0aW9uOiBgQmVhcmVyICR7bG9jYWxTdG9yYWdlLmdldEl0ZW0oJ2FjY2Vzc190b2tlbicpfWBcclxuICAgICAgICAgIH1cclxuICAgICAgICB9KVxyXG4gICAgICAgICAgLnRoZW4ocmVzID0+IHtcclxuICAgICAgICAgICAgY29tbWl0KCdzZXRVc2VyJywge1xyXG4gICAgICAgICAgICAgIG5hbWU6IHJlcy5kYXRhLnVzZXIubmFtZSxcclxuICAgICAgICAgICAgICBlbWFpbDogcmVzLmRhdGEudXNlci5lbWFpbF91c2Vyc1xyXG4gICAgICAgICAgICB9KVxyXG4gICAgICAgICAgICBjb25zb2xlLmxvZyhyZXMpXHJcbiAgICAgICAgICB9KVxyXG4gICAgICAgICAgLmNhdGNoKGVyciA9PiB7XHJcbiAgICAgICAgICAgIGNvbnNvbGUubG9nKGVyci5yZXNwb25zZSlcclxuICAgICAgICAgIH0pXHJcbiAgICAgIH1cclxuICAgIH0sXHJcbiAgICBjaGVja0VtcGxveWVyICh7Y29tbWl0fSkge1xyXG4gICAgICBpZiAoISFsb2NhbFN0b3JhZ2UuZ2V0SXRlbSgnYWNjZXNzX3Rva2VuX2VtcGxveWVyJykpIHtcclxuICAgICAgICBheGlvcy5nZXQoJy9hcGkvYXV0aC9jdXJyZW50Jywge1xyXG4gICAgICAgICAgaGVhZGVyczoge1xyXG4gICAgICAgICAgICBBdXRob3JpemF0aW9uOiBgQmVhcmVyICR7bG9jYWxTdG9yYWdlLmdldEl0ZW0oJ2FjY2Vzc190b2tlbl9lbXBsb3llcicpfWBcclxuICAgICAgICAgIH1cclxuICAgICAgICB9KVxyXG4gICAgICAgICAgLnRoZW4ocmVzID0+IHtcclxuICAgICAgICAgICAgY29tbWl0KCdzZXRFbXBsb3llcicsIHtcclxuICAgICAgICAgICAgICB1c2VybmFtZTogcmVzLmRhdGEudXNlci51c2VybmFtZSxcclxuICAgICAgICAgICAgICBjb21wYW55X25hbWU6IHJlcy5kYXRhLnVzZXIuY29tcGFueV9uYW1lLFxyXG4gICAgICAgICAgICAgIGVtYWlsOiByZXMuZGF0YS51c2VyLmVtYWlsX2VtcGxveWVyc1xyXG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=\n//# sourceURL=webpack-internal:///./resources/js/store.js\n");
/***/ }),
......@@ -4,15 +4,7 @@ window._ = require('lodash');
window.axios = require('axios');
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
let token = document.head.querySelector('meta[name="csrf-token"]');
if (token) {
window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;
} else {
console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');
}
window.axios.defaults.baseUrl = 'http://localhost:8000/';
import Vue from 'vue';
import Vuetify from 'vuetify';
......@@ -24,8 +16,6 @@ import store from './store';
import 'iview/dist/styles/iview.css';
// Vue.config.productionTip = false;
Vue.use(Vuetify);
Vue.use(iView);
......
......@@ -57,7 +57,7 @@ export default new Vuex.Store({
login ({commit, dispatch}, payload) {
return new Promise((resolve, reject) => {
commit('setLoading', true)
axios.post('api/auth/login', payload)
axios.post('/api/auth/login', payload)
.then(res => {
commit('setLoading', false)
if (payload.role == 1) {
......@@ -100,7 +100,7 @@ export default new Vuex.Store({
register ({commit}, payload) {
return new Promise((resolve, reject) => {
commit('setLoading', true)
axios.post('api/auth/register', payload)
axios.post('/api/auth/register', payload)
.then(res => {
if (payload.role === 1) {
iView.LoadingBar.finish()
......
......@@ -4,7 +4,7 @@
<meta charset="utf-8">
<!-- <meta name="viewport" content="width=device-width, initial-scale=1"> -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui">
<meta name="csrf-token" content="{{ csrf_token() }}">
<!-- <meta name="csrf-token" content="{{ csrf_token() }}"> -->
<title>CO-OP Search</title>
......
......@@ -12,9 +12,3 @@
*/
Route::get('/{any}', 'AppController@index')->where('any', '.*');
\ No newline at end of file
Route::group(['prefix' => 'employer/api/auth'], function ($router) {
Route::post('register', 'AuthController@register');
Route::post('login', 'AuthController@login');
Route::get('current', 'AuthController@getAuthenticatedUser');
});
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment