张延森 3 years ago
parent
commit
2c3ce5967c
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      src/pages/index/components/Card/index.jsx

+ 2
- 1
src/pages/index/components/Card/index.jsx View File

@@ -2,6 +2,7 @@
2 2
 import { useMemo } from 'react'
3 3
 import Taro from '@tarojs/taro'
4 4
 import useSave from "@/utils/hooks/useSave"
5
+import { compressImage } from '@/utils'
5 6
 import msTip from '@/assets/icons/housemantj/foodtip.png'
6 7
 import mjTip from '@/assets/icons/housemantj/mjtip.png'
7 8
 import location from '@/assets/icons/housemantj/location.png'
@@ -39,7 +40,7 @@ export default (props) => {
39 40
     <view className={uqClass} style={{ overflow: 'hidden' }}>
40 41
       <view className='contentCard' style={style}>
41 42
         <view className='cardTop'>
42
-          <image mode='widthFix' onClick={Detail} src={item.poster} className='cCardimg' onLoad={handleLoad} />
43
+          <image mode='widthFix' onClick={Detail} src={compressImage(item.poster)} className='cCardimg' onLoad={handleLoad} />
43 44
           <image className='lefttips' src={item.targetType === 'tourist' ? mjTip : msTip} />
44 45
           <image onClick={toggleSave} src={isSaved > 0 ? onlove : love} className='loveharde'></image>
45 46
         </view>