Commit 869789ef authored by chenqikuai's avatar chenqikuai

区块链查询

parent 448d4388
<script setup lang="ts"> <script setup lang="ts">
import { GO_URLS } from 'cqk-sy-ui';
import { onMounted } from 'vue';
import { $ajax } from './service';
import { setUrlList } from './store/mutations';
onMounted(async () => {
const res = await $ajax({
type: "get",
url: GO_URLS.config
});
if (res) {
setUrlList(res.data.frontend)
}
})
</script> </script>
<template> <template>
......
...@@ -2,17 +2,16 @@ ...@@ -2,17 +2,16 @@
<syTracePage @navigate="$router.push" @search-hash="searchHash"></syTracePage> <syTracePage @navigate="$router.push" @search-hash="searchHash"></syTracePage>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { globalState } from "@/store/state";
import { syTracePage } from "cqk-sy-ui" import { syTracePage } from "cqk-sy-ui"
const CHAIN_BROWSER_URL_PREFIX = '';
const searchHash = (hashText: string) => { const searchHash = (hashText: string) => {
if (hashText.trim() === "") { if (hashText.trim() === "") {
window.open(CHAIN_BROWSER_URL_PREFIX); window.open(globalState.urlList.chain_browser_url);
} else { } else {
window.open( window.open(
CHAIN_BROWSER_URL_PREFIX + globalState.urlList.chain_browser_url +
"product?hash=" + "/product?hash=" +
hashText hashText
); );
} }
......
...@@ -14,13 +14,24 @@ ...@@ -14,13 +14,24 @@
></sySearch> ></sySearch>
</div> </div>
<div class="overflow-hidden px-3"> <div class="overflow-hidden px-3">
<DeletedTableVue :list="infoList" :serialNumber="serialNumber"></DeletedTableVue> <DeletedTableVue
:list="infoList"
:serialNumber="serialNumber"
:page="params.page"
@handleChain="handleChain"
@copyHash="copyHash"
@privacySettings="privacySettings"
></DeletedTableVue>
</div> </div>
<common-dialog showMask v-if="PromptShow" @closePopup="PromptShow = false">
<prompt tip="确定要隐藏该条记录吗" @close="PromptShow = false" @confirm="hiddenCertificate" />
</common-dialog>
</div> </div>
</template> </template>
<script lang="ts"> <script lang="ts">
import { $ajax } from "@/service"; import { $ajax } from "@/service";
import { setDeletedNum } from "@/store/mutations"; import { setDeletedNum } from "@/store/mutations";
import { globalState } from "@/store/state";
import { sySearch, syPagination, syPrompt, syCommonDialog, GO_URLS, openChainBrowser, fmtTimeStamp } from "cqk-sy-ui" import { sySearch, syPagination, syPrompt, syCommonDialog, GO_URLS, openChainBrowser, fmtTimeStamp } from "cqk-sy-ui"
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import { defineComponent } from "vue"; import { defineComponent } from "vue";
...@@ -84,6 +95,7 @@ export default defineComponent({ ...@@ -84,6 +95,7 @@ export default defineComponent({
} }
}, },
privacySettings(item: any) { privacySettings(item: any) {
console.log('privacySettings')
this.PromptShow = true; this.PromptShow = true;
this.PromptID = item.id; this.PromptID = item.id;
}, },
...@@ -122,7 +134,7 @@ export default defineComponent({ ...@@ -122,7 +134,7 @@ export default defineComponent({
}, },
// 打开区块链浏览器 // 打开区块链浏览器
handleChain(item: any) { handleChain(item: any) {
openChainBrowser(item.hash); openChainBrowser(item.hash, globalState.urlList.chain_browser_url);
}, },
// 显示区块链弹窗 // 显示区块链弹窗
openBlock(item: any, index: number) { openBlock(item: any, index: number) {
......
...@@ -10,11 +10,15 @@ ...@@ -10,11 +10,15 @@
teleport teleport
:list="queryOperateList" :list="queryOperateList"
@click-item="(v) => handleClickQuery(props, v)" @click-item="(v) => handleClickQuery(props, v)"
:class="{ ' !cursor-not-allowed': props.status !== 2 }"
> >
<i <div class="iconOutBox" style="color: #9b9b9b">
class="iconfont iconfangdajing1" <i
:class="{ 'iconerweima--check': props.status === 2 }" class="iconfont iconfangdajing1"
></i> style="font-size: 13px;"
:class="{ 'iconerweima--check': props.status === 2, }"
></i>
</div>
</syMoreOperate> </syMoreOperate>
</template> </template>
<template #operate="props"> <template #operate="props">
...@@ -22,6 +26,7 @@ ...@@ -22,6 +26,7 @@
teleport teleport
:list="operateList" :list="operateList"
@click-item="(v) => handleClickOperate(props, v)" @click-item="(v) => handleClickOperate(props, v)"
:class="{ ' !cursor-not-allowed': props.status !== 2 }"
> >
<i <i
class="iconfont icongengduocaozuo" class="iconfont icongengduocaozuo"
...@@ -36,14 +41,14 @@ import { syTable, formatTime, syMoreOperate } from "cqk-sy-ui" ...@@ -36,14 +41,14 @@ import { syTable, formatTime, syMoreOperate } from "cqk-sy-ui"
const props = defineProps<{ const props = defineProps<{
list: any[]; list: any[];
page: number; page: number;
serialNumber: (n: number) => string; serialNumber: (n: number) => number;
}>() }>()
const emit = defineEmits(['handleChain', 'copyHash', 'privacySettings']) const emit = defineEmits(['handleChain', 'copyHash', 'privacySettings'])
const operateList = [ const operateList = [
{ {
name: '隐私设置', name: '隐私设置',
value: '查看区块链', value: '隐私设置',
click(item: any) { click(item: any) {
emit('privacySettings', item) emit('privacySettings', item)
}, },
...@@ -128,8 +133,16 @@ const columns = [ ...@@ -128,8 +133,16 @@ const columns = [
] ]
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.iconOutBox {
position: relative;
height: 25px;
width: 25px;
line-height: 25px;
margin: 0 auto;
border-radius: 4px;
background: rgba(155, 155, 155, 0.1);
}
.iconerweima--check { .iconerweima--check {
color: #4a90e2; color: #4a90e2;
cursor: pointer;
} }
</style> </style>
\ No newline at end of file
...@@ -386,7 +386,7 @@ const searchOpearteList = [ ...@@ -386,7 +386,7 @@ const searchOpearteList = [
name: '查看区块链', name: '查看区块链',
value: '查看区块链', value: '查看区块链',
click(props: any) { click(props: any) {
openChainBrowser(props.hash) openChainBrowser(props.hash, globalState.urlList.chain_browser_url)
}, },
}, },
{ {
...@@ -413,7 +413,7 @@ const checkPass = (item: any) => { ...@@ -413,7 +413,7 @@ const checkPass = (item: any) => {
const openQRcode = async (item: any, index: number) => { const openQRcode = async (item: any, index: number) => {
if (item.status != 2) return; if (item.status != 2) return;
checkQR.value = index; checkQR.value = index;
QRcode.value = await getQR(item.hash) || ''; QRcode.value = await getQR(item.hash, globalState.urlList.chain_browser_url) || '';
document.addEventListener("mousedown", onHindMenu); document.addEventListener("mousedown", onHindMenu);
} }
......
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