Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
motorCity
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
node_server
motorCity
Commits
4c2e0f62
Commit
4c2e0f62
authored
Aug 24, 2022
by
孙香冬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
688e8a5b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
4 deletions
+13
-4
serverConfig.xml
serverConfig.xml
+7
-3
serverConfig.ts
src/config/serverConfig.ts
+6
-1
No files found.
serverConfig.xml
View file @
4c2e0f62
...
...
@@ -14,7 +14,11 @@
<broken>
3
</broken>
<token>
09a98bc555474e058ef90b6cc6e23638
</token>
</mapView>
<imagePath>
192.168.0.100
</imagePath>
<imagePath>
192.168.0.100
</imagePath>
<mapCenter>
<lng>
121.183574
</lng>
<lat>
31.291126
</lat>
</mapCenter>
<zoom>
14
</zoom>
<surveillanceVideo>
http://10.51.50.53:8278/live/13060200882000000001@31011402601318800184@34020000001320000001.m3u8?vhost=bduv0utmss4c3nzidjn.a.e-web.com.cn
</surveillanceVideo>
</config>
src/config/serverConfig.ts
View file @
4c2e0f62
...
...
@@ -19,6 +19,9 @@ export let mongoServerConstVal;
export
let
mySqlConfig
;
let
imagePathConfig
=
""
;
let
mapCenter
=
""
;
let
zoom
=
""
;
let
surveillanceVideo
=
""
;
const
ConfigName
=
"serverConfig.xml"
;
export
async
function
initConfig
()
{
...
...
@@ -40,7 +43,7 @@ export async function initConfig() {
}
if
(
!
getConf
(
imagePath
)
)
throw
new
SysError
(
SYSTEMERRORENUM
.
初始化配置失败
,
'serverConfig.xml中 缺少 imagePath'
);
if
(
!
getConf
(
mapCenter
)
)
throw
new
SysError
(
SYSTEMERRORENUM
.
初始化配置失败
,
'serverConfig.xml中 缺少 mapCenter'
);
port
=
portConfig
[
0
];
socketPort
=
socketPortConfig
[
0
];
//左屏
...
...
@@ -55,6 +58,8 @@ export async function initConfig() {
appConfig
.
rightView
=
rightView
[
0
];
//图片地址
imagePathConfig
=
imagePath
[
0
];
//地图中心点
mapCenter
=
}
console
.
log
(
"config init success"
);
...
...
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