From c3dc28f3d1c20f775fc562dab78d438f6173fdb2 Mon Sep 17 00:00:00 2001 From: AuroraHuang22 Date: Thu, 31 Oct 2024 16:17:08 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=94=A7=20Add=20recommend=20for=20Feng?= =?UTF-8?q?HuoShanLin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/NFTPage/Recommendation.vue | 12 +++++++++++- src/constant/index.js | 9 +++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/components/NFTPage/Recommendation.vue b/src/components/NFTPage/Recommendation.vue index 4bf1898d5..dba3f3787 100644 --- a/src/components/NFTPage/Recommendation.vue +++ b/src/components/NFTPage/Recommendation.vue @@ -94,7 +94,7 @@ import { Swiper, SwiperSlide } from 'vue-awesome-swiper'; import { DEFAULT_RECOMMENDATIONS_LIST, - CROSS_SELL_PRODUCT_IDS_MAP, + FENG_HUO_SHAN_LIN_CLASS_IDS, } from '~/constant'; import bookstoreMixin from '~/mixins/bookstore'; @@ -229,8 +229,18 @@ export default { }); } + // hardcode for fenghuoshanlin items + const fengHuoShanLinItems = FENG_HUO_SHAN_LIN_CLASS_IDS.includes( + this.classId + ) + ? FENG_HUO_SHAN_LIN_CLASS_IDS.filter(id => id !== this.classId).map( + classId => ({ classId }) + ) + : []; + recommendedList = [ ...this.crossSellProductIds?.map(classId => ({ classId })), + ...fengHuoShanLinItems, ...recommendedList, ]; diff --git a/src/constant/index.js b/src/constant/index.js index 6a7e1bff9..08bdca2d0 100644 --- a/src/constant/index.js +++ b/src/constant/index.js @@ -335,6 +335,15 @@ export const CROSS_SELL_PRODUCT_IDS_MAP = IS_TESTNET ], }; +export const FENG_HUO_SHAN_LIN_CLASS_IDS = [ + 'likenft1e88egsmedlsjvtp50ngvftf3psn4u4njrlfhkcsmukpuemkwq4tqrqzejk', + 'likenft14lz72a38tk0elxkv5jyp6uepx7jru2zhu0vcpv0sau2k069lnq6sp3hnur', + 'likenft1tz70u4xz3wkcfm2zz55gttj4xsm67waa55rkewv0p69wdcd8t3ysq9gqst', + 'likenft1s9he8030mnuwz53988dk2gf0u4eehmthgg6tsr64gx6kamv2z5wsv80qq4', + 'likenft1lnp07hyzvgekvcchf0vz9xsa30qp00e3fp70z5x7vzz7dvas83as8d9h0n', + 'likenft1ewmnn8fwkd7qk7c7h3me4xgkatjae4yx32nmwp7qkznc9plz8vfqpjvsjv', +]; + export const DISABLED_CROSS_SELL_POPUP_LIST = [ 'likenft17zq3r5t2qwfatle04sz680vl3ka0l8wfeu4n5jv26mnvawnfqs4qd773ny', // 坐監情緒學 'likenft1434x9tl07ysrjq9lvxv0thgn0zt2fxwhntefd249lawrznw08lrskr3jfp', // 來一場散步學 From 6dcef45e58100966ff6e2fe5e96ca59e907168c5 Mon Sep 17 00:00:00 2001 From: AuroraHuang22 Date: Thu, 31 Oct 2024 17:16:48 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Impleme?= =?UTF-8?q?nt=20cross-sell=20logic=20based=20on=20recommendation=20groups?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/NFTPage/Recommendation.vue | 15 +--- src/constant/index.js | 83 ++++++++++++++--------- src/mixins/cross-sell.js | 25 +++++-- 3 files changed, 70 insertions(+), 53 deletions(-) diff --git a/src/components/NFTPage/Recommendation.vue b/src/components/NFTPage/Recommendation.vue index dba3f3787..8804f21c5 100644 --- a/src/components/NFTPage/Recommendation.vue +++ b/src/components/NFTPage/Recommendation.vue @@ -92,10 +92,7 @@