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
58f545ae
You need to sign in or sign up before continuing.
Commit
58f545ae
authored
May 05, 2022
by
张俊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
免登录
parent
32b1394d
Pipeline
#75497
passed with stage
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
99 additions
and
12 deletions
+99
-12
.beagle.yml
.beagle.yml
+1
-2
.beagle/dockerfile
.beagle/dockerfile
+2
-8
build/nginx.conf
build/nginx.conf
+75
-0
src/main.js
src/main.js
+16
-0
src/router/index.js
src/router/index.js
+4
-2
static/config/configmap.js
static/config/configmap.js
+1
-0
No files found.
.beagle.yml
View file @
58f545ae
...
...
@@ -50,7 +50,7 @@ pipeline:
dns
:
223.5.5.5
volumes
:
-
/var/run/docker.sock:/var/run/docker.sock
base
:
registry.cn-qingdao.aliyuncs.com/wod
-devops/ui-base:2.0-jzapi
base
:
registry.cn-qingdao.aliyuncs.com/wod
/nginx:1.19.5
dockerfile
:
.beagle/dockerfile
repo
:
gzgajzapi/apaas-ui
version
:
v3.0.1
...
...
@@ -65,7 +65,6 @@ pipeline:
when
:
branch
:
-
dev
## 更换dev生成镜像的名称
harbor
:
image
:
registry.cn-qingdao.aliyuncs.com/wod/devops-docker-tag:1.0
...
...
.beagle/dockerfile
View file @
58f545ae
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
ADD
./dist /usr/share/nginx/html
ADD
./build/nginx.conf /etc/nginx/nginx.conf
\ No newline at end of file
build/nginx.conf
0 → 100644
View file @
58f545ae
user
nginx
;
worker_processes
1
;
error_log
/var/log/nginx/error.log
warn
;
pid
/var/run/nginx.pid
;
events
{
worker_connections
1024
;
}
http
{
include
/etc/nginx/mime.types
;
default_type
application/octet-stream
;
server
{
listen
80
;
listen
[::]:80
;
server_name
localhost
;
absolute_redirect
off
;
#取消绝对路径的重定向
#charset koi8-r;
#access_log /var/log/nginx/host.access.log main;
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page
500
502
503
504
/50x.html
;
location
/klmy/ui
{
root
/usr/share/nginx/html
;
index
index.html
index.htm
;
try_files
$uri
$uri
/
/klmy/ui/index.html
;
}
}
# 开启gzip
gzip
off
;
# 启用gzip压缩的最小文件,小于设置值的文件将不会压缩
gzip_min_length
1k
;
# gzip 压缩级别,1-10,数字越大压缩的越好,也越占用CPU时间,后面会有详细说明
gzip_comp_level
6
;
# 进行压缩的文件类型。javascript有多种形式。其中的值可以在 mime.types 文件中找到。
# 由于jpg,jpeg,png本来就是压缩格式,再行压缩只会消耗cpu资源,帮助并不大
gzip_types
text/plain
application/javascript
application/x-javascript
text/css
application/xml
text/javascript
application/x-httpd-php
image/gif
;
# 是否在http header中添加Vary: Accept-Encoding,建议开启
gzip_vary
on
;
#压缩版本(默认1.1,前端如果是squid2.5请使用1.0)
gzip_http_version
1
.0
;
# 禁用IE 6 gzip
gzip_disable
"MSIE
[1-6]
\
."
;
log_format
main
'
$remote_addr
-
$remote_user
[
$time_local
]
"
$request
"
'
'
$status
$body_bytes_sent
"
$http_referer
"
'
'"
$http_user_agent
"
"
$http_x_forwarded_for
"'
;
access_log
/var/log/nginx/access.log
main
;
sendfile
on
;
#tcp_nopush on;
keepalive_timeout
65
;
#gzip on;
include
/etc/nginx/conf.d/*.conf
;
}
\ No newline at end of file
src/main.js
View file @
58f545ae
...
...
@@ -75,6 +75,20 @@ Vue.use(SuperFlow)
import
api
from
'
./request/api
'
Vue
.
prototype
.
$api
=
api
;
function
getCurrent
(){
api
.
user
.
getNowUser
().
then
(({
data
})
=>
{
if
(
data
.
success
==
1
)
{
store
.
commit
(
"
userInfofun
"
,
data
.
data
);
}
else
{
console
.
log
(
data
.
errMsg
);
}
});
}
// getCurrent()
new
Vue
({
el
:
"
#app
"
,
router
,
...
...
@@ -83,3 +97,5 @@ new Vue({
components
:
{
App
},
template
:
"
<App/>
"
});
src/router/index.js
View file @
58f545ae
import
Vue
from
"
vue
"
;
import
Router
from
"
vue-router
"
;
import
{
getCookie
}
from
'
../utils/common
'
import
store
from
"
@/store
"
;
Vue
.
use
(
Router
);
...
...
@@ -850,10 +851,11 @@ var router = new Router({
],
});
router
.
beforeEach
(
async
(
to
,
from
,
next
)
=>
{
let
_user
=
getCookie
(
'
bgToken
'
)
console
.
log
(
window
.
serviceConfig
);
let
_path
=
to
.
path
;
// 访问的页面
if
(
_user
)
{
if
(
store
.
state
.
userInfo
)
{
next
();
}
else
if
(
_path
===
""
||
...
...
static/config/configmap.js
View file @
58f545ae
...
...
@@ -3,4 +3,5 @@ window.serviceConfig = {
gisPortalSiteName
:
"
portal
"
,
state
:
"
needLogin
"
,
// needLogin / notNeedLogin
cloudServiceRoot
:
'
https://cloud4.wodcloud.com/awecloud/login/#/
'
,
noNeedLoginUrl
:[
'
/
'
,
'
shop
'
]
};
\ No newline at end of file
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