魏熙美 5 years ago
parent
commit
2f53c61577
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      src/pages/building/list/index.jsx

+ 3
- 3
src/pages/building/list/index.jsx View File

97
     });
97
     });
98
   }
98
   }
99
 
99
 
100
-  const { buildingImg = []} = data
101
-
100
+  const { buildingImg } = data
101
+  console.log("buildingImg: ", data.buildingImg, "data: ", data)
102
   return (
102
   return (
103
     <Card
103
     <Card
104
       hoverable
104
       hoverable
105
       style={{ minWidth: '330px', borderRadius: '12px', margin: '10px', boxShadow: '0px 0px 16px 2px rgba(0,0,0,0.12)' }}
105
       style={{ minWidth: '330px', borderRadius: '12px', margin: '10px', boxShadow: '0px 0px 16px 2px rgba(0,0,0,0.12)' }}
106
-      cover={<img alt="example" src={(buildingImg[0] || {}).url} style={{ borderRadius: '12px 12px 0 0', width: '100%', height: '14vw' }}></img>}
106
+      cover={<img alt="example" src={((data.buildingImg && data.buildingImg[0]) || {}).url} style={{ borderRadius: '12px 12px 0 0', width: '100%', height: '14vw' }}></img>}
107
       bodyStyle={{ padding: '10px 20px' }}
107
       bodyStyle={{ padding: '10px 20px' }}
108
     >
108
     >
109
       <p className={Styles.cardText}>
109
       <p className={Styles.cardText}>