From 68665039adb5eb26682a7c89b6d30f00a983cca3 Mon Sep 17 00:00:00 2001 From: William Chong Date: Wed, 27 Nov 2024 15:00:06 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=90=9B=20Fix=20missing=20wnft=20statu?= =?UTF-8?q?s=20in=20claim=20page?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/nft/claim/index.vue | 73 ++++++++++++++++++++++------------- 1 file changed, 46 insertions(+), 27 deletions(-) diff --git a/src/pages/nft/claim/index.vue b/src/pages/nft/claim/index.vue index 84652da10..9a4d3c7d6 100644 --- a/src/pages/nft/claim/index.vue +++ b/src/pages/nft/claim/index.vue @@ -578,6 +578,7 @@ import { import { postStripeFiatPendingClaim, getNFTBookClaimEndpoint, + getStripeFiatPaymentStatus, getNFTBookPaymentStatusEndpoint, getFreeNFTBookPurchaseEndpoint, getNFTBookCartStatusEndpoint, @@ -802,6 +803,7 @@ export default { !newValue && !( this.status === 'completed' || + this.status === 'done' || this.status === 'pending' || this.status === 'pendingNFT' ) @@ -854,33 +856,49 @@ export default { this.giftInfo = giftInfo; if (query.type === 'nft_book') this.clearBookProductShoppingCart(); } else if (this.paymentId) { - try { - const { data } = await this.$api.get( - getNFTBookPaymentStatusEndpoint({ - classId: this.classId, - collectionId: this.collectionId, - paymentId: this.paymentId, - token: this.token, - }) - ); - ({ price, priceIndex } = data); - const { - giftInfo, - isPhysicalOnly, - status, - autoMemo, - isAutoDeliver, - quantity, - } = data; - this.giftInfo = giftInfo; - this.isPhysicalOnly = isPhysicalOnly; - this.isAutoDeliver = isAutoDeliver; - this.creatorMessage = parseAutoMemo(autoMemo); - this.status = status; - this.quantity = quantity; - } catch (err) { - // eslint-disable-next-line no-console - console.error(err); + if (this.isNFTBook) { + try { + const { data } = await this.$api.get( + getNFTBookPaymentStatusEndpoint({ + classId: this.classId, + collectionId: this.collectionId, + paymentId: this.paymentId, + token: this.token, + }) + ); + ({ price, priceIndex } = data); + const { + giftInfo, + isPhysicalOnly, + status, + autoMemo, + isAutoDeliver, + quantity, + } = data; + this.giftInfo = giftInfo; + this.isPhysicalOnly = isPhysicalOnly; + this.isAutoDeliver = isAutoDeliver; + this.creatorMessage = parseAutoMemo(autoMemo); + this.status = status; + this.quantity = quantity; + } catch (err) { + // eslint-disable-next-line no-console + console.error(err); + } + } else { + try { + const { data } = await this.$api.get( + getStripeFiatPaymentStatus({ + paymentId: this.paymentId, + token: this.token, + }) + ); + this.status = data.status; + price = data.fiatPrice; + } catch (err) { + // eslint-disable-next-line no-console + console.error(err); + } } } else { // free purchase? @@ -1004,6 +1022,7 @@ export default { if ( this.status === 'completed' || + this.status === 'done' || this.status === 'pending' || this.status === 'pendingNFT' ) { From 406abfeaa33199ff1bc34ea73d9700f316fd4820 Mon Sep 17 00:00:00 2001 From: AuroraHuang22 Date: Thu, 28 Nov 2024 21:18:46 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E2=9C=A8=20Add=20search=20bar=20to=20home?= =?UTF-8?q?=20page?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/index.vue | 84 ++++++++++++++++++++++++++------------------- 1 file changed, 49 insertions(+), 35 deletions(-) diff --git a/src/pages/index.vue b/src/pages/index.vue index cc36f398b..6d08ac214 100644 --- a/src/pages/index.vue +++ b/src/pages/index.vue @@ -39,15 +39,6 @@ paddingClass, ]" > - - - {{ $t('index_intro_more_button') }} - - - + - - - - - - + + + + @@ -504,7 +503,7 @@ ]" >
+ + {{ $t('index_intro_more_button') }} + + + + + + + + + +