From 46b205b377fe2c4a5f7aaf6b76eb02764c11b82b Mon Sep 17 00:00:00 2001 From: William Chong Date: Sat, 14 Sep 2024 14:35:30 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Send=20channel=20for=20free=20purch?= =?UTF-8?q?ase?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/nft/claim/index.vue | 6 +++++- src/pages/nft/class/_classId/index.vue | 2 +- src/pages/nft/collection/_collectionId/index.vue | 2 +- src/util/api/index.js | 2 ++ 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/pages/nft/claim/index.vue b/src/pages/nft/claim/index.vue index 0f526ce76..3699a02a8 100644 --- a/src/pages/nft/claim/index.vue +++ b/src/pages/nft/claim/index.vue @@ -566,7 +566,7 @@ import { parseNFTMetadataURL, } from '~/util/nft'; import { ellipsis } from '~/util/ui'; - +import { NFT_BOOK_PLATFORM_LIKER_LAND } from '~/constant'; import alertMixin from '~/mixins/alert'; import crossSellMixin from '~/mixins/cross-sell'; import walletMixin from '~/mixins/wallet'; @@ -658,6 +658,9 @@ export default { priceIndex() { return this.$route.query.price_index; }, + platform() { + return this.$route.query.from || NFT_BOOK_PLATFORM_LIKER_LAND; + }, token() { return this.$route.query.claiming_token; }, @@ -1028,6 +1031,7 @@ export default { classId: this.classId, collectionId: this.collectionId, priceIndex: this.priceIndex, + platform: this.platform, }), { email: this.claimingEmail, diff --git a/src/pages/nft/class/_classId/index.vue b/src/pages/nft/class/_classId/index.vue index b0aa64af0..5c907177d 100644 --- a/src/pages/nft/class/_classId/index.vue +++ b/src/pages/nft/class/_classId/index.vue @@ -1195,7 +1195,7 @@ export default { type: 'nft_book', free: true, price_index: edition.index, - from: 'liker_land_waived', + from: this.platform, }, }) ); diff --git a/src/pages/nft/collection/_collectionId/index.vue b/src/pages/nft/collection/_collectionId/index.vue index 1b1fade0d..d4fe4ded8 100644 --- a/src/pages/nft/collection/_collectionId/index.vue +++ b/src/pages/nft/collection/_collectionId/index.vue @@ -319,7 +319,7 @@ export default { collection_id: this.collectionId, type: 'nft_book', free: true, - from: 'liker_land_waived', + from: this.platform, }, }) ); diff --git a/src/util/api/index.js b/src/util/api/index.js index 44fd6f938..005b87e74 100644 --- a/src/util/api/index.js +++ b/src/util/api/index.js @@ -358,9 +358,11 @@ export const getFreeNFTBookPurchaseEndpoint = ({ utmSource, utmMedium, referrer, + platform = NFT_BOOK_PLATFORM_LIKER_LAND, }) => { const qsPayload = { price_index: priceIndex, + from: platform, ga_client_id: gaClientId, ga_session_id: gaSessionId, utm_campaign: utmCampaign,