fix(search): 修复搜索页商品状态筛选条件错误

- 将搜索页商品筛选条件由 isShow: 1 修改为 status: 0,统一与商城主页规则
- 确认收藏列表和浏览历史不受影响,维护数据一致性

feat(price): 全站商品价格登录后可见脱敏实现

- 将所有硬编码价格替换为支持游客脱敏的 <Price loginMask> 组件
- 覆盖首页热销、收藏列表、秒杀列表、秒杀详情、拼团列表和拼团详情多个页面
- 秒杀详情价格组件支持白色字体,保持视觉效果一致
This commit is contained in:
2026-06-27 21:43:55 +08:00
parent fd6ba02d37
commit c2de1fcd12
8 changed files with 58 additions and 32 deletions

View File

@@ -7,6 +7,7 @@ import type { ShopGroupBuy, ShopGroupBuyRecord } from '@/api/shop/shopGroupBuy/m
import type { ShopGoods } from '@/api/shop/shopGoods/model'
import type { ShopGoodsSku } from '@/api/shop/shopGoodsSku/model'
import SkuSelector from '@/components/business/SkuSelector'
import Price from '@/components/common/Price'
definePageConfig({
navigationBarTitleText: '拼团详情',
@@ -192,12 +193,12 @@ const GroupBuyDetailPage: React.FC = () => {
{groupBuy.goodsName || groupBuy.product?.name}
</Text>
<View className="flex items-baseline gap-2">
<Text className="text-2xl font-bold text-red-500">
¥{groupBuy.groupPrice}
</Text>
<Text className="text-xs text-gray-400 line-through">
¥{groupBuy.product?.price || 0}
</Text>
<Price
price={groupBuy.groupPrice}
original={groupBuy.product?.price || 0}
size='large'
loginMask
/>
</View>
<View className="flex items-center gap-2 mt-1">
{isActive && remaining > 0 && (

View File

@@ -4,6 +4,7 @@ import Taro from '@tarojs/taro'
import { pageShopGroupBuy } from '@/api/shop/shopGroupBuy'
import type { ShopGroupBuy } from '@/api/shop/shopGroupBuy/model'
import EmptyState from '@/components/common/EmptyState'
import Price from '@/components/common/Price'
definePageConfig({
navigationBarTitleText: '拼团活动',
@@ -91,12 +92,12 @@ const GroupBuyListPage: React.FC = () => {
<View className='flex items-center justify-between mt-1'>
<View className='flex items-baseline gap-1'>
<Text className='text-lg font-bold text-red-500'>
{'\u00A5'}{item.groupPrice}
</Text>
<Text className='text-xs text-gray-400 line-through'>
{'\u00A5'}{item.product?.price || 0}
</Text>
<Price
price={item.groupPrice}
original={item.product?.price || 0}
size='small'
loginMask
/>
</View>
<View
className='px-3 py-1 rounded-full text-white text-xs'

View File

@@ -7,6 +7,7 @@ import type { ShopSeckill } from '@/api/shop/shopSeckill/model'
import type { ShopGoods } from '@/api/shop/shopGoods/model'
import type { ShopGoodsSku } from '@/api/shop/shopGoodsSku/model'
import SkuSelector from '@/components/business/SkuSelector'
import Price from '@/components/common/Price'
definePageConfig({
navigationBarTitleText: '秒杀详情',
@@ -199,12 +200,13 @@ const SeckillDetailPage: React.FC = () => {
{/* 价格和倒计时 */}
<View className="px-4 py-4" style={{ background: 'linear-gradient(135deg, #ef4444 0%, #dc2626 100%)' }}>
<View className="flex items-baseline gap-2">
<Text className="text-3xl font-bold text-white">
¥{seckill.seckillPrice}
</Text>
<Text className="text-sm text-red-200 line-through">
¥{seckill.product?.price || 0}
</Text>
<Price
price={seckill.seckillPrice}
original={seckill.product?.price || 0}
size='large'
color='#ffffff'
loginMask
/>
</View>
<View className="flex items-center justify-between mt-3">
<View className="bg-white rounded px-2 py-1">

View File

@@ -4,6 +4,7 @@ import Taro from '@tarojs/taro'
import { pageShopSeckill } from '@/api/shop/shopSeckill'
import type { ShopSeckill } from '@/api/shop/shopSeckill/model'
import EmptyState from '@/components/common/EmptyState'
import Price from '@/components/common/Price'
definePageConfig({
navigationBarTitleText: '限时秒杀',
@@ -121,12 +122,12 @@ const SeckillListPage: React.FC = () => {
<View className='flex items-center justify-between mt-1'>
<View className='flex items-baseline gap-1'>
<Text className='text-lg font-bold text-red-500'>
{'\u00A5'}{item.seckillPrice}
</Text>
<Text className='text-xs text-gray-400 line-through'>
{'\u00A5'}{item.product?.price || 0}
</Text>
<Price
price={item.seckillPrice}
original={item.product?.price || 0}
size='small'
loginMask
/>
</View>
<View
className='px-3 py-1 rounded-full text-white text-xs'