Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
CO-OP Search
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kittisak Maneewong
CO-OP Search
Commits
ce6d75f5
Commit
ce6d75f5
authored
Apr 07, 2019
by
Kittisak Maneewong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://projectcs.sci.ubu.ac.th/Kittisak162/co-op-search
parents
d81253de
2fd2a0ee
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
route.js
resources/js/route.js
+2
-2
Account.vue
resources/js/views/Account.vue
+9
-3
No files found.
resources/js/route.js
View file @
ce6d75f5
...
@@ -7,7 +7,7 @@ import AppLayout from './layouts/AppLayout.vue';
...
@@ -7,7 +7,7 @@ import AppLayout from './layouts/AppLayout.vue';
import
EmployerLayout
from
'./layouts/EmployerLayout.vue'
;
import
EmployerLayout
from
'./layouts/EmployerLayout.vue'
;
import
Home
from
'./views/Home.vue'
;
import
Home
from
'./views/Home.vue'
;
import
Login
from
'./views/Login
.vue'
;
import
Account
from
'./views/Account
.vue'
;
import
LoginEmployer
from
'./views/LoginEmployer.vue'
;
import
LoginEmployer
from
'./views/LoginEmployer.vue'
;
import
PageNotFound
from
'./views/PageNotFound.vue'
;
import
PageNotFound
from
'./views/PageNotFound.vue'
;
...
@@ -44,7 +44,7 @@ export default new VueRouter({
...
@@ -44,7 +44,7 @@ export default new VueRouter({
{
{
path
:
'account'
,
path
:
'account'
,
name
:
'account'
,
name
:
'account'
,
component
:
Login
component
:
Account
},
},
{
{
path
:
'*'
,
path
:
'*'
,
...
...
resources/js/views/
Login
.vue
→
resources/js/views/
Account
.vue
View file @
ce6d75f5
...
@@ -109,10 +109,9 @@ export default {
...
@@ -109,10 +109,9 @@ export default {
},
},
methods
:
{
methods
:
{
login
()
{
login
()
{
axios
.
post
(
'/login'
,
this
.
loginData
)
axios
.
post
(
'
api/auth
/login'
,
this
.
loginData
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
console
.
log
(
res
.
body
)
this
.
$router
.
push
(
'/'
)
this
.
$router
.
push
(
'/'
)
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
...
@@ -120,7 +119,7 @@ export default {
...
@@ -120,7 +119,7 @@ export default {
})
})
},
},
register
()
{
register
()
{
axios
.
post
(
'/register'
,
{
axios
.
post
(
'
api/auth
/register'
,
{
name
:
this
.
registerData
.
first_name
+
' '
+
this
.
registerData
.
last_name
,
name
:
this
.
registerData
.
first_name
+
' '
+
this
.
registerData
.
last_name
,
email
:
this
.
registerData
.
email
,
email
:
this
.
registerData
.
email
,
password
:
this
.
registerData
.
password
,
password
:
this
.
registerData
.
password
,
...
@@ -128,6 +127,13 @@ export default {
...
@@ -128,6 +127,13 @@ export default {
})
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
this
.
$router
.
push
(
'/account'
);
this
.
$router
.
push
(
'/account'
);
this
.
registerData
=
{
first_name
:
''
,
last_name
:
''
,
email
:
''
,
password
:
''
,
password_confirmation
:
''
}
console
.
log
(
res
)
console
.
log
(
res
)
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment