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
02899b44
authored
2023-04-06 14:14:30 +0800
by
renchao@pashanhoo.com
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
style:titile和登录
1 parent
a383b8db
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
13 additions
and
9 deletions
public/config.json
public/index.html
src/main.js
src/settings.js
src/views/loginjg/index.vue
src/views/loginsb/index.vue
vue.config.js
public/config.json
View file @
02899b4
{
"TITLE"
:
"汉中市数据上报系统"
,
"THEME"
:
"
sb
"
,
"LOGIN"
:
"
sb
"
,
"CODE"
:
"BDC
SB
PT"
,
"THEME"
:
"
jg
"
,
"LOGIN"
:
"
jg
"
,
"CODE"
:
"BDC
JG
PT"
,
"AREARMAP"
:
"610702"
,
"SERVERAPI"
:
"/bdcsjsb"
,
"calcHeight"
:
160
,
...
...
public/index.html
View file @
02899b4
<!--
* @Description: 引入配置文件
* @Autor: renchao
* @LastEditTime: 2023-0
3-15 17:16:18
* @LastEditTime: 2023-0
4-06 14:06:07
-->
<!DOCTYPE html>
<html>
...
...
@@ -25,6 +25,7 @@
</html>
<script>
console
.
log
(
webpackConfig
.
name
,
'webpackConfig.name'
);
window
.
baseUrl
=
location
.
origin
||
location
.
protocol
+
'//'
+
location
.
host
window
.
timeout
=
5000
window
.
authorization
=
"bearer AT-4-MxSrO29Coe7VTazx8uuixtqqgO-hvCB6"
...
...
src/main.js
View file @
02899b4
...
...
@@ -2,7 +2,7 @@
* @Author: yangwei
* @Date: 2023-01-16 09:10:12
* @LastEditors: Please set LastEditors
* @LastEditTime: 2023-0
3-27 16:54:34
* @LastEditTime: 2023-0
4-06 14:12:53
* @FilePath: \bdcjg-web\src\main.js
* @Description:
*
...
...
@@ -60,6 +60,7 @@ axios.get("./config.json")
.
then
((
res
)
=>
{
Vue
.
prototype
.
BASE_API
=
res
.
data
localStorage
.
setItem
(
'ApiUrl'
,
JSON
.
stringify
(
res
.
data
));
window
.
TITLE
=
res
.
data
.
TITLE
require
(
'./permission'
)
new
Vue
({
el
:
'#app'
,
...
...
src/settings.js
View file @
02899b4
/*
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-0
3-15 11:08:56
* @LastEditTime: 2023-0
4-06 11:26:31
*/
module
.
exports
=
{
title
:
'数据上报系统'
,
/**
* @type {boolean} true | false
* @description Whether show the settings right-panel
...
...
src/views/loginjg/index.vue
View file @
02899b4
...
...
@@ -63,6 +63,8 @@ export default {
localStorage
.
setItem
(
"token"
,
`Bearer
${
res
.
content
}
`
);
//登录成功后需判断有无重定向,没有重定向则跳转首页
this
.
$router
.
replace
(
this
.
$route
.
query
.
redirect
||
"/home"
);
}
else
{
this
.
$message
.
error
(
res
.
message
);
}
}
})
...
...
src/views/loginsb/index.vue
View file @
02899b4
...
...
@@ -122,6 +122,8 @@ export default {
{
path
:
"*"
,
redirect
:
"/404"
,
hidden
:
true
},
]);
this
.
$router
.
replace
(
this
.
$route
.
query
.
redirect
||
path1
);
}
else
{
this
.
$message
.
error
(
res
.
message
);
}
}
})
...
...
vue.config.js
View file @
02899b4
'use strict'
const
path
=
require
(
'path'
)
const
defaultSettings
=
require
(
'./src/settings.js'
)
function
resolve
(
dir
)
{
return
path
.
join
(
__dirname
,
dir
)
}
const
name
=
defaultSettings
.
title
const
name
=
process
.
env
.
TITLE
const
port
=
process
.
env
.
port
||
process
.
env
.
npm_config_port
||
8888
// dev port
// All configuration item explanations can be find in https://cli.vuejs.org/config/
module
.
exports
=
{
...
...
Please
register
or
sign in
to post a comment