From 0bf87935fc51313a1f37e26e53320a95425f417d Mon Sep 17 00:00:00 2001 From: cebgcontract <99630598+cebgcontract@users.noreply.github.com> Date: Sun, 24 Apr 2022 21:34:50 +0800 Subject: [PATCH] =?UTF-8?q?=E7=82=B9=E5=87=BB=E6=BF=80=E6=B4=BB=E6=97=B6,?= =?UTF-8?q?=20=E5=B0=86type=E4=B8=80=E8=B5=B7=E4=BC=A0=E9=80=92=E5=87=BA?= =?UTF-8?q?=E6=9D=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/market/NftInfo.vue | 4 ++-- src/components/market/NftList.vue | 4 ++-- src/views/desktop/MyNft.vue | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/market/NftInfo.vue b/src/components/market/NftInfo.vue index 42cbcef..14033af 100644 --- a/src/components/market/NftInfo.vue +++ b/src/components/market/NftInfo.vue @@ -134,8 +134,8 @@ export default class extends Vue { return this.nftData?.attrMap?.has(key) } - onActivateClick(nftId: string) { - this.$emit('activate-clicked', nftId) + onActivateClick(tokenId: string) { + this.$emit('activate-clicked', { tokenId, type: this.nftData.type }) } } diff --git a/src/components/market/NftList.vue b/src/components/market/NftList.vue index 3d799d9..f7abee7 100644 --- a/src/components/market/NftList.vue +++ b/src/components/market/NftList.vue @@ -58,8 +58,8 @@ export default class extends Vue { // } } - onActivateClick(nftId: string) { - this.$emit('activate-clicked', nftId) + onActivateClick(data: {tokenId: string, type: number}) { + this.$emit('activate-clicked', data) } } diff --git a/src/views/desktop/MyNft.vue b/src/views/desktop/MyNft.vue index 3f38144..73354f6 100644 --- a/src/views/desktop/MyNft.vue +++ b/src/views/desktop/MyNft.vue @@ -179,8 +179,8 @@ export default class MyNft extends Vue { this.loadingInstance?.close() } - async onActivateClick(tokenId: string) { - console.log('onActivateClick: ', tokenId) + async onActivateClick({ tokenId, type }: {tokenId: string, type: number}) { + console.log('onActivateClick: ', tokenId, type) if (!this.isLogin) { this.$message({ message: 'You should login first', @@ -216,7 +216,7 @@ export default class MyNft extends Vue { } try { const result = await this.chainManager.activateOneNft( - this.boxProxyAddress, tokenId, nftNew, 1, nonce, signature) + this.boxProxyAddress, tokenId, nftNew, type, nonce, signature) console.log('activate nft result: ', result) const stateData = { token_id: tokenId, txhash: result.transactionHash } localStorage.setItem(MYSTERY_BOX_CACHE, JSON.stringify(stateData))