Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bdc
/
bdcdj-web
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
c78c3b0e
authored
2023-06-02 09:48:55 +0800
by
renchao@pashanhoo.com
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
style:cas配置修改
1 parent
0630b8f7
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
9 deletions
public/index.html
src/layout/components/Navbar.vue
src/utils/request.js
vue.config.js
public/index.html
View file @
c78c3b0
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-0
5-30 15:08:51
* @LastEditTime: 2023-0
6-02 09:47:57
-->
<!DOCTYPE html>
<html>
...
...
@@ -14,17 +14,28 @@
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
>
<link
rel=
"shortcut icon"
type=
"image/x-icon"
href=
"./favicon.ico"
/>
<title>
<
%= webpackConfig.name %>
</title>
</head>
<script>
window
.
baseUrl
=
location
.
origin
||
location
.
protocol
+
'//'
+
location
.
host
const
authorization
=
"bearer ATT-7-TiYJVcoDnfhNGs160E6MbQ-QA9Ot3Tby"
window
.
_config
=
{
// 是否微服务模式,业务系统根据需要读取,此demo未使用
cloudEnable
:
false
,
baseUrl
:
location
.
origin
||
location
.
protocol
+
'//'
+
location
.
host
,
// 是否启用单点登录
casEnable
:
true
,
// cas 基地址
casBaseURL
:
'http://192.168.2.38/cas'
,
services
:
{
// 配置到 contextPath 前一级
management
:
'http://192.168.2.38'
,
business
:
'http://localhost:7001'
}
}
fetch
(
'<%= BASE_URL %>config.json'
)
.
then
(
response
=>
response
.
json
())
.
then
(
config
=>
{
window
.
config
=
config
})
;
})
</script>
<body>
...
...
src/layout/components/Navbar.vue
View file @
c78c3b0
...
...
@@ -41,7 +41,7 @@
computed
:
{
...
mapGetters
([
'sidebar'
,
'avatar'
,
'name'
]),
baseUrl
()
{
return
window
.
baseUrl
;
return
window
.
_config
.
baseUrl
;
},
},
data
()
{
...
...
src/utils/request.js
View file @
c78c3b0
...
...
@@ -13,7 +13,7 @@ const service = axios.create({
baseURL
:
process
.
env
.
NODE_ENV
==
"development"
?
process
.
env
.
VUE_APP_BASE_API
:
window
.
baseUrl
+
"/"
,
:
window
.
_config
.
baseUrl
+
"/"
,
withCredentials
:
true
,
//是否允许跨域
headers
:
{
'Content-Type'
:
'application/json; charset=utf-8'
...
...
vue.config.js
View file @
c78c3b0
'use strict'
const
path
=
require
(
'path'
)
const
defaultSettings
=
require
(
'./src/settings.js'
)
function
resolve
(
dir
)
{
return
path
.
join
(
__dirname
,
dir
)
}
...
...
Please
register
or
sign in
to post a comment