feat: refresh design list and order pages
This commit is contained in:
@@ -120,7 +120,7 @@ export default function DesignListPage() {
|
||||
<ThemedPageMeta />
|
||||
<LoginGuard>
|
||||
<View className='design-page'>
|
||||
<View className='page-header dashed-card mt-20' style={{ marginTop: `${safe.headerPaddingTop}px` }}>
|
||||
<View className='page-header surface-card mt-20' style={{ marginTop: `${safe.headerPaddingTop}px` }}>
|
||||
<View className='flex-between' style={{ width: '100%' }}>
|
||||
<Text className='back-btn' onTap={() => Taro.navigateBack()}>←</Text>
|
||||
<Text className='page-title'>我的设计清单</Text>
|
||||
@@ -148,7 +148,7 @@ export default function DesignListPage() {
|
||||
|
||||
{/* 批量管理工具栏 */}
|
||||
{managing && (
|
||||
<View className='batch-bar dashed-card'>
|
||||
<View className='batch-bar surface-card'>
|
||||
<View className='flex-between' style={{ width: '100%' }}>
|
||||
<View className='batch-select-all' onTap={toggleSelectAll}>
|
||||
<View className={`batch-checkbox ${selected.size === filtered.length && filtered.length > 0 ? 'checked' : ''}`} />
|
||||
@@ -165,7 +165,7 @@ export default function DesignListPage() {
|
||||
<ScrollView className='design-list' scrollY>
|
||||
{filtered.map(item => {
|
||||
const style = STATUS_STYLE[item.status]
|
||||
const rawIcon = item.productIcon?.startsWith('/icon/') || /^https?:/i.test(item.productIcon || '')
|
||||
const rawIcon = (item.productIcon || '').startsWith('/icon/') || /^https?:/i.test(item.productIcon || '')
|
||||
? item.productIcon
|
||||
: PRODUCT_ICON_MAP[item.productId] || '/icon/四角星.svg'
|
||||
const iconSrc = assetUrl(rawIcon)
|
||||
@@ -173,7 +173,7 @@ export default function DesignListPage() {
|
||||
return (
|
||||
<View
|
||||
key={item.id}
|
||||
className={`design-card dashed-card ${isSelected ? 'selected' : ''}`}
|
||||
className={`design-card surface-card ${isSelected ? 'selected' : ''}`}
|
||||
onTap={() => managing ? toggleSelect(item.id) : undefined}
|
||||
>
|
||||
<View className='design-body'>
|
||||
@@ -193,12 +193,12 @@ export default function DesignListPage() {
|
||||
{!managing && (
|
||||
<View className='design-actions'>
|
||||
{item.status !== 'ordered' && (
|
||||
<View className='btn-gradient design-btn' onTap={() => goDesign(item)}>
|
||||
<View className='btn-primary design-btn' onTap={() => goDesign(item)}>
|
||||
<Text>{item.status === 'undesigned' ? '开始设计' : '继续设计'}</Text>
|
||||
</View>
|
||||
)}
|
||||
{item.status === 'ordered' && (
|
||||
<View className='btn-outline design-btn' onTap={() => Taro.switchTab({ url: '/pages/orders/index' })}>
|
||||
<View className='btn-secondary design-btn' onTap={() => Taro.switchTab({ url: '/pages/orders/index' })}>
|
||||
<Text>查看订单</Text>
|
||||
</View>
|
||||
)}
|
||||
@@ -213,7 +213,7 @@ export default function DesignListPage() {
|
||||
<Image className='empty-icon-img' src={assetUrl('/icon/调色盘.png')} mode='aspectFit' />
|
||||
<Text className='empty-text'>还没有设计清单</Text>
|
||||
<Text className='empty-sub'>去首页逛逛,找到喜欢的定制品</Text>
|
||||
<View className='btn-gradient' onTap={() => Taro.switchTab({ url: '/pages/index/index' })}>
|
||||
<View className='btn-primary' onTap={() => Taro.switchTab({ url: '/pages/index/index' })}>
|
||||
<Text>去逛逛</Text>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
Reference in New Issue
Block a user