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
d5374fc2
authored
Mar 23, 2020
by
hank
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
视频数据
parent
6fd2d9d3
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
5 deletions
+40
-5
dva/.env.development.js
+2
-1
dva/.env.production.js
+2
-1
dva/src/routes/informationCenter/Video.js
+22
-1
dva/src/services/api.js
+11
-0
dva/src/utils/index.js
+3
-2
No files found.
dva/.env.development.js
View file @
d5374fc2
module
.
exports
=
{
module
.
exports
=
{
API_URL
:
'http://123.5
7.209.57
:8091'
,
API_URL
:
'http://123.5
6.149.208
:8091'
,
CTR_URL
:
'http://172.16.1.249:8900'
CTR_URL
:
'http://172.16.1.249:8900'
// CTR_URL: 'http://127.0.0.1:8900'
// CTR_URL: 'http://127.0.0.1:8900'
}
}
\ No newline at end of file
dva/.env.production.js
View file @
d5374fc2
module
.
exports
=
{
module
.
exports
=
{
API_URL
:
'http://123.5
7.209.57
:8091'
,
API_URL
:
'http://123.5
6.149.208/
:8091'
,
CTR_URL
:
'http://172.16.1.249:8900'
CTR_URL
:
'http://172.16.1.249:8900'
}
}
\ No newline at end of file
dva/src/routes/informationCenter/Video.js
View file @
d5374fc2
import
React
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
connect
}
from
'dva'
;
import
{
connect
}
from
'dva'
;
import
'./index.less'
;
import
'./index.less'
;
import
Layout
from
'@/components/Layout.js'
import
Layout
from
'@/components/Layout.js'
import
{
send
}
from
'@/services/ctr'
import
{
send
}
from
'@/services/ctr'
import
{
getVideoList
}
from
'@/services/api'
function
CenterIntroduction
(
props
)
{
function
CenterIntroduction
(
props
)
{
// send('/首页/信息中心/宣传视频', [])
const
[
videoList
,
setVideoList
]
=
useState
([])
useEffect
(
function
()
{
})
if
(
!
videoList
.
length
)
{
getVideoList
().
then
(
res
=>
{
console
.
log
(
res
.
data
.
list
)
setVideoList
(
res
.
data
.
list
)
})
}
return
(
return
(
<
Layout
>
<
Layout
>
<
div
className
=
"warmingCenter-content animated fadeIn"
>
<
div
className
=
"warmingCenter-content animated fadeIn"
>
<
div
className
=
"common-btn-container"
>
<
div
className
=
"common-btn-container"
>
{
videoList
.
map
((
item
,
index
)
=>
{
return
<
div
className
=
"common-btn one"
key
=
{
item
.
url
}
onClick
=
{()
=>
{
send
(
'/首页/信息中心/宣传视频'
,
[])
}}
>
{
item
.
title
}
<
/div
>
})}
<
div
className
=
"common-btn one"
onClick
=
{()
=>
{
<
div
className
=
"common-btn one"
onClick
=
{()
=>
{
send
(
'/首页/信息中心/宣传视频'
,
[])
send
(
'/首页/信息中心/宣传视频'
,
[])
}}
>
}}
>
视频
1
视频
1
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
...
dva/src/services/api.js
View file @
d5374fc2
...
@@ -13,4 +13,14 @@ export function getChildrenInfo(parentCode) {
...
@@ -13,4 +13,14 @@ export function getChildrenInfo(parentCode) {
url
:
`/area/get/info/
${
parentCode
}
`
,
url
:
`/area/get/info/
${
parentCode
}
`
,
method
:
'get'
method
:
'get'
})
})
}
export
function
getVideoList
()
{
return
request
({
method
:
'get'
,
url
:
'/interior/get/promotional/list'
,
params
:
{
p
:
1
,
c
:
1000
}
})
}
}
\ No newline at end of file
dva/src/utils/index.js
View file @
d5374fc2
...
@@ -38,13 +38,14 @@ export function checkState(history) { // 检查路由状态 与大屏保持同
...
@@ -38,13 +38,14 @@ export function checkState(history) { // 检查路由状态 与大屏保持同
sendObj
?
sendObj
=
JSON
.
parse
(
sendObj
)
:
(
sendObj
=
{})
sendObj
?
sendObj
=
JSON
.
parse
(
sendObj
)
:
(
sendObj
=
{})
// console.log(data, sendObj)
// console.log(data, sendObj)
// window.sessionStorage.setItem('isUse', 'true')
// window.sessionStorage.setItem('isUse', 'true')
if
(
data
.
route
===
sendObj
.
path
)
{
if
(
data
.
route
===
sendObj
.
path
||
(
data
.
route
===
'/首页/全国/预警信息综合监控平台'
&&
sendObj
.
path
.
indexOf
(
'/首页/全国'
)
!==
-
1
)
)
{
console
.
log
(
'路由重复'
)
console
.
log
(
'路由重复'
)
// window.sessionStorage.setItem('isUse', 'true')
// window.sessionStorage.setItem('isUse', 'true')
}
else
{
}
else
{
const
result
=
filterRouter
(
data
.
route
)
const
result
=
filterRouter
(
data
.
route
)
console
.
log
(
result
,
'result'
,
window
.
location
.
hash
.
replace
(
'#'
,
''
)
!==
result
.
path
)
window
.
sessionStorage
.
removeItem
(
'isUse'
)
window
.
sessionStorage
.
removeItem
(
'isUse'
)
if
(
result
)
{
if
(
result
&&
window
.
location
.
hash
.
replace
(
'#'
,
''
)
!==
result
.
path
)
{
history
.
replace
(
result
.
path
)
history
.
replace
(
result
.
path
)
}
}
}
}
...
...
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