Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
R
remarketing-yunying
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yaobeibei
remarketing-yunying
Commits
3b610cb6
Commit
3b610cb6
authored
Jul 24, 2018
by
yaobeibei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add login
parent
15b196a9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
32 deletions
+7
-32
login.vue
src/components/login.vue
+7
-32
No files found.
src/components/login.vue
View file @
3b610cb6
...
...
@@ -39,40 +39,15 @@
},
mounted
()
{
// const self = this
// if (localStorage.getItem('sureLogin')) {
// self.onSubmit()
// }
let
self
=
this
document
.
onkeydown
=
function
(
event
)
{
var
e
=
event
||
window
.
event
;
if
(
e
&&
e
.
keyCode
==
13
)
{
self
.
login
({
userEmail
:
self
.
from
.
userEmail
,
password
:
self
.
from
.
password
})
}
};
},
methods
:
{
// onSubmit () {
// let self = this
// if (self.from.userName && self.from.password) {
// fetch('/api/login', {
// method: 'POST',
// headers: {'Content-Type': 'application/json;charset=UTF-8'},
// body: JSON.stringify(self.from)
// }).then(res => { return res.json() }).then(data => {
// console.log(data)
// if (data.status === 230) {
// sessionStorage.setItem('sureLogin', data.id)
// this.$router.push({path: '/'})
// } else {
// this.$message({
// showClose: true,
// message: data.message,
// type: 'error'
// })
// }
// })
// } else {
// this.$message({
// showClose: true,
// message: '请输入账号密码',
// type: 'error'
// })
// }
// },
...
mapActions
([
'login'
])
...
...
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