|
|
@ -4,8 +4,9 @@ import { View } from '@tarojs/components'; |
|
|
|
import { useIndustry } from '@/actions/business'; |
|
|
|
import './index.scss'; |
|
|
|
|
|
|
|
|
|
|
|
const Index = () => { |
|
|
|
const userInfo = Taro.getStorageSync('userInfo') || {}; |
|
|
|
const isSuperAdmin = userInfo && userInfo.username === 'SuperAdmin' ? true : false |
|
|
|
|
|
|
|
function toPatrol() { |
|
|
|
Taro.navigateTo({ |
|
|
@ -22,8 +23,9 @@ const Index = () => { |
|
|
|
<View className='page'> |
|
|
|
<View className='fill'> |
|
|
|
<View className='title'>巡 查 养 护</View> |
|
|
|
{/* <View className='btn' onClick={toPatrol}>填报</View> */} |
|
|
|
<View className='btn' onClick={toPatrolView}>查看</View> |
|
|
|
<View className='btn' onClick={isSuperAdmin ? toPatrolView : toPatrol}> |
|
|
|
{isSuperAdmin ? '查看' : '填报'} |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
); |
|
|
|