-
+
#{{ piece.token_id }}
@@ -127,10 +129,15 @@ export default {
components: {},
data() {
return {
- piece: "",
+ piece: {
+ detail: {
+ item_id: null,
+ },
+ },
+ piecedata: {},
loadingInstance: null,
dialogVisible: false,
- visible:this.isShow,
+ visible: this.isShow,
chainManager: new ChainManager(),
};
},
@@ -139,7 +146,20 @@ export default {
this.visible = val;
},
},
+ created() {
+ console.log(this.piece.detail.item_id, "this.piece.detail.item_id");
+ },
computed: {
+ id() {
+ if (this.piece?.detail?.item_id) {
+ return this.piece.detail.item_id;
+ }
+ },
+ // id(){
+ // if(this.data.info.item_id){
+ // return this.data.info.item_id
+ // }
+ // },
time() {
if (this.piece.modifytime) {
return formatSelect(this.piece.modifytime);
@@ -169,8 +189,12 @@ export default {
return formatPrice(price, decimals, fixed);
},
init(data) {
+ // this.$nextTick(() => {
+
this.dialogVisible = true;
this.piece = data;
+ // this.piecedata = data;
+ // });
},
handPutShow() {
this.$emit("handPutShow", this.piece);
@@ -197,7 +221,7 @@ export default {
if (nftres.status == true) {
this.$emit("handMessage", 1);
this.hideLoading();
- setTimeout(() => {
+ setTimeout(() => {
this.$emit("handMessageHide");
this.$emit("closeTip", false);
setTimeout(() => {
diff --git a/src/components/market/nft/PieceNft.vue b/src/components/market/nft/PieceNft.vue
index 29a31b0..be29c2b 100644
--- a/src/components/market/nft/PieceNft.vue
+++ b/src/components/market/nft/PieceNft.vue
@@ -81,6 +81,7 @@
@showTip="showTip"
:isType="isType"
:isShow="isShow"
+ v-if="isShow"
:isPiecePut="isPiecePut"
:isBuy="isBuy"
@handBuyShow="handBuyShow"
@@ -88,7 +89,7 @@
@handPutShow="handPutShow"
@handPutHide="handPutHide"
@handMessage="handMessage"
- @handMessageHide="handMessageHide"
+ @handMessageHide="handMessageHide"
>
{
- this.$refs.dialog.init(data);
- });
+ if (data.detail.item_id) {
+ this.isShow = true;
+ this.$nextTick(() => {
+ this.$refs.dialog.init(data);
+ });
+ }
},
handPutShow(piece) {
this.isPiecePut = true;