diff --git a/src/user/address/add.tsx b/src/user/address/add.tsx
index b116519..2c7980d 100644
--- a/src/user/address/add.tsx
+++ b/src/user/address/add.tsx
@@ -138,10 +138,10 @@ const AddUserAddress = () => {
-
+
-
+
{
-
+
diff --git a/src/user/address/index.tsx b/src/user/address/index.tsx
index bcb932a..b0e0e93 100644
--- a/src/user/address/index.tsx
+++ b/src/user/address/index.tsx
@@ -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 {Dongdong, ArrowRight, CheckNormal, Checked} from '@nutui/icons-react-taro'
-import Taro from '@tarojs/taro'
import {View} from '@tarojs/components'
import {ShopUserAddress} from "@/api/shop/shopUserAddress/model";
import {listShopUserAddress, removeShopUserAddress, updateShopUserAddress} from "@/api/shop/shopUserAddress";
@@ -28,7 +28,7 @@ const Address = () => {
}
const onDefault = async (item) => {
- if(address){
+ if (address) {
await updateShopUserAddress({
...address,
isDefault: false
@@ -54,9 +54,9 @@ const Address = () => {
reload();
}
- useEffect(() => {
+ useDidShow(() => {
reload()
- }, []);
+ });
if (list.length == 0) {
return (
@@ -119,7 +119,8 @@ const Address = () => {
删除
- Taro.navigateTo({url: '/user/address/add?id=' + item.id})}>
+ Taro.navigateTo({url: '/user/address/add?id=' + item.id})}>
修改
>