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
49bb997f
Commit
49bb997f
authored
6 years ago
by
Kittisak Maneewong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make to better
parent
cb96a4e7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
11 deletions
+5
-11
Snackbar.vue
resources/js/components/Snackbar.vue
+1
-0
Login.vue
resources/js/views/Login.vue
+4
-11
No files found.
resources/js/components/Snackbar.vue
View file @
49bb997f
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
v-model=
"show"
v-model=
"show"
:color=
"color"
:color=
"color"
:timeout=
"6000"
:timeout=
"6000"
top
>
>
{{
text
}}
{{
text
}}
<v-btn
<v-btn
...
...
This diff is collapsed.
Click to expand it.
resources/js/views/Login.vue
View file @
49bb997f
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
color=
"deep-orange darken-4"
color=
"deep-orange darken-4"
type=
"email"
type=
"email"
v-model=
"loginData.email_users"
v-model=
"loginData.email_users"
:rules=
"
clickLogin ? [rules.required, rules.email] : [
]"
:rules=
"
[rules.required, rules.email
]"
required
required
></v-text-field>
></v-text-field>
<v-text-field
<v-text-field
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
:append-icon=
"showPassword ? 'visibility' : 'visibility_off'"
:append-icon=
"showPassword ? 'visibility' : 'visibility_off'"
:type=
"showPassword ? 'text' : 'password'"
:type=
"showPassword ? 'text' : 'password'"
@
click:append=
"showPassword = !showPassword"
@
click:append=
"showPassword = !showPassword"
:rules=
"
clickLogin ? [rules.required] : [
]"
:rules=
"
[rules.required
]"
required
required
></v-text-field>
></v-text-field>
<p
class=
"text-xs-right"
><router-link
to=
"/"
class=
"body-2 font-weight-medium"
>
ลืมรหัสผ่าน?
</router-link></p>
<p
class=
"text-xs-right"
><router-link
to=
"/"
class=
"body-2 font-weight-medium"
>
ลืมรหัสผ่าน?
</router-link></p>
...
@@ -70,7 +70,6 @@ export default {
...
@@ -70,7 +70,6 @@ export default {
role
:
1
role
:
1
},
},
showPassword
:
false
,
showPassword
:
false
,
clickLogin
:
false
,
rules
:
{
rules
:
{
required
:
v
=>
!!
v
||
'จำเป็นต้องกรอก'
,
required
:
v
=>
!!
v
||
'จำเป็นต้องกรอก'
,
email
:
v
=>
/^
(([^
<>()[
\]\\
.,;:
\s
@"
]
+
(\.[^
<>()[
\]\\
.,;:
\s
@"
]
+
)
*
)
|
(
".+"
))
@
((\[[
0-9
]{1,3}\.[
0-9
]{1,3}\.[
0-9
]{1,3}\.[
0-9
]{1,3}
]
)
|
(([
a-zA-Z
\-
0-9
]
+
\.)
+
[
a-zA-Z
]{2,}))
$/
.
test
(
v
)
||
'รูปแบบอีเมลล์ไม่ถูกต้อง'
email
:
v
=>
/^
(([^
<>()[
\]\\
.,;:
\s
@"
]
+
(\.[^
<>()[
\]\\
.,;:
\s
@"
]
+
)
*
)
|
(
".+"
))
@
((\[[
0-9
]{1,3}\.[
0-9
]{1,3}\.[
0-9
]{1,3}\.[
0-9
]{1,3}
]
)
|
(([
a-zA-Z
\-
0-9
]
+
\.)
+
[
a-zA-Z
]{2,}))
$/
.
test
(
v
)
||
'รูปแบบอีเมลล์ไม่ถูกต้อง'
...
@@ -79,16 +78,10 @@ export default {
...
@@ -79,16 +78,10 @@ export default {
},
},
methods
:
{
methods
:
{
login
()
{
login
()
{
this
.
clickLogin
=
true
if
(
this
.
$refs
.
login
.
validate
())
{
if
(
this
.
$refs
.
login
.
validate
()
&&
this
.
loginData
.
email_users
!==
''
&&
this
.
loginData
.
password
!==
''
)
{
this
.
$store
.
dispatch
(
'login'
,
this
.
loginData
)
this
.
$store
.
dispatch
(
'login'
,
this
.
loginData
)
.
then
(
res
=>
{
.
then
(
res
=>
{
this
.
clickLogin
=
false
this
.
$refs
.
login
.
reset
()
this
.
loginData
=
{
email_users
:
''
,
password
:
''
,
role
:
1
}
})
})
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
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