Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nuxtjschat
Overview
Overview
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
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nguyễn Đức Huy
nuxtjschat
Commits
88543c41
Commit
88543c41
authored
Jan 04, 2021
by
Nguyễn Đức Huy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pull at 4 1
parent
0d7b7b70
Pipeline
#1165
failed with stages
in 0 seconds
Changes
5
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
1 deletions
+27
-1
.eslintrc.js
+0
-0
package.json
+1
-1
pages/login.vue
+6
-0
pages/register/index.vue
+6
-0
store/index.js
+14
-0
No files found.
.eslintrc.js
View file @
88543c41
This diff is collapsed.
Click to expand it.
package.json
View file @
88543c41
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
},
},
"lint-staged"
:
{
"lint-staged"
:
{
"*.{js,jsx,ts,tsx}"
:
[
"*.{js,jsx,ts,tsx}"
:
[
"prettier --write"
,
"prettier --write
--fix
"
,
"eslint --fix"
,
"eslint --fix"
,
"git add"
"git add"
],
],
...
...
pages/login.vue
View file @
88543c41
...
@@ -70,6 +70,12 @@ export default {
...
@@ -70,6 +70,12 @@ export default {
alert
(
'Login Success !'
)
alert
(
'Login Success !'
)
// window.location.href = '/'
// window.location.href = '/'
})
})
.
catch
(
function
(
error
)
{
if
(
error
.
response
)
{
alert
(
'Login Fail !'
)
console
.
log
(
error
.
response
.
data
)
}
})
},
},
},
},
}
}
...
...
pages/register/index.vue
View file @
88543c41
...
@@ -80,6 +80,12 @@ export default {
...
@@ -80,6 +80,12 @@ export default {
alert
(
'Register Success, please login'
)
alert
(
'Register Success, please login'
)
window
.
location
.
href
=
'/'
window
.
location
.
href
=
'/'
})
})
.
catch
(
function
(
error
)
{
if
(
error
.
response
)
{
alert
(
'Login Fail !'
)
console
.
log
(
error
.
response
.
data
)
}
})
}
else
{
}
else
{
alert
(
"repassword don't match with password"
)
alert
(
"repassword don't match with password"
)
}
}
...
...
store/index.js
View file @
88543c41
// import vuex from "vuex"
// const createStore = () => {
// return new vuex.Store({
// state: {
// token: null,
// },
// mutations: {
// setToken(state, token) {
// state.token = token
// },
// },
// })
// }
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