feat(passport): 重构短信登录页并提供手机号授权降级入口

- 修复购物车数据库缺失 spec_info 字段问题,新增迁移脚本
- 登录页处理手机号授权失败,按错误类型弹窗引导用户改用短信登录
- 登录页新增长期显示的「使用短信验证码登录」入口,提升用户降级体验
- 注册页同步改造,去除微信小程序环境下短信按钮隐藏问题
- 短信登录页整体 UI 重构,弃用 NutUI 组件,采用原生组件实现
- 短信登录页新增渐变背景、浮动光圈、圆形 logo、卡片输入区设计
- 实现手机号输入、验证码发送、倒计时及登录校验逻辑全覆盖
- 短信登录页新增返回微信快捷登录链接,避免用户被困登录流程
- 新增配套样式文件,实现多重动效及分阶段入场动画
- 保证类型检查和编译无误,增加设计稿 HTML 预览文件
This commit is contained in:
2026-07-15 22:19:22 +08:00
parent b47ea6bd90
commit 4d646b3fd6

View File

@@ -190,6 +190,19 @@ const IndexPage: React.FC = () => {
}
}
// 轮播图数据:每个广告位下的所有图片都作为独立轮播项
const bannerSlides = banners.flatMap(item =>
(item.imageList && item.imageList.length > 0)
? item.imageList.map((img, idx) => ({
key: `${item.adId}-${img.uid || idx}`,
src: img.url || '',
path: item.path,
}))
: item.image
? [{ key: `${item.adId}-0`, src: item.image, path: item.path }]
: []
)
return (
<View className='min-h-screen bg-gray-50'>
{/* 顶部搜索栏 */}
@@ -221,21 +234,21 @@ const IndexPage: React.FC = () => {
<ScrollView scrollY style={{ height: scrollHeight }}>
{/* 轮播图 */}
<View className='mx-3 mt-2 rounded-lg overflow-hidden'>
{banners.length > 0 ? (
{bannerSlides.length > 0 ? (
<Swiper
autoplay
interval={3000}
className='rounded-lg'
style={{ height: '160px' }}
>
{banners.map(item => (
<SwiperItem key={item.adId}>
{bannerSlides.map(slide => (
<SwiperItem key={slide.key}>
<Image
className='w-full h-full'
src={getCompressedImageUrl(item.imageList?.[0]?.url || item.image || '', { width: 750, quality: 90})}
src={getCompressedImageUrl(slide.src, { width: 750, quality: 90 })}
mode='aspectFill'
onClick={() => {
if (item.path) Taro.navigateTo({ url: item.path })
if (slide.path) Taro.navigateTo({ url: slide.path })
}}
/>
</SwiperItem>