From a3d42fdd40a3fec293b436bd8a07f8f5114fabb6 Mon Sep 17 00:00:00 2001 From: Qingtian239113 <980287353@qq.com> Date: Mon, 28 Mar 2022 11:30:25 +0800 Subject: [PATCH] =?UTF-8?q?pref=EF=BC=9A=E7=A7=BB=E9=99=A4=E5=A4=9A?= =?UTF-8?q?=E4=BD=99=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app.config.js | 1 - src/components/CustomTabBar/index.jsx | 40 ------------------- src/components/CustomTabBar/index.module.less | 31 -------------- src/components/GcRichText/index.jsx | 2 +- src/pages/tabs/home.config.js | 1 - 5 files changed, 1 insertion(+), 74 deletions(-) delete mode 100644 src/components/CustomTabBar/index.jsx delete mode 100644 src/components/CustomTabBar/index.module.less diff --git a/src/app.config.js b/src/app.config.js index ef08f94..7a5f66f 100644 --- a/src/app.config.js +++ b/src/app.config.js @@ -44,7 +44,6 @@ export default { ...config.app.window, }, tabBar: { - custom: true, list: [ {pagePath: "pages/tabs/home", text: "首页"}, {pagePath: "pages/tabs/mine", text: "我的"} diff --git a/src/components/CustomTabBar/index.jsx b/src/components/CustomTabBar/index.jsx deleted file mode 100644 index 1c61390..0000000 --- a/src/components/CustomTabBar/index.jsx +++ /dev/null @@ -1,40 +0,0 @@ -import React from "react"; -import less from './index.module.less'; -import Taro from "@tarojs/taro"; -import Flex from "@/components/Flex"; -import config from "@/config/config"; -import GcImage from "@/components/GcImage"; - -const CustomTabBar = ({tabIdx = 1}) => { - - ///////////////////////////////////////// 逻辑方法 - - /** - * 切换tab - * @param idx - */ - const switchTab = (idx) => { - Taro.switchTab({url: config.app.tabbar.list[idx].url}).then(res => { - - }) - }; - - ///////////////////////////////////////// 页面渲染 - - return - {config.app.tabbar?.list?.map((item, idx) => { - return switchTab(idx)} - > - - {item.title} - - })} - -}; - -export default CustomTabBar; diff --git a/src/components/CustomTabBar/index.module.less b/src/components/CustomTabBar/index.module.less deleted file mode 100644 index fbee0f9..0000000 --- a/src/components/CustomTabBar/index.module.less +++ /dev/null @@ -1,31 +0,0 @@ -@import 'build_config/xihu/assets/less/constant.less'; - -.tabbar { - width: 100vw; - color: white; - height: calc(130px + env(safe-area-inset-bottom)); - position: fixed; - bottom: 0; - left: 0; - z-index: 100; - padding-bottom: env(safe-area-inset-bottom); - - .tab { - width: 0; - padding: 24px; - - .icn { - width: 44px; - height: 44px; - } - - .dot { - margin-top: 4px; - border-radius: 10px; - font-size: 24px; - } - } - -} - - diff --git a/src/components/GcRichText/index.jsx b/src/components/GcRichText/index.jsx index b614c51..f49eee2 100644 --- a/src/components/GcRichText/index.jsx +++ b/src/components/GcRichText/index.jsx @@ -9,7 +9,7 @@ import {View} from "@tarojs/components"; Taro.options.html.transformElement = (el) => { if (el.nodeName === "image") { - const path = HttpUtils.imageUrl(el.props.src); + const path = HttpUtils.getImageUrl(el.props.src); el.setAttribute("src", path); el.setAttribute("mode", "widthFix"); } diff --git a/src/pages/tabs/home.config.js b/src/pages/tabs/home.config.js index 6372ba0..6ccc3bd 100644 --- a/src/pages/tabs/home.config.js +++ b/src/pages/tabs/home.config.js @@ -2,5 +2,4 @@ export default { navigationBarTitleText: '', enablePullDownRefresh: true, enableShareAppMessage: true, - navigationStyle: "custom", }