wkw hace 2 días
padre
commit
4e06dffa24
Se han modificado 1 ficheros con 12 adiciones y 2 borrados
  1. 12 2
      src/views/wallet/walletDetail/index.vue

+ 12 - 2
src/views/wallet/walletDetail/index.vue

@@ -81,6 +81,8 @@ import { useWalletStore } from '@/stores/modules/walletStore';
 import { showNotify } from 'vant';
 import { useRoute } from 'vue-router';
 import { cryptoDecode } from "@/utils/crypto.js"
+import { userInfoEdit } from "@/api/path/im.api";
+import { updateUserInfo } from "@/common/login";
 import { useCopy } from "@/hooks/use-copy.js";
 useCopy();
 
@@ -118,10 +120,18 @@ const cancel = () => {
     show.value = false;
 };
 
-const confirm = () => {
+const confirm = async () => {
     if (type.value == 1) {
         // 修改钱包名称
-        walletStore.updateWalletName(id, text.value);
+        // walletStore.updateWalletName(id, text.value);
+        const { code} = await userInfoEdit({
+            username:  walletStore.account,
+            nickname:  text.value
+        });
+        if (code === 200) {
+            await updateUserInfo(walletStore.account,id);
+        }
+  show.value = false;
     } else if (type.value == 3) {
         // 删除钱包
         walletStore.deleteWallet(id, text.value);