周立森 5 years ago
parent
commit
804b4029b0
2 changed files with 27 additions and 6 deletions
  1. 6
    4
      src/pages/building/list/index.jsx
  2. 21
    2
      src/pages/building/list/style.less

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

@@ -98,7 +98,7 @@ function CartBody(props) {
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: ")
101
+  console.log("buildingImg1: ", data.buildingImg)
102 102
   return (
103 103
     <Card
104 104
       hoverable
@@ -106,11 +106,13 @@ function CartBody(props) {
106 106
       // cover={}
107 107
       // bodyStyle={{ padding: '10px 20px' }}
108 108
     >
109
-    <img className={Styles.cover} style={{ background: `url(${((data.buildingImg && data.buildingImg[0]) || {}).url})` }}   ></img>
109
+      { console.log("buildingImg2: ", buildingImg)}
110
+      { console.log("buildingImg[0]: ",buildingImg[0])}
111
+    <div className={Styles.cover} style={{ background: `url(${((buildingImg && buildingImg[0]) ).url})` }}   ></div>
110 112
     <div style={{ padding: '10px 20px' }}>
111 113
       <p className={Styles.cardText}>
112 114
         <span className={Styles.title}>楼盘编号</span>
113
-        <span >:{data.code}</span>
115
+        <span style={{textOverflow: 'ellipsis',  whiteSpace: 'nowrap',  overflow: 'hidden'}}>:{data.code}</span>
114 116
         <AuthButton name="admin.building.update.put" noRight={null}>
115 117
           <span className={Styles.ediText} onClick={() => toEdi(data)}>
116 118
             编辑
@@ -120,7 +122,7 @@ function CartBody(props) {
120 122
       </p>
121 123
       <p className={Styles.cardText}>
122 124
         <span className={Styles.title}>楼盘名称</span>
123
-        <span >:{data.buildingName || data.name}</span>
125
+        <span style={{textOverflow: 'ellipsis',  whiteSpace: 'nowrap',  overflow: 'hidden'}}>:{data.buildingName || data.name}</span>
124 126
       </p>
125 127
       <p className={Styles.cardItem}>
126 128
         <span className={Styles.title}>均价</span>

+ 21
- 2
src/pages/building/list/style.less View File

@@ -32,8 +32,27 @@
32 32
   margin-bottom: 0.08rem;
33 33
   .title{
34 34
     display: inline-block;
35
-    width: 0.54rem;
36
-    min-width: 0.54rem;
35
+    width: 0.58rem;
36
+  
37
+    min-width: 0.58rem;
38
+    justify-content: space-between;
39
+    text-align: justify;
40
+    text-align-last:justify
41
+  }
42
+  
43
+}
44
+.cardText{
45
+  font-size: 0.106rem;
46
+  font-weight: 400;
47
+  color: #666;
48
+  display: flex;
49
+  align-items: center;  
50
+  margin-bottom: 0.08rem;
51
+  .title{
52
+    display: inline-block;
53
+    width: 0.58rem;
54
+  
55
+    min-width: 0.58rem;
37 56
     justify-content: space-between;
38 57
     text-align: justify;
39 58
     text-align-last:justify