|
@@ -16,7 +16,7 @@
|
|
|
</div>
|
|
|
<div class="user-info-key-body">
|
|
|
<span class="user-info-key-body-text">{{ formatAddress(walletStore.account) }}</span>
|
|
|
- <svg-icon style="width: 16px; height: 16px;" name="copy" />
|
|
|
+ <svg-icon class="im-copy-btn" style="width: 16px; height: 16px;" name="copy" :data-clipboard-text="walletStore.account"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -108,7 +108,11 @@
|
|
|
<div class="tree-li-text">{{ item.username }}</div>
|
|
|
<div class="tree-li-address">
|
|
|
<span>{{ formatAddress(item.account) }}</span>
|
|
|
- <svg-icon style="width: 16px; height: 16px;margin-left: 2px;" name="copy" />
|
|
|
+ <svg-icon
|
|
|
+ class="im-copy-btn"
|
|
|
+ style="width: 16px; height: 16px;margin-left: 2px;"
|
|
|
+ name="copy" :data-clipboard-text="item.account"
|
|
|
+ />
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -165,11 +169,15 @@
|
|
|
</div>
|
|
|
<div class="pop-list-li">
|
|
|
<div>收款地址</div>
|
|
|
- <div>{{formatAddress(item.to?.hash)}}<svg-icon style="width: 16px; height: 16px;" name="copy" /></div>
|
|
|
+ <div>{{formatAddress(item.to?.hash)}}
|
|
|
+ <svg-icon class="im-copy-btn" style="width: 16px; height: 16px;" name="copy" :data-clipboard-text="item.to?.hash"/>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="pop-list-li">
|
|
|
<div>hash</div>
|
|
|
- <div>{{formatAddress(item.hash)}}<svg-icon style="width: 16px; height: 16px;" name="copy" /></div>
|
|
|
+ <div>{{formatAddress(item.hash)}}
|
|
|
+ <svg-icon class="im-copy-btn" style="width: 16px; height: 16px;" name="copy" :data-clipboard-text="item.hash"/>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="pop-list-li" v-if="selectUrl.name == 'ACC'">
|
|
|
<div>矿工费</div>
|
|
@@ -189,6 +197,8 @@
|
|
|
import { useWalletStore } from "@/stores/modules/walletStore";
|
|
|
import { useSystemStore } from "@/stores/modules/systemStore";
|
|
|
import { transactions, tokenTransfers } from "@/api/path/backend.api";
|
|
|
+ import { useCopy } from "@/hooks/use-copy.js";
|
|
|
+ useCopy();
|
|
|
|
|
|
const router = useRouter();
|
|
|
const walletStore = useWalletStore();
|
|
@@ -233,19 +243,17 @@
|
|
|
showHistory.value = true;
|
|
|
}
|
|
|
const getList = async () => {
|
|
|
- const res = await transactions(walletStore.account)
|
|
|
- if (res.status === 200) {
|
|
|
- const items = res.data.items || []
|
|
|
- if (items.length > 0) {
|
|
|
- items.forEach(val => {
|
|
|
- val.timestamp = getDateTime(val.timestamp)
|
|
|
- val.gas_price = getPrice(val.fee.value).toFixed(9)
|
|
|
- if (val.value !== '0') {
|
|
|
- val.value = getPrice(val.value).toFixed(6)
|
|
|
- }
|
|
|
- })
|
|
|
- historyList.value = items
|
|
|
- }
|
|
|
+ const res = await transactions(walletStore.account);
|
|
|
+ const items = res.items || []
|
|
|
+ if (items.length > 0) {
|
|
|
+ items.forEach(val => {
|
|
|
+ val.timestamp = getDateTime(val.timestamp)
|
|
|
+ val.gas_price = getPrice(val.fee.value).toFixed(9)
|
|
|
+ if (val.value !== '0') {
|
|
|
+ val.value = getPrice(val.value).toFixed(6)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ historyList.value = items
|
|
|
}
|
|
|
}
|
|
|
const getDBList = async (DBaddress) => {
|
|
@@ -256,16 +264,14 @@
|
|
|
token: DBaddress
|
|
|
}
|
|
|
})
|
|
|
- if (res.status === 200) {
|
|
|
- const items = res.data.items || []
|
|
|
- if (items.length > 0) {
|
|
|
- items.forEach(val => {
|
|
|
- val.timestamp = getDateTime(val.timestamp)
|
|
|
- val.value = getPrice(val.total.value).toFixed(6)
|
|
|
- val.hash = val.transaction_hash
|
|
|
- })
|
|
|
- historyList.value = items
|
|
|
- }
|
|
|
+ const items = res.items || []
|
|
|
+ if (items.length > 0) {
|
|
|
+ items.forEach(val => {
|
|
|
+ val.timestamp = getDateTime(val.timestamp)
|
|
|
+ val.value = getPrice(val.total.value).toFixed(6)
|
|
|
+ val.hash = val.transaction_hash
|
|
|
+ })
|
|
|
+ historyList.value = items
|
|
|
}
|
|
|
}
|
|
|
// 计算总和
|
|
@@ -373,6 +379,7 @@
|
|
|
color: #FFFFFF;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
+ margin-bottom: 2px;
|
|
|
}
|
|
|
.user-info-key-body{
|
|
|
font-weight: 400;
|