From f2f8056544bbc1008b3b55cfa31fa62ab7c1cb21 Mon Sep 17 00:00:00 2001 From: hackrobot Date: Tue, 19 Mar 2024 21:27:20 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/componments/TabbarCom/index.jsx | 4 +-- src/pages/index/index.jsx | 40 ----------------------------- src/pages/my/index.jsx | 18 ------------- 3 files changed, 2 insertions(+), 60 deletions(-) diff --git a/src/componments/TabbarCom/index.jsx b/src/componments/TabbarCom/index.jsx index 9bda2e4..f15bec8 100644 --- a/src/componments/TabbarCom/index.jsx +++ b/src/componments/TabbarCom/index.jsx @@ -15,12 +15,12 @@ const TabbarCom = (props) => { { title: "我的", iconType: "user" }, //, text: "100", max: 99 ]} onClick={(current) => { - setActive(current) + setActive(current); if (current === 0) { Taro.redirectTo({ url: "/pages/index/index", }); - }else{ + } else { Taro.redirectTo({ url: "/pages/my/index", }); diff --git a/src/pages/index/index.jsx b/src/pages/index/index.jsx index e2a8d47..e70fe31 100644 --- a/src/pages/index/index.jsx +++ b/src/pages/index/index.jsx @@ -144,29 +144,6 @@ export default function Index() { {/* color="#F00" */} - - - {/* { - Taro.request({ - url: " http://172.19.0.1:8082/test", //仅为示例,并非真实的接口地址 - method: "POST", - data: { - openid: "111", - wxid: "22", - }, - header: { - "content-type": "application/json", // 默认值 - }, - success: function (res) { - console.log(res.data); - }, - }); - }} - > - 发起请求 - */} {/* 省份标签 */} @@ -182,23 +159,6 @@ export default function Index() { {/* 底部tabbar */} - {/* - { - if (current !== 0) { - Taro.redirectTo({ - url: "/pages/my/index", - }); - } - }} - current={0} - /> - */} diff --git a/src/pages/my/index.jsx b/src/pages/my/index.jsx index d5167ca..e26ced9 100644 --- a/src/pages/my/index.jsx +++ b/src/pages/my/index.jsx @@ -69,24 +69,6 @@ const my = () => { {/* 底部tabbar */} - {/* - { - console.log("current", current); - if (current !== 1) { - Taro.redirectTo({ - url: "/pages/index/index", - }); - } - }} - current={1} - /> - */} );