Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
W
web-site
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
张冬
web-site
Commits
8a31f95c
Commit
8a31f95c
authored
Oct 19, 2020
by
吴冠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
search
parent
ba4e057e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
19 deletions
+30
-19
header.vue
components/header.vue
+3
-5
homeinput.vue
components/homeinput.vue
+10
-0
user.vue
pages/login/user.vue
+17
-14
No files found.
components/header.vue
View file @
8a31f95c
...
...
@@ -4,7 +4,7 @@
<div
class=
"flex-between content bg"
>
<div
class=
"flex-item"
>
<div
class=
"flex-item"
>
<img
src=
"~/assets/head/home-fill.png"
class=
"home-fill"
alt=
"logo"
></img
>
<img
src=
"~/assets/head/home-fill.png"
class=
"home-fill"
alt=
"logo"
/
>
<nuxt-link
to=
"/"
class=
"head-title t1"
>
首页
</nuxt-link>
</div>
<div
class=
"welcome t1"
>
...
...
@@ -33,12 +33,10 @@
import
{
getSecond
}
from
'@/common/list.js'
import
Cookies
from
'js-cookie'
export
default
{
created
(){
},
mounted
(){
let
tokenStr
=
Cookies
.
get
(
"token"
)
console
.
log
(
1234567890
)
console
.
log
(
1234567890
)
console
.
log
(
tokenStr
+
"-------------"
)
if
(
tokenStr
){
this
.
getSecond
()
...
...
components/homeinput.vue
View file @
8a31f95c
...
...
@@ -24,6 +24,16 @@
<
script
>
import
Cookies
from
"js-cookie"
export
default
{
mounted
(){
let
_that
=
this
;
document
.
onkeypress
=
function
(
e
)
{
var
keycode
=
document
.
all
?
event
.
keyCode
:
e
.
which
;
if
(
keycode
==
13
)
{
_that
.
toSearch
();
// 登录方法名
return
false
;
}
};
},
methods
:{
toSearch
(){
Cookies
.
set
(
"inputContent"
,
this
.
input
)
...
...
pages/login/user.vue
View file @
8a31f95c
...
...
@@ -19,7 +19,7 @@
</el-input>
</el-form-item>
<div
class=
"login-btn"
>
<el-button
v-on:keyup
.
13
.
native=
"submit"
type=
"primary"
@
click=
"submitForm1()"
style=
"width: 100%;"
>
登录
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm1()"
style=
"width: 100%;"
>
登录
</el-button>
</div>
</el-form>
<!-- 手机验证码验证 -->
...
...
@@ -35,7 +35,7 @@
<div
v-show=
"!Verification"
class=
"phonecode"
><span>
{{
timer
}}
</span>
秒后重新获取
</div>
</div>
<div
class=
"login-btn"
>
<el-button
v-on:keyup
.
13
.
native=
"submit"
type=
"primary"
@
click=
"submitForm2()"
style=
"width: 100%;"
>
登录
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm2()"
style=
"width: 100%;"
>
登录
</el-button>
</div>
</el-form>
<div
class=
"login-font flex-between"
>
...
...
@@ -94,20 +94,23 @@
};
},
mounted
(){
var
_this
=
this
;
document
.
onkeydown
=
function
(
e
)
{
let
key
=
window
.
event
.
keyCode
;
if
(
key
==
13
)
{
_this
.
submitForm1
();
let
that
=
this
;
document
.
onkeypress
=
function
(
e
)
{
var
keycode
=
document
.
all
?
event
.
keyCode
:
e
.
which
;
if
(
keycode
==
13
)
{
that
.
submitForm1
();
// 登录方法名
return
false
;
}
};
var
_that
=
this
;
document
.
onkeydown
=
function
(
e
)
{
let
key
=
window
.
event
.
keyCode
;
if
(
key
==
13
)
{
_that
.
submitForm2
();
}
let
_that
=
this
;
document
.
onkeypress
=
function
(
e
)
{
var
keycode
=
document
.
all
?
event
.
keyCode
:
e
.
which
;
if
(
keycode
==
13
)
{
_that
.
submitForm2
();
// 登录方法名
return
false
;
}
};
};
},
methods
:
{
handleClick
(
tab
,
event
)
{
...
...
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