diff --git a/src/componments/Tabbar/index.jsx b/src/componments/Tabbar/index.jsx
deleted file mode 100644
index e69de29..0000000
diff --git a/src/componments/Tabbar/index.scss b/src/componments/Tabbar/index.scss
deleted file mode 100644
index e69de29..0000000
diff --git a/src/componments/TabbarCom/index.jsx b/src/componments/TabbarCom/index.jsx
new file mode 100644
index 0000000..9bda2e4
--- /dev/null
+++ b/src/componments/TabbarCom/index.jsx
@@ -0,0 +1,35 @@
+import { View } from "@tarojs/components";
+import { AtAvatar, AtTag, AtIcon, AtTabBar, AtButton } from "taro-ui";
+import Taro from "@tarojs/taro";
+import react from "react";
+
+const TabbarCom = (props) => {
+ const [active, setActive] = react.useState(props?.active ?? 0);
+
+ return (
+
+ {
+ setActive(current)
+ if (current === 0) {
+ Taro.redirectTo({
+ url: "/pages/index/index",
+ });
+ }else{
+ Taro.redirectTo({
+ url: "/pages/my/index",
+ });
+ }
+ }}
+ current={active}
+ />
+
+ );
+};
+
+export default TabbarCom;
diff --git a/src/componments/TabbarCom/index.scss b/src/componments/TabbarCom/index.scss
new file mode 100644
index 0000000..3cbcefd
--- /dev/null
+++ b/src/componments/TabbarCom/index.scss
@@ -0,0 +1,11 @@
+.tabbbarDiv {
+ width: 100%;
+ height: 140px;
+ // background-color: red;
+ }
+
+ .tabbbar {
+ position: fixed;
+ bottom: 0px;
+ width: 100%;
+ }
\ No newline at end of file
diff --git a/src/pages/index/index.jsx b/src/pages/index/index.jsx
index 89ddfd2..e2a8d47 100644
--- a/src/pages/index/index.jsx
+++ b/src/pages/index/index.jsx
@@ -8,6 +8,7 @@ import guangzhou from "@/images/city/guangzhou.jpg";
import shanghai from "@/images/city/shanghai.jpg";
import shenzhen from "@/images/city/shenzhen.jpg";
import touxiang from "@/images/index/touxiang.jpg";
+import TabbarCom from "@/componments/TabbarCom";
import { useEffect, useState } from "react";
// import beijing from "../../images/city/beijing.jpg";
@@ -181,7 +182,7 @@ export default function Index() {
{/* 底部tabbar */}
-
+ {/*
-
+ */}
+
+
);
}
diff --git a/src/pages/my/index.jsx b/src/pages/my/index.jsx
index e1e8b26..d5167ca 100644
--- a/src/pages/my/index.jsx
+++ b/src/pages/my/index.jsx
@@ -17,7 +17,7 @@ import guangzhou from "@/images/city/guangzhou.jpg";
import shanghai from "@/images/city/shanghai.jpg";
import shenzhen from "@/images/city/shenzhen.jpg";
import touxiang from "@/images/index/touxiang.jpg";
-
+import TabbarCom from "@/componments/TabbarCom";
import { useEffect, useState } from "react";
const my = () => {
const [open, setopen] = useState(false);
@@ -69,7 +69,7 @@ const my = () => {
{/* 底部tabbar */}
-
+ {/*
{
}}
current={1}
/>
-
+ */}
+
);
};