|
@@ -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);
|