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
48cf9aa3
Commit
48cf9aa3
authored
Dec 29, 2021
by
guxukai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: proxy调整
parent
97283f57
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
33 additions
and
55 deletions
+33
-55
index.ts
src/pages/federation/router/index.ts
+1
-1
routes.json
src/pages/organization/json/routes.json
+0
-45
index.ts
src/pages/organization/router/index.ts
+1
-1
index.vue
src/pages/organization/views/fixed/proxy/index.vue
+24
-2
index.ts
src/pages/super/router/index.ts
+1
-1
index.ts
src/pages/system/router/index.ts
+1
-1
index.vue
src/shared/components/global/query-wrapper/index.vue
+5
-3
index.vue
src/shared/layouts/components/console-menu/index.vue
+0
-1
No files found.
src/pages/federation/router/index.ts
View file @
48cf9aa3
...
@@ -28,7 +28,7 @@ const routes = [
...
@@ -28,7 +28,7 @@ const routes = [
{
{
path
:
'/proxy'
,
path
:
'/proxy'
,
name
:
'proxy'
,
name
:
'proxy'
,
component
:
()
=>
import
(
'@
account
/views/fixed/proxy/index.vue'
),
component
:
()
=>
import
(
'@
federation
/views/fixed/proxy/index.vue'
),
},
},
...
SYSTEM_ROUTES
,
...
SYSTEM_ROUTES
,
]
]
...
...
src/pages/organization/json/routes.json
View file @
48cf9aa3
...
@@ -12,51 +12,6 @@
...
@@ -12,51 +12,6 @@
"icon"
:
"401"
,
"icon"
:
"401"
,
"showInAsideMenu"
:
true
"showInAsideMenu"
:
true
}
}
},
{
"path"
:
"admin"
,
"name"
:
"admin"
,
"meta"
:
{
"title"
:
"管理员"
,
"level"
:
1
,
"icon"
:
"401"
,
"showInAsideMenu"
:
true
},
"children"
:
[
{
"path"
:
""
,
"name"
:
"admin-list"
,
"meta"
:
{
"element"
:
"admin/index.vue"
,
"title"
:
"列表"
,
"level"
:
2
,
"icon"
:
"401"
,
"showInAsideMenu"
:
true
}
},
{
"path"
:
"create"
,
"name"
:
"admin-create"
,
"meta"
:
{
"element"
:
"admin/create.vue"
,
"title"
:
"新建"
,
"level"
:
2
,
"icon"
:
"401"
,
"showInAsideMenu"
:
false
}
},
{
"path"
:
"edit/:id"
,
"name"
:
"admin-edit"
,
"meta"
:
{
"element"
:
"admin/edit.vue"
,
"title"
:
"编辑"
,
"level"
:
2
,
"icon"
:
"401"
,
"showInAsideMenu"
:
false
}
}
]
}
}
]
]
}
}
src/pages/organization/router/index.ts
View file @
48cf9aa3
...
@@ -28,7 +28,7 @@ const routes = [
...
@@ -28,7 +28,7 @@ const routes = [
{
{
path
:
'/proxy'
,
path
:
'/proxy'
,
name
:
'proxy'
,
name
:
'proxy'
,
component
:
()
=>
import
(
'@
account
/views/fixed/proxy/index.vue'
),
component
:
()
=>
import
(
'@
organization
/views/fixed/proxy/index.vue'
),
},
},
...
SYSTEM_ROUTES
,
...
SYSTEM_ROUTES
,
]
]
...
...
src/pages/organization/views/fixed/proxy/index.vue
View file @
48cf9aa3
<
template
>
<
template
>
<
div></div
>
<
g-query-wrapper
:data=
"menuData"
:loading=
"menuLoading"
:error=
"menuError"
:run=
"menuRun"
/
>
</
template
>
</
template
>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
useRouter
}
from
'vue-router'
import
{
useRouter
}
from
'vue-router'
import
{
useRequest
}
from
'vue-request'
import
{
AuthMenuInfo
}
from
'@shared/models/auth-service/AuthMenuInfo'
import
{
useUser
}
from
'@shared/store/modules/user'
import
{
useAuth
}
from
'@shared/store/modules/auth'
import
{
GATEWAY_CODE
}
from
'@shared/http/constants'
const
$router
=
useRouter
()
const
$router
=
useRouter
()
$router
.
push
({
name
:
'home'
})
const
userStore
=
useUser
()
const
authStore
=
useAuth
()
const
{
data
:
menuData
,
loading
:
menuLoading
,
error
:
menuError
,
run
:
menuRun
,
}
=
useRequest
(()
=>
AuthMenuInfo
.
get
({
objectId
:
authStore
.
consoleInfo
.
consoleObjectId
,
userId
:
userStore
.
userInfo
.
id
,
}).
then
(
res
=>
{
if
(
res
.
code
===
GATEWAY_CODE
.
success
)
{
$router
.
push
({
name
:
'home'
})
}
return
res
}),
)
</
script
>
</
script
>
src/pages/super/router/index.ts
View file @
48cf9aa3
...
@@ -28,7 +28,7 @@ const routes = [
...
@@ -28,7 +28,7 @@ const routes = [
{
{
path
:
'/proxy'
,
path
:
'/proxy'
,
name
:
'proxy'
,
name
:
'proxy'
,
component
:
()
=>
import
(
'@
account
/views/fixed/proxy/index.vue'
),
component
:
()
=>
import
(
'@
super
/views/fixed/proxy/index.vue'
),
},
},
...
SYSTEM_ROUTES
,
...
SYSTEM_ROUTES
,
]
]
...
...
src/pages/system/router/index.ts
View file @
48cf9aa3
...
@@ -29,7 +29,7 @@ const routes = [
...
@@ -29,7 +29,7 @@ const routes = [
{
{
path
:
'/proxy'
,
path
:
'/proxy'
,
name
:
'proxy'
,
name
:
'proxy'
,
component
:
()
=>
import
(
'@
account
/views/fixed/proxy/index.vue'
),
component
:
()
=>
import
(
'@
system
/views/fixed/proxy/index.vue'
),
},
},
...
SYSTEM_ROUTES
,
...
SYSTEM_ROUTES
,
]
]
...
...
src/shared/components/global/query-wrapper/index.vue
View file @
48cf9aa3
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
<div>
<div>
<slot
v-if=
"!loading && !error && !hasError"
/>
<slot
v-if=
"!loading && !error && !hasError"
/>
<div
v-if=
"loading"
>
数据获取中...
</div>
<div
v-if=
"loading"
>
数据获取中...
</div>
<template
v-if=
"!loading"
>
<div
v-if=
"error"
>
<div
v-if=
"error"
>
{{
error
}}
{{
error
}}
</div>
</div>
...
@@ -9,14 +10,15 @@
...
@@ -9,14 +10,15 @@
{{
data
.
message
}}
{{
data
.
message
}}
</div>
</div>
<div
v-if=
"error || hasError"
>
<div
v-if=
"error || hasError"
>
<el-button
@
click=
"run
"
>
重新请求
</el-button>
<el-button
@
click=
"run()
"
>
重新请求
</el-button>
</div>
</div>
</
template
>
</div>
</div>
</template>
</template>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
GATEWAY_CODE
}
from
'@shared/http/constants'
import
{
GATEWAY_CODE
}
from
'@shared/http/constants'
import
{
HttpResponse
}
from
'@shared/http/HttpResponse'
import
{
HttpResponse
}
from
'@shared/http/HttpResponse'
import
{
PropType
}
from
'vue'
import
{
computed
,
PropType
}
from
'vue'
const
props
=
defineProps
({
const
props
=
defineProps
({
loading
:
{
loading
:
{
...
@@ -35,5 +37,5 @@ const props = defineProps({
...
@@ -35,5 +37,5 @@ const props = defineProps({
required
:
true
,
required
:
true
,
},
},
})
})
const
hasError
=
props
.
data
&&
props
.
data
?.
code
!==
GATEWAY_CODE
.
success
const
hasError
=
computed
(()
=>
(
props
.
data
?
props
.
data
?.
code
!==
GATEWAY_CODE
.
success
:
false
))
</
script
>
</
script
>
src/shared/layouts/components/console-menu/index.vue
View file @
48cf9aa3
...
@@ -94,7 +94,6 @@ const handleToggleConsole = ({ parent, child }) => {
...
@@ -94,7 +94,6 @@ const handleToggleConsole = ({ parent, child }) => {
2
:
'federation'
,
2
:
'federation'
,
3
:
'organization'
,
3
:
'organization'
,
}
}
userStore
.
$reset
()
window
.
location
.
replace
(
`
${
window
.
location
.
origin
}
/
${
reference
[
parent
.
id
]}
/proxy`
)
window
.
location
.
replace
(
`
${
window
.
location
.
origin
}
/
${
reference
[
parent
.
id
]}
/proxy`
)
}
}
</
script
>
</
script
>
...
...
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