Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
million
Project
Project
Details
Activity
Releases
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
viitto
million
Commits
1fb41ca8
Commit
1fb41ca8
authored
Jul 09, 2020
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
881997f7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
72 additions
and
35 deletions
+72
-35
login.vue
src/pages/login.vue
+72
-35
No files found.
src/pages/login.vue
View file @
1fb41ca8
<
style
>
.login-box
{
.login-box
{
max-width
:
420px
;
padding
:
50px
40px
;
margin
:
40px
auto
;
background-color
:
#fff
;
border-radius
:
5px
;
background-clip
:
padding-box
;
box-shadow
:
0
2px
4px
0
rgba
(
10
,
8
,
8
,
.5
);
box-shadow
:
0
2px
4px
0
rgba
(
10
,
8
,
8
,
.5
);
}
.login-box
.tw_logo
{
margin
:
0
auto
20px
;
.login-box
.tw_logo
{
margin
:
0
auto
20px
;
display
:
block
;
height
:
45px
;
width
:
auto
;
height
:
45px
;
width
:
auto
;
}
.login-box
.tip-text
{
.login-box
.tip-text
{
font-size
:
16px
;
margin-bottom
:
15px
;
color
:
#999
;
text-align
:
center
;
}
.login-box
.tip-text
a
{
color
:
#00afff
;
.login-box
.tip-text
a
{
color
:
#00afff
;
}
.login_row
{
width
:
100%
;
margin
:
0
-15px
0
-15px
;
.login_row
{
width
:
100%
;
margin
:
0
-15px
0
-15px
;
}
.form-group
{
.form-group
{
position
:
relative
;
margin-bottom
:
15px
;
}
.login_labelName
{
margin-bottom
:
10px
;
font-size
:
15px
;
.login_labelName
{
margin-bottom
:
10px
;
font-size
:
15px
;
}
/* .login_pwd{
padding-right:40px;
} */
.form-group
i
{
.form-group
i
{
position
:
absolute
;
right
:
6px
;
bottom
:
0
;
z-index
:
2
;
width
:
46px
;
height
:
46px
;
right
:
6px
;
bottom
:
0
;
z-index
:
2
;
width
:
46px
;
height
:
46px
;
text-align
:
center
;
line-height
:
46px
;
color
:
#999
;
font-size
:
28px
;
color
:
#999
;
font-size
:
28px
;
cursor
:
pointer
;
}
.login-box
.q-field__control
{
height
:
46px
;
.login-box
.q-field__control
{
height
:
46px
;
}
</
style
>
<
template
>
<div
class=
"login"
>
<div
class=
"login-box"
>
<img
:src=
"logo"
class=
"tw_logo"
/>
<img
:src=
"logo"
class=
"tw_logo"
/>
<p
class=
"tip-text"
>
還沒有帳號嗎?立即
<a
style=
"cursor:pointer;"
@
click=
"CommonJump('/register',
{})">免費加入
</a>
</p>
<div
class=
"login_row"
>
<div
class=
"form-group"
>
<div
class=
"login_labelName"
>
電子郵件
</div>
<q-input
outlined
v-model=
"loginMsg.account"
class=
"bg-grey-1"
/>
<q-input
outlined
v-model=
"loginMsg.account"
class=
"bg-grey-1"
/>
</div>
<div
class=
"form-group"
>
<div
class=
"login_labelName"
>
密碼
</div>
<q-input
v-if=
"flag==1"
outlined
v-model=
"loginMsg.password"
type=
"text"
ref=
"pwd"
class=
"bg-grey-1 login_pwd"
/>
<q-input
v-if=
"flag==2"
outlined
v-model=
"loginMsg.password"
type=
"password"
ref=
"pwd"
class=
"bg-grey-1 login_pwd"
/>
<q-input
v-if=
"flag==1"
outlined
v-model=
"loginMsg.password"
type=
"text"
ref=
"pwd"
class=
"bg-grey-1 login_pwd"
/>
<q-input
v-if=
"flag==2"
outlined
v-model=
"loginMsg.password"
type=
"password"
ref=
"pwd"
class=
"bg-grey-1 login_pwd"
/>
<i
class=
"iconfont iconyanjing_xianshi"
v-if=
"flag==1"
@
click=
"flag=2"
></i>
<i
class=
"iconfont iconbiyan"
v-if=
"flag==2"
@
click=
"flag=1"
></i>
</div>
<div>
<q-btn
color=
"primary"
unelevated
style=
"width:100%;height:50px;margin-top:20px;"
filled
label=
"登入"
@
click=
"login"
/>
<q-btn
color=
"primary"
unelevated
style=
"width:100%;height:50px;margin-top:20px;"
filled
label=
"登入"
@
click=
"login"
/>
</div>
</div>
</div>
...
...
@@ -95,8 +107,8 @@
account
:
"13022941970"
,
password
:
"123456"
},
logo
:
''
,
flag
:
2
logo
:
''
,
flag
:
2
};
},
created
()
{
...
...
@@ -113,13 +125,38 @@
},
methods
:
{
login
()
{
if
(
this
.
loginMsg
.
account
==
''
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
message
:
'请输入账号'
,
position
:
'top'
,
timeout
:
2000
,
// 以毫秒为单位; 0意味着没有超时
})
return
;
}
if
(
this
.
loginMsg
.
password
==
''
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
message
:
'请输入密码'
,
position
:
'top'
,
timeout
:
2000
,
// 以毫秒为单位; 0意味着没有超时
})
return
;
}
this
.
apipost
(
"b2b_post_Login"
,
this
.
loginMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
var
jsonData
=
JSON
.
stringify
(
res
.
data
.
data
);
window
.
localStorage
.
setItem
(
"b2bUser"
,
jsonData
);
this
.
CommonJump
(
'/index'
,{})
this
.
CommonJump
(
'/index'
,
{})
}
else
{
this
.
$q
.
notify
({
type
:
'negative'
,
message
:
res
.
data
.
message
,
position
:
'top'
,
timeout
:
2000
,
// 以毫秒为单位; 0意味着没有超时
})
}
},
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