+// )
+
+const back = () => { }
+// Toast.show({
+// content: '点击了返回区域',
+// duration: 1000,
+// })
+// const list =
+// // [
+// // 'Brian Vaughn',
+// // // And so on...
+// // ];
+// Array(100).fill('Brian Vaughn')
+// function rowRenderer({
+// key, // Unique key within array of rows
+// index, // Index of row within collection
+// isScrolling, // The List is currently being scrolled
+// isVisible, // This row is visible within the List (eg it is not an overscanned row)
+// style, // Style object to be applied to row (to position it)
+// }) {
+// return (
+//
+// {list[index]}
+//
+// );
+// }
+export default class CityList extends React.Component {
+ state = {
+ cityList: {},
+ cityIndex: [],
+ activeIndex: 0
+ }
+ componentDidMount() {
+ this.getCityList()
+ console.info("componentDidMount")
+ }
+ async getCityList() {
+ const res = await axios.get('http://localhost:8080/area/city?level=1')
+ const { cityList, cityIndex } = formatCityData(res.data.body)
+
+ // 热门城市数据
+ const hotRes = await axios.get('http://localhost:8080/area/hot')
+ cityList['hot'] = hotRes.data.body
+ // 放在第一位
+ cityIndex.unshift('hot')
+
+ const curCity = await getCurrentCity();
+ cityList['#'] = [curCity]
+ cityIndex.unshift('#')
+
+ console.info('shezhi zhuangtai')
+ this.setState({
+ cityList,
+ cityIndex
+ })
+ // this.setState(()=>{
+ // return {
+ // cityList:cityList,
+ // cityIndex:cityIndex
+ // }
+ // })
+ }
+
+ rowRenderer = ({
+ key, // Unique key within array of rows
+ index, // Index of row within collection
+ isScrolling, // The List is currently being scrolled
+ isVisible, // This row is visible within the List (eg it is not an overscanned row)
+ style, // Style object to be applied to row (to position it)
+ }) => {
+ const cityIndex = this.state.cityIndex
+ const letter = cityIndex[index]
+ return (
+
}
}
\ No newline at end of file
diff --git a/src/pages/Home/index.js b/src/pages/Home/index.js
index c5175ce..501df81 100644
--- a/src/pages/Home/index.js
+++ b/src/pages/Home/index.js
@@ -2,10 +2,11 @@ import React from 'react'
import Bottom from './../Bottom/index'
import './index.css'
import { Outlet } from 'react-router-dom'
+import WidthUseNavigate from '../WidthUseNavigate'
export default class Home extends React.Component {
render() {
return (