diff --git a/src/pages/index/index.jsx b/src/pages/index/index.jsx index 7568943..c274106 100644 --- a/src/pages/index/index.jsx +++ b/src/pages/index/index.jsx @@ -1,24 +1,40 @@ -import { View, Text } from '@tarojs/components' -import { useLoad } from '@tarojs/taro' -import { AtButton } from 'taro-ui' -import { AtIcon } from 'taro-ui' -import { AtAvatar } from 'taro-ui' -import './index.scss' +import { View, Text } from "@tarojs/components"; +import { useLoad } from "@tarojs/taro"; +import { AtButton } from "taro-ui"; +import { AtIcon } from "taro-ui"; +import { AtAvatar } from "taro-ui"; +import "./index.scss"; export default function Index() { - useLoad(() => { - console.log('Page loaded.') - }) + console.log("Page loaded."); + }); + + const HomeCardItem = () => { + return [1, 2, 3].map((item, index) => { + return ( + + left + right + + ); + }); + }; return ( - - 按钮文案 - 按钮文案 - 按钮文案 - Hello world1! - - + + {/* 顶部 */} + + {/* 头像 */} + + + + + + {/* 城市列表 */} + + + - ) + ); } diff --git a/src/pages/index/index.scss b/src/pages/index/index.scss index e69de29..1d13dc6 100644 --- a/src/pages/index/index.scss +++ b/src/pages/index/index.scss @@ -0,0 +1,32 @@ +.index { + padding-left: 20px; + padding-right: 20px; + + .indexHeader { + display: flex; + flex-direction: row; + // justify-content: space-between; + align-items: center; + } + + + .homeCards { + display: flex; + flex-direction: column; + + .homeCardItem { + margin-top: 10px; + display: flex; + flex-direction: row; + // background-color:aqua; + justify-content: space-between; + align-items: center; + .homeCard { + width: 340px; + height: 250px; + background-color: yellow; + border-radius: 20px; + } + } + } +}