Browse Source

信息修改

1002884655 3 years ago
parent
commit
11fbb70140
1 changed files with 11 additions and 1 deletions
  1. 11
    1
      src/pages/index/components/LiveSale/index.jsx

+ 11
- 1
src/pages/index/components/LiveSale/index.jsx View File

35
     }
35
     }
36
   }
36
   }
37
 
37
 
38
+  const toDetail = (item) => {
39
+    return () => {
40
+      if(item.type === 'live') {
41
+        Taro.navigateTo({ url: `/pages/video/liveDetail/index?id=${item.id}&type=${item.type}` })
42
+      } else {
43
+        Taro.navigateTo({ url: `/pages/video/videoDetail/index?id=${item.id}` })
44
+      }
45
+    }
46
+  }
47
+
38
   return (
48
   return (
39
     <view className='components LiveSale'>
49
     <view className='components LiveSale'>
40
       <view>
50
       <view>
50
             {
60
             {
51
               PageList.map((item, index) => (
61
               PageList.map((item, index) => (
52
                 <view className='ListItem' key={`List-${index}`} style={{display: CurrentId === 1 || (CurrentId === 2 && item.kind === 'notice') || (CurrentId === 3 && item.kind === 'live')  || (CurrentId === 4 && item.kind !== 'notice') ? 'inline-block' : 'none'}}>
62
                 <view className='ListItem' key={`List-${index}`} style={{display: CurrentId === 1 || (CurrentId === 2 && item.kind === 'notice') || (CurrentId === 3 && item.kind === 'live')  || (CurrentId === 4 && item.kind !== 'notice') ? 'inline-block' : 'none'}}>
53
-                  <Image mode='aspectFill' className='centerLabel' onClick={()=>{Taro.navigateTo({ url: `/pages/video/liveDetail/index?id=${item.id}&type=${item.type}` })}} src={`${getImgURL(item.images)}`} />
63
+                  <Image mode='aspectFill' className='centerLabel' onClick={toDetail(item)} src={`${getImgURL(item.images)}`} />
54
                 </view>
64
                 </view>
55
               ))
65
               ))
56
             }
66
             }