From 1f7e775e7a15ec7df4787fd3999bf0aa3253fbe8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com>
Date: Thu, 24 Jul 2025 19:47:36 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=BB=86=E8=8A=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/user/address/add.tsx | 6 +++---
src/user/address/index.tsx | 13 +++++++------
2 files changed, 10 insertions(+), 9 deletions(-)
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})}>
修改
>