Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
apaas-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
gzga-jzapi
apaas-ui
Commits
745f347c
Commit
745f347c
authored
Apr 26, 2022
by
张俊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
放开登录限制页面
parent
11661c9c
Pipeline
#75117
passed with stage
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
6 deletions
+40
-6
.beagle.yml
.beagle.yml
+1
-1
build/conf.yaml
build/conf.yaml
+2
-1
build/dockerfile
build/dockerfile
+11
-3
src/router/index.js
src/router/index.js
+26
-1
No files found.
.beagle.yml
View file @
745f347c
...
...
@@ -50,7 +50,7 @@ pipeline:
dns
:
223.5.5.5
volumes
:
-
/var/run/docker.sock:/var/run/docker.sock
base
:
hub.wodcloud.com/wod/ui-base:2.0-apaasv3
base
:
registry.cn-qingdao.aliyuncs.com/wod-devops/ui-base:2.0-sjjy
dockerfile
:
.beagle/dockerfile
repo
:
gzgajzapi/apaas-ui
version
:
v3.0.1
...
...
build/conf.yaml
View file @
745f347c
index
:
/apaas/ui/
login
:
/iam/login/#/login
logout
:
/iam/api/logout
\ No newline at end of file
logout
:
/iam/api/logout
exts
:
[
"
/services_shop"
,
"
/shop"
]
\ No newline at end of file
build/dockerfile
View file @
745f347c
FROM
{{ BASEIMAGE }}
MAINTAINER
{{ AUTHOR }}
LABEL
Author={{ AUTHOR }} Name={{ PROJECT }} Version={{ VERSION }}
ARG
BASE
FROM
$BASE
ARG
AUTHOR
ARG
VERSION
LABEL
maintainer=${AUTHOR} version=${VERSION}
ARG
TARGETOS
ARG
TARGETARCH
ADD
./dist /www
ADD
./build/conf.yaml /www/conf.yaml
\ No newline at end of file
src/router/index.js
View file @
745f347c
import
Vue
from
"
vue
"
;
import
Router
from
"
vue-router
"
;
import
{
getCookie
}
from
'
../utils/common
'
Vue
.
use
(
Router
);
...
...
@@ -10,7 +11,7 @@ Router.prototype.push = function push(location, onResolve, onReject) {
return
originalPush
.
call
(
this
,
location
).
catch
((
err
)
=>
err
);
};
export
default
new
Router
({
var
router
=
new
Router
({
scrollBehavior
(
to
,
from
,
savedPosition
)
{
return
{
x
:
0
,
y
:
0
}
},
...
...
@@ -848,3 +849,27 @@ export default new Router({
},
],
});
router
.
beforeEach
(
async
(
to
,
from
,
next
)
=>
{
let
_user
=
getCookie
(
'
bgToken
'
)
let
_path
=
to
.
path
;
// 访问的页面
if
(
_user
)
{
next
();
}
else
if
(
_path
===
""
||
_path
===
"
/
"
||
_path
===
"
/home
"
||
_path
===
"
/search
"
||
_path
===
"
/cart
"
||
_path
.
indexOf
(
"
/services_shop
"
)
===
0
||
_path
.
indexOf
(
"
/shop
"
)
===
0
)
{
next
();
}
else
{
// ElementUI.Message.error(`未登录无法访问该页面`);
next
(
"
/
"
);
}
});
// 导航守卫
export
default
router
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