Browse Source

(*)修改title,影藏添加视频按钮

dev
ww664853070 1 year ago
parent
commit
62a4377b75
  1. 36
      weapp/src/packages/patrol/index.jsx
  2. 2
      weapp/src/packages/patrolView/index.jsx

36
weapp/src/packages/patrol/index.jsx

@ -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 &&

2
weapp/src/packages/patrolView/index.jsx

@ -141,7 +141,7 @@ function Index() {
}
const handleDetail = index => {
Taro.navigateTo({ url: `/packages/patrol/index?type=view&id=${listData[index].id}&kind=${kind == 'wait' || kind == 'handle' ? 'anomaly' : kind}&wait=${kind == 'wait' ? 'wait' : ''}&handle=${kind == 'handle' ? 'handle' : ''}` })
Taro.navigateTo({ url: `/packages/patrol/index?type=view&id=${listData[index].id}&kind=${kind == 'wait' || kind == 'handle' ? 'anomaly' : kind}&wait=${kind == 'wait' ? 'wait' : ''}&handle=${kind == 'handle' ? 'handle' : ''}&videoShow=${kind == 'wait' || kind == 'handle' ? 'videoShow' : ''}` })
}
return (

Loading…
Cancel
Save