|
|
@ -19,7 +19,8 @@ const Index = () => { |
|
|
|
const isSuperAdmin = userInfo && userInfo.username === 'SuperAdmin' ? true : false |
|
|
|
|
|
|
|
const router = useRouter() |
|
|
|
const { params: { type, kind, wait, handle } } = router |
|
|
|
const { params: { type, kind, wait, handle, videoShow } } = router |
|
|
|
console.log(router); |
|
|
|
const isView = type === 'view' ? true : false |
|
|
|
const isPatrol = kind === 'patrol' || kind == 'conserve' ? true : false |
|
|
|
const isRoad = kind === 'road' ? true : false |
|
|
@ -105,8 +106,10 @@ const Index = () => { |
|
|
|
useEffect(() => { |
|
|
|
if (isRoad) { |
|
|
|
Taro.setNavigationBarTitle({ title: '在建项目' }) |
|
|
|
} else if (wait == 'wait' || handle == 'handle') { |
|
|
|
} else if (wait == 'wait') { |
|
|
|
Taro.setNavigationBarTitle({ title: '待办事项' }) |
|
|
|
}else if (handle == 'handle') { |
|
|
|
Taro.setNavigationBarTitle({ title: '已办事项' }) |
|
|
|
} else if (isAnomaly) { |
|
|
|
Taro.setNavigationBarTitle({ title: '异常反馈' }) |
|
|
|
} else if (kind == 'conserve') { |
|
|
@ -594,6 +597,8 @@ const Index = () => { |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
console.log(scenePic, '现场图片'); |
|
|
|
console.log(videoShow, 'videoShow'); |
|
|
|
return ( |
|
|
|
<View className='patrol'> |
|
|
|
{/* { |
|
|
@ -891,19 +896,22 @@ const Index = () => { |
|
|
|
</View> |
|
|
|
} |
|
|
|
{ |
|
|
|
video.length ? <Video |
|
|
|
style={{ width: '90%', marginLeft: '-45%', left: '50%', marginBottom: 20 }} |
|
|
|
src={video} |
|
|
|
poster='../../static/img/date.png' |
|
|
|
initialTime={0} |
|
|
|
controls={true} |
|
|
|
autoplay={false} |
|
|
|
loop={false} |
|
|
|
muted={false} |
|
|
|
/> : '' |
|
|
|
} |
|
|
|
videoShow ? '' : |
|
|
|
<view> |
|
|
|
<Video |
|
|
|
style={{ width: '90%', marginLeft: '-45%', left: '50%', marginBottom: 20 }} |
|
|
|
src={video} |
|
|
|
poster='../../static/img/date.png' |
|
|
|
initialTime={0} |
|
|
|
controls={true} |
|
|
|
autoplay={false} |
|
|
|
loop={false} |
|
|
|
muted={false} |
|
|
|
/> |
|
|
|
|
|
|
|
<AtButton type='secondary' size='small' onClick={addVideo}>添加视频</AtButton> |
|
|
|
<AtButton type='secondary' size='small' onClick={addVideo}>添加视频</AtButton> |
|
|
|
</view> |
|
|
|
} |
|
|
|
{ |
|
|
|
isView ? |
|
|
|
isSuperAdmin && |
|
|
|