diff --git a/src/pages/home/wgts/content-partition/index.jsx b/src/pages/home/wgts/content-partition/index.jsx index 310a83c4f..2e42f27df 100644 --- a/src/pages/home/wgts/content-partition/index.jsx +++ b/src/pages/home/wgts/content-partition/index.jsx @@ -29,8 +29,10 @@ export default function WgtContentPartition(props) { const activeIndex = navList.findIndex((item) => item.isActive) if (activeIndex >= 0) { setCurrentIndex(activeIndex) + setChildren(navList[activeIndex]?.children || []) } else { setCurrentIndex(0) + setChildren(navList[0]?.children || []) } }, [navList]) diff --git a/src/pages/home/wgts/couponcard/index.jsx b/src/pages/home/wgts/couponcard/index.jsx index 50f824a85..8643058c0 100644 --- a/src/pages/home/wgts/couponcard/index.jsx +++ b/src/pages/home/wgts/couponcard/index.jsx @@ -2,21 +2,16 @@ * Copyright © ShopeX (http://www.shopex.cn). All rights reserved. * See LICENSE file for license details. */ -import React, { useState, useMemo, useEffect } from 'react' +import React, { useMemo, useEffect } from 'react' import Taro, { getCurrentInstance } from '@tarojs/taro' -import { View, Text } from '@tarojs/components' +import { View } from '@tarojs/components' import { - pxToUnitRpx, classNames, pickBy, isWeixin, - showToast, - getMobAppExtraData, - styleNames -} from '@/utils' + showToast} from '@/utils' import { useImmer } from 'use-immer' -import { SpHtml, SpLogin } from '@/components' -import { useSelector } from 'react-redux' +import { SpLogin } from '@/components' import api from '@/api' import doc from '@/doc' import { getGlobalBaseStyle } from '../helper' diff --git a/src/pages/home/wgts/location-module/index.jsx b/src/pages/home/wgts/location-module/index.jsx index 562fab8b6..cdf78c133 100644 --- a/src/pages/home/wgts/location-module/index.jsx +++ b/src/pages/home/wgts/location-module/index.jsx @@ -198,8 +198,6 @@ export default function WgtLocationModule(props) { return totalHeight }, [base, immersive, navBarHeight]) - // 打印计算结果(用于调试) - console.log('LocationModuleNavBar 高度计算:', calculateNavBarHeight) return (