feat: 山峰导航

This commit is contained in:
eric
2022-11-13 11:00:14 +08:00
parent e61be149b8
commit c27e8ce790
15 changed files with 944 additions and 50 deletions

View File

@@ -3,6 +3,8 @@ export default {
// "pages/index/index",
"pages/home/index",
"pages/activityList/index",
"pages/mountainPeak/index",
],

View File

@@ -14,10 +14,12 @@ import { Swiper, SwiperItem, Image } from "@antmjs/vantui";
import react from "react";
import { NoticeBar } from "@antmjs/vantui";
import Taro from "@tarojs/taro";
import { Tabbar, TabbarItem } from "@antmjs/vantui";
const Home = () => {
// const { images } = COMMON
const [initPage1, setInitPage1] = react.useState(0);
const [active, setActive] = react.useState(0);
const onChange = (e) => {};
const images = [
"cloud://cloud1-5g5xrgza12a0dd6d.636c-cloud1-5g5xrgza12a0dd6d-1253665791/download.jpg",
@@ -65,6 +67,16 @@ const Home = () => {
{/* 模块 */}
<Grid>
<GridItem
icon="photo-o"
text="十峰"
onClick={() => {
// 跳转到目的页面,打开新页面
Taro.navigateTo({
url: "/pages/mountainPeak/index",
});
}}
/>
<GridItem
icon="photo-o"
text="活动"
@@ -77,7 +89,6 @@ const Home = () => {
/>
<GridItem icon="photo-o" text="活动" />
<GridItem icon="photo-o" text="活动" />
<GridItem icon="photo-o" text="活动" />
</Grid>
{/* 分割线 */}
@@ -102,6 +113,19 @@ const Home = () => {
/>
);
})}
<Tabbar
active={active}
// onChange={(e) => setActive(e?.detail)}
safeAreaInsetBottom={false}
>
<TabbarItem icon="home-o"></TabbarItem>
{/* <TabbarItem icon="search">标签</TabbarItem> */}
<TabbarItem icon="friends-o"></TabbarItem>
<TabbarItem icon="setting-o"></TabbarItem>
</Tabbar>
</View>
);
};

View File

@@ -0,0 +1,25 @@
import { View } from "@tarojs/components";
import react from "react";
import { Sidebar, SidebarItem } from "@antmjs/vantui";
const mountainPeak = () => {
return (
<View>
{" "}
<Sidebar activeKey={0}>
<SidebarItem title="梧桐山" />
<SidebarItem title="梧桐山" />
<SidebarItem title="梧桐山" />
<SidebarItem title="梧桐山" />
<SidebarItem title="梧桐山" />
<SidebarItem title="梧桐山" />
<SidebarItem title="梧桐山" />
<SidebarItem title="梧桐山" />
<SidebarItem title="标签名" />
<SidebarItem title="标签名" />
</Sidebar>
</View>
);
};
export default mountainPeak;