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 142f5b20
authored
Jul 18, 2023
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
登录增加uuid
1 parent
8f3600f9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
61 additions
and
14 deletions
src/views/Login.vue
src/views/Login.vue
View file @
142f5b2
...
@@ -2,7 +2,12 @@
...
@@ -2,7 +2,12 @@
<el-container
class=
"container"
>
<el-container
class=
"container"
>
<div
class=
"login_page"
>
<div
class=
"login_page"
>
<div
class=
"login_header"
>
<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>
<span
class=
"home-logo-title"
>
{{
homeTitle
}}
</span>
</div>
</div>
<div
class=
"login_box"
>
<div
class=
"login_box"
>
...
@@ -16,22 +21,49 @@
...
@@ -16,22 +21,49 @@
<!--
<h1
class=
"login-title"
>
{{
title
}}
</h1>
-->
<!--
<h1
class=
"login-title"
>
{{
title
}}
</h1>
-->
<el-form>
<el-form>
<el-form-item
class=
"username-wrapper"
prop=
"name"
>
<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-input>
</el-form-item>
</el-form-item>
<el-form-item
class=
"form-wrapper pwd-wrapper"
prop=
"pass"
>
<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-input>
</el-form-item>
</el-form-item>
<el-form-item
class=
"login-button-wrapper"
>
<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-checkbox
class=
"check_tips"
v-model=
"checked"
<el-button
class=
"login-button"
type=
"primary"
html-type=
"submit"
:disabled=
"!checked"
@
keyup
.
enter=
"handleSubmit"
@
click
.
native
.
prevent=
"handleSubmit"
>
>
请阅读并同意
<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-button>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</div>
</div>
</div>
</div>
...
@@ -41,7 +73,6 @@
...
@@ -41,7 +73,6 @@
Copyright ©2012-2023 粤ICP备12034057号 深圳广联数科科技有限公司 版权所有
Copyright ©2012-2023 粤ICP备12034057号 深圳广联数科科技有限公司 版权所有
</div>
</div>
</div>
</div>
</el-container>
</el-container>
</
template
>
</
template
>
...
@@ -84,7 +115,7 @@ export default {
...
@@ -84,7 +115,7 @@ export default {
},
},
title
:
store
.
state
.
app
.
title
,
title
:
store
.
state
.
app
.
title
,
logo
:
store
.
state
.
app
.
logo
,
logo
:
store
.
state
.
app
.
logo
,
checked
:
false
checked
:
false
,
});
});
let
logoPath
=
store
.
state
.
app
.
logo
;
let
logoPath
=
store
.
state
.
app
.
logo
;
...
@@ -142,6 +173,13 @@ export default {
...
@@ -142,6 +173,13 @@ export default {
// params: captcha, captchaId 验证码暂时屏蔽
// params: captcha, captchaId 验证码暂时屏蔽
store
.
dispatch
(
"app/showLoading"
,
true
);
store
.
dispatch
(
"app/showLoading"
,
true
);
const
params
=
{
account
:
user
,
password
};
const
params
=
{
account
:
user
,
password
};
let
uuid
=
localStorage
.
getItem
(
"uuid"
);
if
(
!
uuid
)
{
uuid
=
createUuid
();
}
params
.
specialMark
=
uuid
;
console
.
log
(
params
)
await
loginService
.
loginAction
(
params
).
then
(
await
loginService
.
loginAction
(
params
).
then
(
(
res
)
=>
{
(
res
)
=>
{
store
.
dispatch
(
"app/showLoading"
,
false
);
store
.
dispatch
(
"app/showLoading"
,
false
);
...
@@ -166,6 +204,15 @@ export default {
...
@@ -166,6 +204,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
(
watch
(
()
=>
store
.
state
.
app
.
logo
,
()
=>
store
.
state
.
app
.
logo
,
(
n
,
o
)
=>
{
(
n
,
o
)
=>
{
...
@@ -343,11 +390,11 @@ export default {
...
@@ -343,11 +390,11 @@ export default {
}
}
}
}
.check_tips
{
.check_tips
{
color
:
#fff
;
color
:
#fff
;
a
{
a
{
color
:
#0077ff
;
color
:
#0077ff
;
}
}
}
}
</
style
>
</
style
>
<
style
scoped
>
<
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