Explorar el Código

Merge branch 'v3.5.1' of http://git.ycjcjy.com/zhiyuxing/estateagents-admin-manager into v3.5.1

weiximei hace 5 años
padre
commit
035e09272c
Se han modificado 2 ficheros con 16 adiciones y 4 borrados
  1. 7
    4
      src/pages/building/list/index.jsx
  2. 9
    0
      src/pages/building/list/style.less

+ 7
- 4
src/pages/building/list/index.jsx Ver fichero

@@ -96,16 +96,18 @@ function CartBody(props) {
96 96
       },
97 97
     });
98 98
   }
99
-
99
+// src={((data.buildingImg && data.buildingImg[0]) || {}).url}background: `url(${item.caseCoverImg})` style={{ background: `url(((data.buildingImg && data.buildingImg[0]) || {}).url)` }}
100 100
   const { buildingImg } = data
101
-  console.log("buildingImg: ", data.buildingImg, "data: ", data)
101
+  console.log("buildingImg: ", data.buildingImg, "data: ")
102 102
   return (
103 103
     <Card
104 104
       hoverable
105 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={((data.buildingImg && data.buildingImg[0]) || {}).url} style={{ borderRadius: '12px 12px 0 0', width: '100%', height: '14vw' }}></img>}
107
-      bodyStyle={{ padding: '10px 20px' }}
106
+      // cover={}
107
+      // bodyStyle={{ padding: '10px 20px' }}
108 108
     >
109
+    <img className={Styles.cover} style={{ background: `url(${((data.buildingImg && data.buildingImg[0]) || {}).url})` }}   ></img>
110
+    <div style={{ padding: '10px 20px' }}>
109 111
       <p className={Styles.cardText}>
110 112
         <span className={Styles.title}>楼盘编号</span>
111 113
         <span >:{data.code}</span>
@@ -155,6 +157,7 @@ function CartBody(props) {
155 157
         </span>
156 158
       </AuthButton>
157 159
       </p>
160
+      </div>
158 161
     </Card>
159 162
   )
160 163
 }

+ 9
- 0
src/pages/building/list/style.less Ver fichero

@@ -56,4 +56,13 @@
56 56
   white-space: nowrap;
57 57
   overflow: hidden;
58 58
 }
59
+.cover{
60
+  width: 100%;
59 61
 
62
+  padding-bottom: 56.25%;
63
+  background-size: 100% 100% !important;
64
+ 
65
+  border-radius: 12px 12px 0 0;
66
+  
67
+    // height: '14vw';
68
+}