|
@@ -5,7 +5,7 @@
|
|
</div>
|
|
</div>
|
|
<div class="username">{{ walletStore.username || "Angel Token" }}</div>
|
|
<div class="username">{{ walletStore.username || "Angel Token" }}</div>
|
|
<div class="useraddress">
|
|
<div class="useraddress">
|
|
- <span>0xF3fefE…EcaB</span>
|
|
|
|
|
|
+ <span>{{formatAddress(walletStore.account)}}</span>
|
|
<svg-icon style="width: 18px; height: 18px" name="copy" />
|
|
<svg-icon style="width: 18px; height: 18px" name="copy" />
|
|
</div>
|
|
</div>
|
|
<van-list class="user-bar-list">
|
|
<van-list class="user-bar-list">
|
|
@@ -51,7 +51,6 @@
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
import QrcodeVue from "qrcode.vue";
|
|
import QrcodeVue from "qrcode.vue";
|
|
-import { useSystemStore } from "@/stores/modules/systemStore";
|
|
|
|
import { useWalletStore } from "@/stores/modules/walletStore";
|
|
import { useWalletStore } from "@/stores/modules/walletStore";
|
|
import { uploadFile, userInfoEdit } from "@/api/path/im.api";
|
|
import { uploadFile, userInfoEdit } from "@/api/path/im.api";
|
|
import { updateUserInfo } from "@/common/login";
|
|
import { updateUserInfo } from "@/common/login";
|
|
@@ -68,7 +67,7 @@ const afterRead = async (file) => {
|
|
formData.append("file", file.file);
|
|
formData.append("file", file.file);
|
|
const { code, data } = await uploadFile(formData);
|
|
const { code, data } = await uploadFile(formData);
|
|
if (code === 200) {
|
|
if (code === 200) {
|
|
- await updateUserInfo(walletStore.account);
|
|
|
|
|
|
+ await updateUserInfo(walletStore.account,walletStore.id);
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
|
|
@@ -78,10 +77,14 @@ const updateUserName = async () => {
|
|
nickname: nickname.value,
|
|
nickname: nickname.value,
|
|
});
|
|
});
|
|
if (code === 200) {
|
|
if (code === 200) {
|
|
- await updateUserInfo(walletStore.account);
|
|
|
|
|
|
+ await updateUserInfo(walletStore.account,walletStore.id);
|
|
}
|
|
}
|
|
show.value = false;
|
|
show.value = false;
|
|
};
|
|
};
|
|
|
|
+const formatAddress = (address) => {
|
|
|
|
+ if (!address) return '';
|
|
|
|
+ return address.slice(0, 8) + '...' + address.slice(-6);
|
|
|
|
+};
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
<style lang="less" scoped>
|