Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
so-manage-ui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
smart-operation
so-manage-ui
Commits
e887ae72
Commit
e887ae72
authored
Jun 20, 2023
by
赵伟庚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
登录跳转首页;密码框明文密文切换;更换菜单id;注释消息中心sdk
parent
6621cf06
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
32 deletions
+34
-32
src/App.vue
src/App.vue
+3
-1
src/components/login-by-account.vue
src/components/login-by-account.vue
+16
-13
src/components/login-by-code.vue
src/components/login-by-code.vue
+15
-18
No files found.
src/App.vue
View file @
e887ae72
...
...
@@ -98,7 +98,7 @@ export default {
},
userInfo
:
{
handler
()
{
this
.
initMsg
();
//
this.initMsg();
},
deep
:
true
,
},
...
...
@@ -126,6 +126,8 @@ export default {
this
.
readFlag
=
!
this
.
readFlag
;
},
initMsg
()
{
console
.
log
(
this
.
userInfo
);
console
.
log
(
this
.
$trace
);
if
(
this
.
userInfo
&&
this
.
userInfo
.
system_id
)
{
this
.
$trace
.
setOptionValue
(
"
userId
"
,
this
.
userInfo
.
system_id
);
// this.$trace.setOptionValue('userType',this.userInfo.userType)
...
...
src/components/login-by-account.vue
View file @
e887ae72
...
...
@@ -2,20 +2,22 @@
<div
class=
"login-by-account"
>
<el-form
ref=
"loginFormRef"
label-position=
"top"
:model=
"loginForm"
:rules=
"steploginFormRules"
>
<el-form-item
prop=
"userid"
>
<el-input
v-model=
"loginForm.userid"
placeholder=
"请输入账号"
@
keyup.enter
.native
=
"loginAction()"
/>
<el-input
v-model=
"loginForm.userid"
placeholder=
"请输入账号"
@
keyup.enter=
"loginAction()"
/>
</el-form-item>
<el-form-item
prop=
"password"
>
<el-input
:type=
"hidePassword ? 'password' : 'text'"
v-model=
"loginForm.password"
placeholder=
"请输入密码"
@
keyup.enter.native=
"loginAction()"
>
<span
slot=
"suffix"
:title=
"hidePassword ? '显示密码' : '隐藏密码'"
:class=
"hidePassword ? 'hide-password' : 'show-password'"
@
click=
"hidePassword = !hidePassword"
style=
"cursor: pointer"
></span>
@
keyup.enter=
"loginAction()"
>
<template
#suffix
>
<span
:title=
"!hidePassword ? '隐藏密码' : '显示密码'"
>
<bg-icon
@
click=
"hidePassword = !hidePassword"
style=
"font-size: 16px; color: #a9b1c7; cursor: pointer"
:icon=
"hidePassword ? '#bg-ic-eye' : '#bg-ic-eye-close'"
></bg-icon>
</span>
</
template
>
</el-input>
</el-form-item>
<el-form-item
prop=
"yzm"
>
...
...
@@ -23,7 +25,7 @@
<el-input
v-model=
"loginForm.yzm"
placeholder=
"请输入验证码"
@
keyup.enter
.native
=
"loginAction()"
@
keyup.enter=
"loginAction()"
style=
"width: 240px"
/>
<div
class=
"yzm_img"
>
<img
title=
"看不清?换一张"
:src=
"imgSrc"
@
click=
"getImg()"
style=
"width: 100%"
/>
...
...
@@ -57,6 +59,9 @@ import { ElMessage } from "element-plus";
import
axios
from
"
@/request/http.js
"
;
import
{
Encrypt
}
from
"
@/services/secret.js
"
;
import
{
useStore
}
from
"
vuex
"
;
import
{
useRouter
}
from
"
vue-router
"
;
const
router
=
useRouter
();
const
state
=
reactive
({
loginForm
:
{
...
...
@@ -125,7 +130,7 @@ const getMenu = (search) => {
return
axios
.
get
(
`/apaas/system/v5/menu/user/tree?search=
${
search
}
`
);
};
const
getUser
=
()
=>
{
Promise
.
all
([
getUserInfo
(),
getMenu
(
"
dadb2d3f-e263-48d1-9389-42acb9ea49f8
"
)]).
then
((
res
)
=>
{
Promise
.
all
([
getUserInfo
(),
getMenu
(
"
79a8f214-db78-4db7-9c28-db66276b4be2
"
)]).
then
((
res
)
=>
{
if
(
res
[
0
].
data
.
code
==
200
&&
res
[
1
].
data
.
code
==
200
)
{
let
data
=
(
res
[
1
].
data
.
data
&&
res
[
1
].
data
.
data
[
0
].
children
)
||
[];
store
.
commit
(
"
setUserInfo
"
,
res
[
0
].
data
.
data
);
...
...
@@ -143,9 +148,7 @@ const getUser = () => {
store
.
commit
(
"
setMenuObj
"
,
menuObj
);
// }
generateRoutes
();
// this.$router.push("/");
//跳转到工作台页面
window
.
location
.
href
=
"
/apaas/portal/ui/#/
"
;
router
.
push
(
"
/
"
);
}
});
};
...
...
src/components/login-by-code.vue
View file @
e887ae72
...
...
@@ -6,14 +6,14 @@
v-model=
"loginForm.mobile"
autofocus=
"autofocus"
placeholder=
"请输入手机号码"
@
keyup.enter
.native
=
"loginAction()"
/>
@
keyup.enter=
"loginAction()"
/>
</el-form-item>
<el-form-item
prop=
"code"
>
<div
class=
"msg-code"
>
<el-input
v-model=
"loginForm.code"
placeholder=
"请输入验证码"
@
keyup.enter
.native
=
"loginAction()"
@
keyup.enter=
"loginAction()"
style=
"width: 280px"
>
</el-input>
<div
class=
"yzm_img"
>
...
...
@@ -34,9 +34,7 @@
</div>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click.prevent=
"loginAction()"
style=
"width: 100%"
>
登 录
</el-button>
<el-button
type=
"primary"
@
click.prevent=
"loginAction()"
style=
"width: 100%"
>
登 录
</el-button>
</el-form-item>
<el-form-item>
<el-button
class=
"register_btn"
@
click.prevent=
"$emit('register')"
style=
"width: 100%"
>
...
...
@@ -58,6 +56,9 @@ import { generateRoutes } from "../router/index";
import
{
ElMessage
}
from
"
element-plus
"
;
import
axios
from
"
@/request/http.js
"
;
import
{
useStore
}
from
"
vuex
"
;
import
{
useRouter
}
from
"
vue-router
"
;
const
router
=
useRouter
();
const
validatePhone
=
(
rule
,
value
,
callback
)
=>
{
const
reg
=
/^
(?:(?:\+
|00
)
86
)?
1
[
3-9
]\d{9}
$/
;
...
...
@@ -93,15 +94,13 @@ const loginFormRef = ref(null);
const
getMsgCode
=
()
=>
{
loginFormRef
.
value
.
validateField
(
"
mobile
"
,
(
valid
)
=>
{
if
(
valid
)
{
axios
.
post
(
"
/apaas/system/v5/sms/verifyCode
"
,
{
phone
:
state
.
loginForm
.
mobile
})
.
then
(({
data
})
=>
{
if
(
data
.
code
==
200
)
{
countDownAction
();
}
else
{
ElMessage
.
error
(
data
.
data
);
}
});
axios
.
post
(
"
/apaas/system/v5/sms/verifyCode
"
,
{
phone
:
state
.
loginForm
.
mobile
}).
then
(({
data
})
=>
{
if
(
data
.
code
==
200
)
{
countDownAction
();
}
else
{
ElMessage
.
error
(
data
.
data
);
}
});
}
});
};
// 获取验证码
...
...
@@ -149,7 +148,7 @@ const getMenu = (search) => {
return
axios
.
get
(
`/apaas/system/v5/menu/user/tree?search=
${
search
}
`
);
};
const
getUser
=
()
=>
{
Promise
.
all
([
getUserInfo
(),
getMenu
(
"
dadb2d3f-e263-48d1-9389-42acb9ea49f8
"
)]).
then
((
res
)
=>
{
Promise
.
all
([
getUserInfo
(),
getMenu
(
"
79a8f214-db78-4db7-9c28-db66276b4be2
"
)]).
then
((
res
)
=>
{
if
(
res
[
0
].
data
.
code
==
200
&&
res
[
1
].
data
.
code
==
200
)
{
let
data
=
(
res
[
1
].
data
.
data
&&
res
[
1
].
data
.
data
[
0
].
children
)
||
[];
store
.
commit
(
"
setUserInfo
"
,
res
[
0
].
data
.
data
);
...
...
@@ -167,9 +166,7 @@ const getUser = () => {
store
.
commit
(
"
setMenuObj
"
,
menuObj
);
// }
generateRoutes
();
// this.$router.push("/");
//跳转到工作台页面
window
.
location
.
href
=
"
/apaas/portal/ui/#/
"
;
router
.
push
(
"
/
"
);
}
});
};
...
...
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