diff --git a/src/pages/index/index.jsx b/src/pages/index/index.jsx index a313f1e..732cdc7 100644 --- a/src/pages/index/index.jsx +++ b/src/pages/index/index.jsx @@ -16,7 +16,6 @@ export default function Index() { // 用户基本信息 const [userInfo, setuserInfo] = useState({}); - useLoad(() => { console.log("Page loaded."); }); @@ -51,9 +50,17 @@ export default function Index() { { cityName: "上海", imagePath: shanghai }, { cityName: "广州", imagePath: guangzhou }, { cityName: "深圳", imagePath: shenzhen }, + { cityName: "深圳", imagePath: shenzhen }, + { cityName: "深圳", imagePath: shenzhen }, + { cityName: "深圳", imagePath: shenzhen }, + ].map((item, index) => { return ( - + // 设置自动换行 + {/* 城市封面图片 */} - - {/* */} - ); }); diff --git a/src/pages/index/index.scss b/src/pages/index/index.scss index bddd3ca..3075388 100644 --- a/src/pages/index/index.scss +++ b/src/pages/index/index.scss @@ -1,6 +1,7 @@ .index { padding-left: 20px; padding-right: 20px; + background-color: aquamarine; .indexHeader { margin-top: 10px; @@ -21,25 +22,36 @@ .homeCards { display: flex; - flex-direction: column; + // flex-direction: column; + flex-direction: row; + flex-wrap: wrap; .homeCardItem { margin-top: 10px; - + width: 340px; + height: 250px; display: flex; flex-direction: row; - // background-color: aqua; - justify-content: space-between; - align-items: center; + background-color: aqua; + // justify-content: space-between; + // align-items: center; .homeCard { - width: 340px; - height: 250px; + width: 100%; + height: 100%; background-color: yellow; border-radius: 20px; + // margin-left:20px; } + + } + .homeCardDiv{ + width: 30px; + height: 100%; + background-color: blue; } - } + + } .tabbbarDiv { width: 100%; height: 140px;