商品浏览页构建前最后一次更新
This commit is contained in:
+10
-10
@@ -1,4 +1,4 @@
|
||||
import { View, Text, Input, Picker } from '@tarojs/components'
|
||||
import { View, Text, Image, Input, Picker } from '@tarojs/components'
|
||||
import Taro from '@tarojs/taro'
|
||||
import { useState, useEffect } from 'react'
|
||||
import './index.scss'
|
||||
@@ -96,7 +96,7 @@ export default function AddressPage() {
|
||||
<View className='page-header dashed-card mt-20'>
|
||||
<View className='star-badge' />
|
||||
<View className='flex-between' style={{ width: '100%' }}>
|
||||
<Text className='back-btn' onClick={() => Taro.navigateBack()}>←</Text>
|
||||
<Text className='back-btn' onTap={() => Taro.navigateBack()}>←</Text>
|
||||
<Text className='page-title'>收货地址</Text>
|
||||
<View style={{ width: '60px' }} />
|
||||
</View>
|
||||
@@ -119,16 +119,16 @@ export default function AddressPage() {
|
||||
</Text>
|
||||
</View>
|
||||
<View className='address-actions'>
|
||||
<Text className='address-act' onClick={() => openEdit(item)}>✏️ 编辑</Text>
|
||||
<Text className='address-act' onClick={() => handleCopy(item)}>📋 复制</Text>
|
||||
<Text className='address-act delete' onClick={() => handleDelete(item.id)}>🗑️ 删除</Text>
|
||||
<Text className='address-act' onTap={() => openEdit(item)}>✏️ 编辑</Text>
|
||||
<Text className='address-act' onTap={() => handleCopy(item)}>📋 复制</Text>
|
||||
<Text className='address-act delete' onTap={() => handleDelete(item.id)}>🗑️ 删除</Text>
|
||||
</View>
|
||||
</View>
|
||||
))}
|
||||
|
||||
{list.length === 0 && (
|
||||
<View className='empty-state'>
|
||||
<Text className='empty-icon'>📍</Text>
|
||||
<Image className='empty-icon-img' src='/icon/地址.png' mode='aspectFit' />
|
||||
<Text className='empty-text'>还没有收货地址</Text>
|
||||
<Text className='empty-sub'>点击下方按钮添加新地址</Text>
|
||||
</View>
|
||||
@@ -139,7 +139,7 @@ export default function AddressPage() {
|
||||
|
||||
{/* 底部添加按钮 */}
|
||||
<View className='action-bar'>
|
||||
<View className='btn-gradient' onClick={openAdd}>
|
||||
<View className='btn-gradient' onTap={openAdd}>
|
||||
<Text>新增收货地址</Text>
|
||||
</View>
|
||||
</View>
|
||||
@@ -167,16 +167,16 @@ export default function AddressPage() {
|
||||
<Input className='form-input' placeholder='详细地址:街道、门牌号'
|
||||
value={detail} onInput={(e: any) => setDetail(e.detail.value)} />
|
||||
|
||||
<View className='form-row' onClick={() => setIsDefault(!isDefault)}>
|
||||
<View className='form-row' onTap={() => setIsDefault(!isDefault)}>
|
||||
<Text className='form-label'>设为默认地址</Text>
|
||||
<View className={`checkbox ${isDefault ? 'checked' : ''}`} />
|
||||
</View>
|
||||
|
||||
<View className='form-actions'>
|
||||
<View className='btn-outline' onClick={() => { setShowForm(false); resetForm() }}>
|
||||
<View className='btn-outline' onTap={() => { setShowForm(false); resetForm() }}>
|
||||
<Text>取消</Text>
|
||||
</View>
|
||||
<View className='btn-gradient' onClick={handleSave}>
|
||||
<View className='btn-gradient' onTap={handleSave}>
|
||||
<Text>保存</Text>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
Reference in New Issue
Block a user