forked from gxwebsoft/mp-10550
优化细节
This commit is contained in:
@@ -138,10 +138,10 @@ const AddUserAddress = () => {
|
|||||||
<View className={'bg-gray-100 h-3'}></View>
|
<View className={'bg-gray-100 h-3'}></View>
|
||||||
<CellGroup style={{padding: '4px 0'}}>
|
<CellGroup style={{padding: '4px 0'}}>
|
||||||
<Form.Item name="name" label="收货人" initialValue={FormData.name} required>
|
<Form.Item name="name" label="收货人" initialValue={FormData.name} required>
|
||||||
<Input placeholder="请输入收货人姓名"/>
|
<Input placeholder="请输入收货人姓名" maxLength={10}/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item name="phone" label="手机号" initialValue={FormData.phone} required>
|
<Form.Item name="phone" label="手机号" initialValue={FormData.phone} required>
|
||||||
<Input placeholder="请输入手机号"/>
|
<Input placeholder="请输入手机号" maxLength={11}/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label="所在地区"
|
label="所在地区"
|
||||||
@@ -156,7 +156,7 @@ const AddUserAddress = () => {
|
|||||||
</div>
|
</div>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item name="address" label="收货地址" initialValue={FormData.address} required>
|
<Form.Item name="address" label="收货地址" initialValue={FormData.address} required>
|
||||||
<Input placeholder="请输入详细收货地址"/>
|
<TextArea maxLength={50} placeholder="请输入详细收货地址"/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</CellGroup>
|
</CellGroup>
|
||||||
</Form>
|
</Form>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import {useEffect, useState} from "react";
|
import {useState} from "react";
|
||||||
|
import Taro, {useDidShow} from '@tarojs/taro'
|
||||||
import {Button, Cell, CellGroup, Space, Empty, ConfigProvider, Divider} from '@nutui/nutui-react-taro'
|
import {Button, Cell, CellGroup, Space, Empty, ConfigProvider, Divider} from '@nutui/nutui-react-taro'
|
||||||
import {Dongdong, ArrowRight, CheckNormal, Checked} from '@nutui/icons-react-taro'
|
import {Dongdong, ArrowRight, CheckNormal, Checked} from '@nutui/icons-react-taro'
|
||||||
import Taro from '@tarojs/taro'
|
|
||||||
import {View} from '@tarojs/components'
|
import {View} from '@tarojs/components'
|
||||||
import {ShopUserAddress} from "@/api/shop/shopUserAddress/model";
|
import {ShopUserAddress} from "@/api/shop/shopUserAddress/model";
|
||||||
import {listShopUserAddress, removeShopUserAddress, updateShopUserAddress} from "@/api/shop/shopUserAddress";
|
import {listShopUserAddress, removeShopUserAddress, updateShopUserAddress} from "@/api/shop/shopUserAddress";
|
||||||
@@ -28,7 +28,7 @@ const Address = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const onDefault = async (item) => {
|
const onDefault = async (item) => {
|
||||||
if(address){
|
if (address) {
|
||||||
await updateShopUserAddress({
|
await updateShopUserAddress({
|
||||||
...address,
|
...address,
|
||||||
isDefault: false
|
isDefault: false
|
||||||
@@ -54,9 +54,9 @@ const Address = () => {
|
|||||||
reload();
|
reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useDidShow(() => {
|
||||||
reload()
|
reload()
|
||||||
}, []);
|
});
|
||||||
|
|
||||||
if (list.length == 0) {
|
if (list.length == 0) {
|
||||||
return (
|
return (
|
||||||
@@ -119,7 +119,8 @@ const Address = () => {
|
|||||||
删除
|
删除
|
||||||
</View>
|
</View>
|
||||||
<Divider direction={'vertical'}/>
|
<Divider direction={'vertical'}/>
|
||||||
<View className={'text-gray-400'} onClick={() => Taro.navigateTo({url: '/user/address/add?id=' + item.id})}>
|
<View className={'text-gray-400'}
|
||||||
|
onClick={() => Taro.navigateTo({url: '/user/address/add?id=' + item.id})}>
|
||||||
修改
|
修改
|
||||||
</View>
|
</View>
|
||||||
</>
|
</>
|
||||||
|
|||||||
Reference in New Issue
Block a user