Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
html
/
MeteorologicalBureau
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
866a75f6
authored
Mar 23, 2020
by
hanjixin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of gitlab.maxrocky.com:hanjixin/MeteorologicalBureau
parents
0339d798
6fd2d9d3
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
33 additions
and
22 deletions
+33
-22
dva/.env.development.js
+4
-2
dva/.env.production.js
+3
-1
dva/src/router.js
+1
-1
dva/src/routes/IndexPage.js
+6
-3
dva/src/routes/ue4/Index.js
+1
-1
dva/src/routes/warmingCenter/PublicServiceConstruction.js
+12
-10
dva/src/services/ctr.js
+1
-0
dva/src/utils/index.js
+5
-4
No files found.
dva/.env.development.js
View file @
866a75f6
module
.
exports
=
{
API_URL
:
'//123.57.209.57:8091'
,
CTR_URL
:
'//127.0.01:8900'
API_URL
:
'http://123.57.209.57:8091'
,
CTR_URL
:
'http://172.16.1.249:8900'
// CTR_URL: 'http://127.0.0.1:8900'
}
\ No newline at end of file
dva/.env.production.js
View file @
866a75f6
module
.
exports
=
{
API_URL
:
'test'
API_URL
:
'http://123.57.209.57:8091'
,
CTR_URL
:
'http://172.16.1.249:8900'
}
\ No newline at end of file
dva/src/router.js
View file @
866a75f6
...
...
@@ -25,7 +25,7 @@ function RouterConfig({ history }) {
location
.
query
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'query'
))
}
}
//
checkState(history)
checkState
(
history
)
})
//console.log(generateRouter(config), 'generateRouter(config)}') // 生成的路由表
...
...
dva/src/routes/IndexPage.js
View file @
866a75f6
...
...
@@ -3,12 +3,15 @@ import { connect } from 'dva';
import
styles
from
'./IndexPage.less'
;
import
{
send
}
from
'@/services/ctr'
console
.
log
(
styles
)
function
IndexPage
(
props
)
{
send
(
'/待机
页
'
,
[]).
then
(
res
=>
{
function
IndexPage
(
props
)
{
send
(
'/待机'
,
[]).
then
(
res
=>
{
console
.
log
(
res
)
})
return
(
<
div
className
=
"content"
onClick
=
{()
=>
{
props
.
history
.
push
(
'/home'
)}}
>
<
div
className
=
"content"
onClick
=
{()
=>
{
send
(
'/首页'
,
[])
props
.
history
.
push
(
'/home'
)
}}
>
<
span
className
=
"title"
>
国家预警信息发布中心
<
/span
>
<
/div
>
);
...
...
dva/src/routes/ue4/Index.js
View file @
866a75f6
...
...
@@ -5,7 +5,7 @@ import Layout from '@/components/Layout.js'
import
{
send
}
from
'@/services/ctr'
function
IntroductionWarning
(
props
)
{
send
(
'/首页/动画脚本'
)
send
(
'/首页/动画脚本'
,[]
)
return
(
<
Layout
>
<
div
className
=
"warmingCenter-content animated fadeIn"
>
...
...
dva/src/routes/warmingCenter/PublicServiceConstruction.js
View file @
866a75f6
...
...
@@ -10,22 +10,24 @@ function WarmingCenter(props) {
<
div
className
=
"warmingCenter-content animated fadeIn"
>
<
div
className
=
"common-btn-container"
>
<
div
className
=
"common-btn one"
onClick
=
{()
=>
{
send
(
'/首页/全国/全国公服建设/信息员'
,
[])
send
(
'/首页/全国/全国公服建设/信息员'
,
[])
}}
>
信息员
<
/div
>
<
div
className
=
"common-btn one"
onClick
=
{()
=>
{
send
(
'/首页/全国/全国公服建设/应急责任人'
,
[])
}}
>
应急责任人
<
div
className
=
"common-btn one"
onClick
=
{()
=>
{
send
(
'/首页/全国/全国公服建设/应急责任人'
,
[])
}}
>
应急责任人
<
/div
>
<
div
className
=
"common-btn one"
onClick
=
{()
=>
{
send
(
'/首页/全国/全国公服建设/预警工作人员'
,
[])
}}
>
预警工作人员
<
div
className
=
"common-btn one"
onClick
=
{()
=>
{
send
(
'/首页/全国/全国公服建设/预警工作人员'
,
[])
}}
>
预警工作人员
<
/div
>
<
/div
>
<
div
className
=
"common-btn-back"
onClick
=
{()
=>
{
props
.
history
.
go
(
-
1
)
}}
><
/div
>
<
/div
>
<
/Layout
>
);
...
...
dva/src/services/ctr.js
View file @
866a75f6
import
request
from
'../utils/request'
;
export
function
send
(
path
,
agr
)
{
console
.
log
(
path
,
'path'
,
window
.
sessionStorage
.
getItem
(
'isUse'
))
window
.
sessionStorage
.
setItem
(
'sendObj'
,
JSON
.
stringify
({
path
,
agr
}))
if
(
window
.
sessionStorage
.
getItem
(
'isUse'
))
{
console
.
log
(
'取消发送'
)
...
...
dva/src/utils/index.js
View file @
866a75f6
...
...
@@ -36,11 +36,11 @@ export function checkState(history) { // 璉頝舐 銝之撅
let
data
=
JSON
.
parse
(
res
.
data
.
data
)
let
sendObj
=
window
.
sessionStorage
.
getItem
(
'sendObj'
);
sendObj
?
sendObj
=
JSON
.
parse
(
sendObj
)
:
(
sendObj
=
{})
console
.
log
(
data
,
sendObj
)
window
.
sessionStorage
.
setItem
(
'isUse'
,
'true'
)
//
console.log(data, sendObj)
//
window.sessionStorage.setItem('isUse', 'true')
if
(
data
.
route
===
sendObj
.
path
)
{
console
.
log
(
'路由重复'
)
window
.
sessionStorage
.
setItem
(
'isUse'
,
'true'
)
//
window.sessionStorage.setItem('isUse', 'true')
}
else
{
const
result
=
filterRouter
(
data
.
route
)
window
.
sessionStorage
.
removeItem
(
'isUse'
)
...
...
@@ -49,5 +49,5 @@ export function checkState(history) { // 璉頝舐 銝之撅
}
}
})
},
10
00
)
},
5
00
)
}
\ 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