Browse Source

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

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

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

@ -141,7 +141,7 @@ function Index() {
} }
const handleDetail = 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 ( return (

Loading…
Cancel
Save