Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas3-fe
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas3-fe
Commits
d6d11a65
Commit
d6d11a65
authored
Dec 28, 2021
by
guxukai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: query-wrapper完善
parent
cbb7678a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
27 deletions
+24
-27
index.vue
src/pages/entry/views/fixed/login/index.vue
+1
-0
index.vue
src/pages/entry/views/fixed/proxy/index.vue
+23
-25
default-layout.vue
src/shared/layouts/default-layout.vue
+0
-2
No files found.
src/pages/entry/views/fixed/login/index.vue
View file @
d6d11a65
...
...
@@ -72,6 +72,7 @@ const layoutStore = useLayout()
const
$router
=
useRouter
()
const
captchaUrl
=
ref
(
`
${
process
.
env
.
API_PREFIX
}
/api/kaptcha/kaptcha`
)
const
authLoginForm
=
reactive
(
new
AuthLoginPostReq
({}))
authStore
.
$reset
()
const
rules
:
any
=
{
username
:
{
required
:
helpers
.
withMessage
(
'用户名不能为空'
,
required
)
},
password
:
{
required
:
helpers
.
withMessage
(
'密码不能为空'
,
required
)
},
...
...
src/pages/entry/views/fixed/proxy/index.vue
View file @
d6d11a65
...
...
@@ -18,31 +18,29 @@ const {
loading
:
userLoading
,
error
:
userError
,
run
:
userRun
,
}
=
useRequest
(
()
=>
UserToken
.
get
({
token
:
authStore
.
loginInfo
.
token
,
}).
then
(
res
=>
{
if
(
res
.
code
===
GATEWAY_CODE
.
success
)
{
userStore
.
$patch
({
userInfo
:
res
.
data
})
//超管跳转
if
(
authStore
.
loginInfo
.
id
===
10000000
)
{
authStore
.
$patch
({
consoleInfo
:
{
consoleName
:
'超管'
,
consoleObjectId
:
'1'
,
consoleTypeId
:
'1'
,
},
})
window
.
location
.
replace
(
`
${
origin
}
/super/proxy`
)
return
}
//其余跳转
authStore
.
$reset
()
window
.
location
.
replace
(
`
${
origin
}
/account/proxy`
)
}
=
useRequest
(()
=>
UserToken
.
get
({
token
:
authStore
.
loginInfo
.
token
,
}).
then
(
res
=>
{
if
(
res
.
code
===
GATEWAY_CODE
.
success
)
{
userStore
.
$patch
({
userInfo
:
res
.
data
})
//超管跳转
if
(
authStore
.
loginInfo
.
id
===
10000000
)
{
authStore
.
$patch
({
consoleInfo
:
{
consoleName
:
'超管'
,
consoleObjectId
:
'1'
,
consoleTypeId
:
'1'
,
},
})
window
.
location
.
replace
(
`
${
origin
}
/super/proxy`
)
return
}
return
res
}),
{
manual
:
true
},
//其余跳转
authStore
.
$reset
()
window
.
location
.
replace
(
`
${
origin
}
/account/proxy`
)
}
return
res
}),
)
</
script
>
src/shared/layouts/default-layout.vue
View file @
d6d11a65
...
...
@@ -222,8 +222,6 @@ const {
const
handleLogout
=
()
=>
{
logoutRun
().
then
(
res
=>
{
if
(
res
?.
code
===
GATEWAY_CODE
.
success
)
{
const
authStore
=
useAuth
()
authStore
.
$reset
()
window
.
location
.
replace
(
window
.
location
.
origin
+
'/entry/login'
)
}
else
{
MessageUtils
.
warning
(
res
?.
message
)
...
...
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