Browse Source

报告移动端无权限时不做修改

lwei 11 months ago
parent
commit
8ff63665de
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/Material/MaterialInfo.tsx

+ 3 - 1
src/Material/MaterialInfo.tsx

@@ -15,6 +15,7 @@ import AskAdd from './components/AskAdd'
 import { IArcticleInfo, MaterialService } from './Material.service'
 import { IArcticleInfo, MaterialService } from './Material.service'
 import useTimeCount from './hooks/useTimeCount'
 import useTimeCount from './hooks/useTimeCount'
 import { setWxShare } from 'utils/wxConfig'
 import { setWxShare } from 'utils/wxConfig'
+import { useMedia } from 'Context/Media/MediaContext'
 import styles from './css/MaterialInfo.module.scss'
 import styles from './css/MaterialInfo.module.scss'
 
 
 type IMaterialInfoProps = {
 type IMaterialInfoProps = {
@@ -29,6 +30,7 @@ const MaterialInfo: React.FC<IMaterialInfoProps> = props => {
   const [visibleAsk, setVisibleAsk] = useState(false)
   const [visibleAsk, setVisibleAsk] = useState(false)
   const [specialType, setSpecialType] = useState<ISpecialType>(ISpecialType.NormalArticle)
   const [specialType, setSpecialType] = useState<ISpecialType>(ISpecialType.NormalArticle)
   const login2p = useLogin2p()
   const login2p = useLogin2p()
+  const media = useMedia()
 
 
   // 拉取数据
   // 拉取数据
   const {
   const {
@@ -122,7 +124,7 @@ const MaterialInfo: React.FC<IMaterialInfoProps> = props => {
       <ValidateEmpty loading={infoLoading} data={data}>
       <ValidateEmpty loading={infoLoading} data={data}>
         {data?.HasPermission && data?.HasPermission !== INewPermissionType.OK ? (
         {data?.HasPermission && data?.HasPermission !== INewPermissionType.OK ? (
           <div className={styles['art-nopower-bg']}>
           <div className={styles['art-nopower-bg']}>
-            {data.IsShowWxPay ? (
+            {data.IsShowWxPay && !media.isSmallMax ? ( // 暂时这么写
               <PayNoPermission
               <PayNoPermission
                 dataInfo={data as IArcticleInfo}
                 dataInfo={data as IArcticleInfo}
                 tryType={ITryType.Article}
                 tryType={ITryType.Article}