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))