Merge remote-tracking branch 'ecshopx/feature/huiqiyd-173' into feature/huiqiyd-173

This commit is contained in:
qugao
2025-07-17 15:49:18 +08:00
2 changed files with 75 additions and 52 deletions

View File

@@ -8,7 +8,7 @@ import Taro, {
getCurrentInstance, getCurrentInstance,
useReady useReady
} from '@tarojs/taro' } from '@tarojs/taro'
import { View, Text, ScrollView } from '@tarojs/components' import { View, Text, ScrollView, Button } from '@tarojs/components'
import { useImmer } from 'use-immer' import { useImmer } from 'use-immer'
import { SpNavBar, SpFloatMenuItem, SpNote, SpLoading, SpImage, SpModalDivided } from '@/components' import { SpNavBar, SpFloatMenuItem, SpNote, SpLoading, SpImage, SpModalDivided } from '@/components'
import { useSyncCallback, useWhiteShop, useThemsColor } from '@/hooks' import { useSyncCallback, useWhiteShop, useThemsColor } from '@/hooks'
@@ -402,51 +402,69 @@ const SpPage = memo(
}} }}
> >
{/* {(state.btnReturn || state.btnHome) && ( */} {/* {(state.btnReturn || state.btnHome) && ( */}
<View <View
className='custom-navigation__left-block flex items-center' className='custom-navigation__left-block flex items-center'
style={{ style={{
// padding: `0 ${state.navigationLSpace}px 0 ${state.navigationLSpace}px`, // padding: `0 ${state.navigationLSpace}px 0 ${state.navigationLSpace}px`,
// maxWidth: `${state.menuWidth}px`, // maxWidth: `${state.menuWidth}px`,
// width: props.navigationLeftBlockWidthFull ? `${state.menuWidth}px` : 'auto' // width: props.navigationLeftBlockWidthFull ? `${state.menuWidth}px` : 'auto'
// margin: `${state.navigationLSpace}px 0px` // margin: `${state.navigationLSpace}px 0px`
gap: `${state.navigationLSpace}px`, gap: `${state.navigationLSpace}px`,
width: `${state.menuWidth}px`, width: `${state.menuWidth}px`,
height: '100%' height: '100%'
}} }}
> >
{state.btnReturn && ( {state.btnReturn && (
<SpImage
src='fv_back.png'
width={36}
height={36}
onClick={() => Taro.navigateBack()}
/>
)}
{state.btnHome && (
<SpImage
src='fv_home.png'
width={36}
height={36}
onClick={() => {
Taro.reLaunch({
url: isGoodsShelves()
? '/subpages/guide/index'
: VERSION_IN_PURCHASE
? '/pages/purchase/index'
: '/pages/index'
})
}}
/>
)}
{props.pageConfig?.pTitleHotSetting?.imgUrl && (
<View className='p-title-hot-img'>
<SpImage <SpImage
src='fv_back.png' src={props.pageConfig?.pTitleHotSetting?.imgUrl}
width={36} mode='aspectFit'
height={36} ></SpImage>
onClick={() => Taro.navigateBack()} {props.pageConfig?.pTitleHotSetting?.data?.map((citem) => {
/> console.log(citem)
)} if (citem.id == 'customerService') {
{state.btnHome && ( return (
<SpImage <Button
src='fv_home.png' key={citem.id}
width={36} className='img-hotzone_zone opacity-0'
height={36} type='button'
onClick={() => { style={styleNames({
Taro.reLaunch({ width: `${citem.widthPer * 100}%`,
url: isGoodsShelves() height: `${citem.heightPer * 100}%`,
? '/subpages/guide/index' top: `${citem.topPer * 100}%`,
: VERSION_IN_PURCHASE left: `${citem.leftPer * 100}%`
? '/pages/purchase/index' })}
: '/pages/index' openType='contact'
}) />
}} )
/> }
)} return (
{props.pageConfig?.pTitleHotSetting?.imgUrl && (
<View className='p-title-hot-img'>
<SpImage
src={props.pageConfig?.pTitleHotSetting?.imgUrl}
mode='aspectFit'
>
</SpImage>
{props.pageConfig?.pTitleHotSetting?.data?.map(citem => (
<View <View
key={citem.id}
className='img-hotzone_zone' className='img-hotzone_zone'
style={styleNames({ style={styleNames({
width: `${citem.widthPer * 100}%`, width: `${citem.widthPer * 100}%`,
@@ -456,16 +474,18 @@ const SpPage = memo(
})} })}
onClick={() => linkPage(citem)} onClick={() => linkPage(citem)}
/> />
))} )
</View> })}
)} </View>
</View> )}
</View>
{/* )} */} {/* )} */}
<View className='custom-navigation__center-block flex-1 flex items-center justify-items-center' style={styleNames(pageCenterStyle)}> <View
className='custom-navigation__center-block flex-1 flex items-center justify-items-center'
style={styleNames(pageCenterStyle)}
>
{props.renderNavigation ? ( {props.renderNavigation ? (
<context.Provider> <context.Provider>{props.renderNavigation}</context.Provider>
{props.renderNavigation}
</context.Provider>
) : ( ) : (
<View className='title-container' style={styleNames(pageTitleStyle)}> <View className='title-container' style={styleNames(pageTitleStyle)}>
{renderTitle || props.title || navigationBarTitleText} {renderTitle || props.title || navigationBarTitleText}

View File

@@ -216,5 +216,8 @@
.img-hotzone_zone { .img-hotzone_zone {
position: absolute; position: absolute;
} }
.opacity-0 {
opacity: 0;
}
} }
} }