feat(home): 重构首页轮播图组件并优化广告数据处理
- 修改首页轮播图组件,替换为新的 Banner 组件实现 - 新增广告图片数据标准化处理函数,支持多种字段格式兼容 - 优化首页广告数据加载逻辑,改用 Promise.allSettled 并行请求 - 修复轮播图高度计算,添加数字转换安全处理 - 调整经销商申请页面文本,将"入驻申请"改为"门店入驻" - 修复商品卡片图片显示,添加空值处理防止报错 - 临时隐藏搜索栏组件,设置为隐藏状态 - 恢复开发环境 API 地址配置,便于本地调试 - 移除经销商申请表单中邀请人 ID 的禁用状态
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import Header from './Header'
|
||||
import Banner from './Banner'
|
||||
import Taro, { useShareAppMessage } from '@tarojs/taro'
|
||||
import { View, Text, Image, ScrollView } from '@tarojs/components'
|
||||
import { useEffect, useMemo, useState, type ReactNode } from 'react'
|
||||
@@ -199,39 +200,8 @@ function Home() {
|
||||
<Header />
|
||||
|
||||
<View className="home-page">
|
||||
{/* 顶部活动主视觉 */}
|
||||
<View className="home-hero">
|
||||
<View className="home-hero__bg" />
|
||||
<View className="home-hero__content">
|
||||
<View className="home-hero__left">
|
||||
<View className="home-hero__topRow">
|
||||
<View className="home-hero__brand">
|
||||
<Text className="home-hero__brandText">桂乐淘</Text>
|
||||
</View>
|
||||
<View className="home-hero__tag">
|
||||
<Text className="home-hero__tagText">新人有礼</Text>
|
||||
</View>
|
||||
<View className="home-hero__date">
|
||||
<Text className="home-hero__dateText">202X年X月X日 - X月X日</Text>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
<View className="home-hero__headline">
|
||||
<Text className="home-hero__headlineText">大容量家庭装</Text>
|
||||
<Text className="home-hero__headlineText">净含量15L</Text>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
<View className="home-hero__right">
|
||||
<View className="home-hero__bottle">
|
||||
<View className="home-hero__bottleCap" />
|
||||
<View className="home-hero__bottleLabel">
|
||||
<Text className="home-hero__bottleLabelText">山泉水</Text>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
{/* 顶部活动主视觉:使用 Banner 组件 */}
|
||||
<Banner />
|
||||
|
||||
{/* 电子水票 */}
|
||||
<View className="ticket-card">
|
||||
@@ -283,7 +253,7 @@ function Home() {
|
||||
<View className="goods-card__imgWrap">
|
||||
<Image
|
||||
className="goods-card__img"
|
||||
src={item.image}
|
||||
src={item.image || ''}
|
||||
mode="aspectFill"
|
||||
lazyLoad={false}
|
||||
onClick={() =>
|
||||
|
||||
Reference in New Issue
Block a user