Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-customization-system
/
micro-portal
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit b060298d
authored
Aug 01, 2023
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'v1.22.0' into 'master'
V1.22.0版本需求已上线合并代码到master See merge request
!32
2 parents
8f3600f9
d6dc9d7a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
68 additions
and
15 deletions
src/views/Login.vue
src/views/Login.vue
View file @
b060298
...
...
@@ -2,7 +2,12 @@
<el-container
class=
"container"
>
<div
class=
"login_page"
>
<div
class=
"login_header"
>
<img
class=
"home-logo-img"
:src=
"logoPath"
:key=
"logoPath"
alt=
"company-logo"
>
<img
class=
"home-logo-img"
:src=
"logoPath"
:key=
"logoPath"
alt=
"company-logo"
/>
<span
class=
"home-logo-title"
>
{{
homeTitle
}}
</span>
</div>
<div
class=
"login_box"
>
...
...
@@ -16,22 +21,49 @@
<!--
<h1
class=
"login-title"
>
{{
title
}}
</h1>
-->
<el-form>
<el-form-item
class=
"username-wrapper"
prop=
"name"
>
<el-input
class=
"login-input username-input"
placeholder=
"请输入用户名"
maxLength=
"50"
v-model=
"formInline.user"
>
<el-input
class=
"login-input username-input"
placeholder=
"请输入用户名"
maxLength=
"50"
v-model=
"formInline.user"
>
</el-input>
</el-form-item>
<el-form-item
class=
"form-wrapper pwd-wrapper"
prop=
"pass"
>
<el-input
class=
"login-input"
placeholder=
"请输入密码"
v-model=
"formInline.password"
maxLength=
"20"
show-password
autocomplete=
"off"
>
<el-input
class=
"login-input"
placeholder=
"请输入密码"
v-model=
"formInline.password"
maxLength=
"20"
show-password
autocomplete=
"off"
>
</el-input>
</el-form-item>
<el-form-item
class=
"login-button-wrapper"
>
<el-checkbox
class=
"check_tips"
v-model=
"checked"
>
请阅读并同意
<a
href=
"https://img02.glsx.com.cn/weapp/resource/saas/scrm/html/privacy.html"
target=
"_blank"
>
《隐私协议》
</a>
和
<a
href=
"https://img02.glsx.com.cn/weapp/resource/saas/scrm/html/agreement.html"
target=
"_blank"
>
《用户协议》
</a></el-checkbox>
<el-button
class=
"login-button"
type=
"primary"
html-type=
"submit"
:disabled=
"!checked"
@
keyup
.
enter=
"handleSubmit"
@
click
.
native
.
prevent=
"handleSubmit"
>
<el-checkbox
class=
"check_tips"
v-model=
"checked"
>
请阅读并同意
<a
href=
"https://img02.glsx.com.cn/weapp/resource/saas/scrm/html/privacy.html"
target=
"_blank"
>
《隐私协议》
</a
>
和
<a
href=
"https://img02.glsx.com.cn/weapp/resource/saas/scrm/html/agreement.html"
target=
"_blank"
>
《用户协议》
</a
></el-checkbox
>
<el-button
class=
"login-button"
type=
"primary"
html-type=
"submit"
:disabled=
"!checked"
@
keyup
.
enter=
"handleSubmit"
@
click
.
native
.
prevent=
"handleSubmit"
>
登录
</el-button>
</el-form-item>
<el-form-item>
</el-form-item>
<el-form-item>
</el-form-item>
</el-form>
</div>
</div>
...
...
@@ -41,7 +73,6 @@
Copyright ©2012-2023 粤ICP备12034057号 深圳广联数科科技有限公司 版权所有
</div>
</div>
</el-container>
</
template
>
...
...
@@ -84,7 +115,7 @@ export default {
},
title
:
store
.
state
.
app
.
title
,
logo
:
store
.
state
.
app
.
logo
,
checked
:
false
checked
:
false
,
});
let
logoPath
=
store
.
state
.
app
.
logo
;
...
...
@@ -142,11 +173,24 @@ export default {
// params: captcha, captchaId 验证码暂时屏蔽
store
.
dispatch
(
"app/showLoading"
,
true
);
const
params
=
{
account
:
user
,
password
};
let
uuid
=
localStorage
.
getItem
(
"uuid"
);
let
isUpdate
=
false
if
(
!
uuid
)
{
uuid
=
createUuid
();
isUpdate
=
true
}
params
.
specialMark
=
uuid
;
console
.
log
(
params
);
await
loginService
.
loginAction
(
params
).
then
(
(
res
)
=>
{
store
.
dispatch
(
"app/showLoading"
,
false
);
if
(
res
.
code
===
200
)
{
const
{
token
,
user
}
=
res
.
data
;
// 是否更新uuid
if
(
isUpdate
){
localStorage
.
setItem
(
"uuid"
,
uuid
);
}
store
.
dispatch
(
"app/setUserInfo"
,
user
);
store
.
dispatch
(
"app/setToken"
,
token
);
}
else
{
...
...
@@ -166,6 +210,15 @@ export default {
);
};
// 生成uuid
const
createUuid
=
()
=>
{
return
"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx"
.
replace
(
/
[
xy
]
/g
,
function
(
c
)
{
var
r
=
(
Math
.
random
()
*
16
)
|
0
,
v
=
c
==
"x"
?
r
:
(
r
&
0x3
)
|
0x8
;
return
v
.
toString
(
16
);
});
};
watch
(
()
=>
store
.
state
.
app
.
logo
,
(
n
,
o
)
=>
{
...
...
@@ -343,11 +396,11 @@ export default {
}
}
.check_tips
{
color
:
#fff
;
a
{
color
:
#0077ff
;
}
.check_tips
{
color
:
#fff
;
a
{
color
:
#0077ff
;
}
}
</
style
>
<
style
scoped
>
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment