Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bdc
/
bdcjg-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
c7c6dddb
authored
2023-03-24 16:55:01 +0800
by
任超
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat:配置文件修改
1 parent
48d6b506
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
9 deletions
public/config.json
src/App.vue
src/api/config.js
src/utils/theme.js
public/config.json
View file @
c7c6ddd
{
"TITLE"
:
"汉中市数据上报系统"
,
"THEME"
:
"
jg
"
,
"THEME"
:
"
sb
"
,
"SERVERAPI"
:
"/bdcsjsb"
,
"MANAGEMENTAPI"
:
"http://192.168.2.
236
/management"
"MANAGEMENTAPI"
:
"http://192.168.2.
38:8090
/management"
}
\ No newline at end of file
...
...
src/App.vue
View file @
c7c6ddd
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-03-24 15:07:01
-->
<
template
>
<div
id=
"app"
>
<router-view
/>
...
...
src/api/config.js
View file @
c7c6ddd
/*
* @Description: 这个是所有api的前缀配置文件
* @Autor: renchao
* @LastEditTime: 2023-03-2
1 16:26:55
* @LastEditTime: 2023-03-2
4 16:51:18
*/
export
default
{
SERVERAPI
:
'/bdcsjsb'
,
//赵千
MANAGEMENTAPI
:
'http://192.168.2.
236
/management'
MANAGEMENTAPI
:
'http://192.168.2.
38:8090
/management'
}
\ No newline at end of file
...
...
src/utils/theme.js
View file @
c7c6ddd
/*
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-03-24 1
3:47:33
* @LastEditTime: 2023-03-24 1
6:44:54
*/
import
Vue
from
'vue'
export
default
function
getTheme
(
theme
=
Vue
.
prototype
.
BASE_API
.
THEME
)
{
const
resultMap
=
{
'jg'
:
function
()
{
import
(
"@/styles/jgPublic.scss"
)
return
import
(
"@/styles/jgPublic.scss"
);
},
'sb'
:
function
()
{
import
(
"@/styles/sbPublic.scss"
)
return
import
(
"@/styles/sbPublic.scss"
);
},
default
:
function
()
{
'default'
:
function
()
{
throw
new
Error
(
`Unsupported theme:
${
theme
}
`
);
},
};
const
result
=
resultMap
[
theme
]();
if
(
result
instanceof
Promise
)
{
return
result
;
}
else
{
return
resultMap
.
default
();
}
return
resultMap
[
theme
]()
||
resultMap
.
default
()
}
\ No newline at end of file
...
...
Please
register
or
sign in
to post a comment