魏熙美 5 år sedan
förälder
incheckning
9ed1766c9f
2 ändrade filer med 4 tillägg och 8 borttagningar
  1. 1
    1
      src/pages/building/list/index.jsx
  2. 3
    7
      src/pages/staff/list/StaffList.jsx

+ 1
- 1
src/pages/building/list/index.jsx Visa fil

122
       <p className={Styles.cardItem}>
122
       <p className={Styles.cardItem}>
123
         <span className={Styles.title}>均价</span>
123
         <span className={Styles.title}>均价</span>
124
         <span >
124
         <span >
125
-          :约<span style={{ color: '#FF0707', fontSize: '20px' }}> {data.price} </span>元/m
125
+          :约<span style={{ color: '#FF0707', fontSize: '20px' }}> {data.price} </span>元/m²
126
         </span>
126
         </span>
127
       </p>
127
       </p>
128
       <p className={Styles.cardItem}>
128
       <p className={Styles.cardItem}>

+ 3
- 7
src/pages/staff/list/StaffList.jsx Visa fil

105
 
105
 
106
 const header = (props) => {
106
 const header = (props) => {
107
   const [tempData, setTempData] = useState({ records: [] })
107
   const [tempData, setTempData] = useState({ records: [] })
108
-  const [pageTotal, setPageTotal] = useState('')
109
-  const [data,setData] = useState({})
110
   useEffect(() => {
108
   useEffect(() => {
111
     getList({ pageNum: 1, pageSize: 8 });
109
     getList({ pageNum: 1, pageSize: 8 });
112
   }, [])
110
   }, [])
114
   const getList = (params) => {
112
   const getList = (params) => {
115
     request({ ...apis.staff.taUser, params: { ...params } }).then((data) => {
113
     request({ ...apis.staff.taUser, params: { ...params } }).then((data) => {
116
       console.log(data, "listData")
114
       console.log(data, "listData")
117
-      setData(data)
118
-      setTempData(data.records)
119
-      setPageTotal(data.total)
115
+      setTempData(data)
120
     })
116
     })
121
   }
117
   }
122
 
118
 
198
         {
194
         {
199
           tempData.records.map((item, index) => (
195
           tempData.records.map((item, index) => (
200
             <Col span={6}>
196
             <Col span={6}>
201
-              <CartBody data={item} onFresh={() => getList({ pageNum: 1, pageSize: 8 })} />
197
+              <CartBody data={item} onFresh={() => getList({ pageNum: 1, pageSize: 8 })} key={item.userId} />
202
             </Col>
198
             </Col>
203
           ))
199
           ))
204
         }
200
         }
206
 
202
 
207
       {/* 分页  */}
203
       {/* 分页  */}
208
       <div style={{ display: 'flex', justifyContent: 'flex-end' }}>     
204
       <div style={{ display: 'flex', justifyContent: 'flex-end' }}>     
209
-        <Pagination showQuickJumper defaultCurrent={1} pageSize={8} total={pageTotal} onChange={onChange} current={data.current}/>
205
+        <Pagination showQuickJumper defaultCurrent={1} pageSize={8} total={tempData.total} onChange={onChange} current={tempData.current}/>
210
       </div>
206
       </div>
211
     </>
207
     </>
212
   )
208
   )