Commit 6b391d35 authored by chenqikuai's avatar chenqikuai

fix

parent 9170da69
<template> <template>
<div class="fixed top-0 w-full z-50 flex justify-center ease-in duration-200" :class="{'bg-white': $route.path !== '/home' || !isTop, 'min-w-1200': !isMobile}"> <div class="fixed top-0 w-full flex justify-center ease-in duration-200" style="z-index: 3000" :class="{'bg-white': $route.path !== '/home' || !isTop, 'min-w-1200': !isMobile}">
<div v-if="!isMobile" class="min-w-1200 h-16 text-footer-color md:w-bodySet flex justify-between items-center ease-in duration-500"> <div v-if="!isMobile" class="min-w-1200 h-16 text-footer-color md:w-bodySet flex justify-between items-center ease-in duration-500">
<div class="flex items-center"> <div class="flex items-center">
<img src="@/assets/images/header/logo.png" alt="logo" width="164"> <img src="@/assets/images/header/logo.png" alt="logo" width="164">
......
...@@ -8,17 +8,15 @@ export default Vue.extend({ ...@@ -8,17 +8,15 @@ export default Vue.extend({
searchInputPlaceholder, searchInputPlaceholder,
searchValue: "", searchValue: "",
data: {} as any, data: {} as any,
loading: false,
}; };
}, },
async mounted() {
const ret = await queryTransaction( mounted() {
"ycc", this.init();
"/yccApi", },
this.$route.query.hash as string activated() {
); this.init();
if (ret) {
this.data = ret;
}
}, },
methods: { methods: {
clickSearch(str: string) { clickSearch(str: string) {
...@@ -27,5 +25,17 @@ export default Vue.extend({ ...@@ -27,5 +25,17 @@ export default Vue.extend({
setSearchValue(v: string) { setSearchValue(v: string) {
this.searchValue = v; this.searchValue = v;
}, },
async init() {
this.loading = true;
const ret = await queryTransaction(
"ycc",
"/yccApi",
this.$route.query.hash as string
);
this.loading = false;
if (ret) {
this.data = ret;
}
},
}, },
}); });
...@@ -71,7 +71,6 @@ const formatTime = (date: any, format = "yyyy-MM-dd hh:mm:ss") => { ...@@ -71,7 +71,6 @@ const formatTime = (date: any, format = "yyyy-MM-dd hh:mm:ss") => {
}; };
const decodeTransferNote = (tx: any = {}) => { const decodeTransferNote = (tx: any = {}) => {
console.log(tx, 'in decodeTransferNote');
let payload: any = ""; let payload: any = "";
if (tx.execer === "user.p.xunku.storage") { if (tx.execer === "user.p.xunku.storage") {
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<label> <label>
<span>{{ $t('lang.txDetail.txHash') }}</span> <span>{{ $t('lang.txDetail.txHash') }}</span>
</label> </label>
<div class="item-text flex items-center"> <div class="item-text flex items-center" v-loading="loading">
<span>{{ data.hash }}</span> <span>{{ data.hash }}</span>
<copy-btn :copyTxt="data.hash" class="ml-2">复制</copy-btn> <copy-btn :copyTxt="data.hash" class="ml-2">复制</copy-btn>
</div> </div>
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<label> <label>
<span>{{ $t('lang.txDetail.status') }}</span> <span>{{ $t('lang.txDetail.status') }}</span>
</label> </label>
<div class="item-text"> <div class="item-text" v-loading="loading">
<div <div
:class="['status', data.status === true ? 'success' : 'faild']" :class="['status', data.status === true ? 'success' : 'faild']"
class="flex items-center" class="flex items-center"
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
<label> <label>
<span>{{ $t('lang.txDetail.height') }}</span> <span>{{ $t('lang.txDetail.height') }}</span>
</label> </label>
<div class="item-text"> <div class="item-text" v-loading="loading">
<router-link :to="`/blockDetail?height=${data.height}`" class="light"> <router-link :to="`/blockDetail?height=${data.height}`" class="light">
{{ data.height }} {{ data.height }}
</router-link> </router-link>
...@@ -64,13 +64,15 @@ ...@@ -64,13 +64,15 @@
<label> <label>
<span>{{ $t('lang.txDetail.time') }}</span> <span>{{ $t('lang.txDetail.time') }}</span>
</label> </label>
<div class="item-text">{{ data.blockTime | formatTime }}</div> <div class="item-text" v-loading="loading">
{{ data.blockTime | formatTime }}
</div>
</div> </div>
<div class="item line flex items-center"> <div class="item line flex items-center">
<label> <label>
<span>{{ $t('lang.trade.sender') }}</span> <span>{{ $t('lang.trade.sender') }}</span>
</label> </label>
<div class="item-text"> <div class="item-text" v-loading="loading">
<router-link :to="`/address?address=${data.from}`" class="light"> <router-link :to="`/address?address=${data.from}`" class="light">
{{ data.from }} {{ data.from }}
</router-link> </router-link>
...@@ -80,7 +82,7 @@ ...@@ -80,7 +82,7 @@
<label> <label>
<span>{{ $t('lang.trade.receiver') }}</span> <span>{{ $t('lang.trade.receiver') }}</span>
</label> </label>
<div class="item-text"> <div class="item-text" v-loading="loading">
<router-link :to="`/address?address=${data.to}`" class="light"> <router-link :to="`/address?address=${data.to}`" class="light">
{{ data.to }} {{ data.to }}
</router-link> </router-link>
...@@ -90,7 +92,7 @@ ...@@ -90,7 +92,7 @@
<label> <label>
<span>{{ $t('lang.txDetail.value') }}</span> <span>{{ $t('lang.txDetail.value') }}</span>
</label> </label>
<div class="item-text"> <div class="item-text" v-loading="loading">
{{ {{
{ amount: data.amount, assets: data.assets, tx: data.inData } { amount: data.amount, assets: data.assets, tx: data.inData }
| TradeValue | TradeValue
...@@ -101,25 +103,27 @@ ...@@ -101,25 +103,27 @@
<label> <label>
<span>{{ $t('lang.txDetail.fee') }}</span> <span>{{ $t('lang.txDetail.fee') }}</span>
</label> </label>
<div class="item-text">{{ data.fee | filterFee }}</div> <div class="item-text" v-loading="loading">
{{ data.fee | filterFee }}
</div>
</div> </div>
<div class="item line flex items-center"> <div class="item line flex items-center">
<label> <label>
<span>{{ $t('lang.txDetail.random') }}</span> <span>{{ $t('lang.txDetail.random') }}</span>
</label> </label>
<div class="item-text">{{ String(data.nonce) }}</div> <div class="item-text" v-loading="loading">{{ String(data.nonce) }}</div>
</div> </div>
<div class="item flex items-center"> <div class="item flex items-center">
<label> <label>
<span>{{ $t('lang.txDetail.execer') }}</span> <span>{{ $t('lang.txDetail.execer') }}</span>
</label> </label>
<div class="item-text">{{ data.execer }}</div> <div class="item-text" v-loading="loading">{{ data.execer }}</div>
</div> </div>
<div class="item line flex items-center"> <div class="item line flex items-center">
<label> <label>
<span>{{ $t('lang.trade.func') }}</span> <span>{{ $t('lang.trade.func') }}</span>
</label> </label>
<div class="item-text"> <div class="item-text" v-loading="loading">
{{ data.actionName === 'unknown' ? 'none' : data.actionName }} {{ data.actionName === 'unknown' ? 'none' : data.actionName }}
</div> </div>
</div> </div>
...@@ -127,7 +131,7 @@ ...@@ -127,7 +131,7 @@
<label> <label>
<span>{{ $t('lang.txDetail.txType') }}</span> <span>{{ $t('lang.txDetail.txType') }}</span>
</label> </label>
<div class="item-text">{{ data.txType }}</div> <div class="item-text" v-loading="loading">{{ data.txType }}</div>
</div> </div>
<div class="markdown-data" v-if="data.execer === 'user.write'"> <div class="markdown-data" v-if="data.execer === 'user.write'">
<!-- <markdown :content="markdownTxt"></markdown> --> <!-- <markdown :content="markdownTxt"></markdown> -->
...@@ -136,7 +140,7 @@ ...@@ -136,7 +140,7 @@
<label> <label>
<span>{{ $t('lang.txDetail.inData') }}</span> <span>{{ $t('lang.txDetail.inData') }}</span>
</label> </label>
<div class="item-text"> <div class="item-text" v-loading="loading">
<pre class="preTxt" contenteditable="true"> <pre class="preTxt" contenteditable="true">
<code>{{data.inData | decodeTransferNote}}</code> <code>{{data.inData | decodeTransferNote}}</code>
</pre> </pre>
...@@ -146,7 +150,7 @@ ...@@ -146,7 +150,7 @@
<label> <label>
<span>{{ $t('lang.txDetail.outData') }}</span> <span>{{ $t('lang.txDetail.outData') }}</span>
</label> </label>
<div class="item-text"> <div class="item-text" v-loading="loading">
<pre class="preTxt" contenteditable="true"> <pre class="preTxt" contenteditable="true">
<code>{{data.outData}}</code> <code>{{data.outData}}</code>
</pre> </pre>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment