From a43bdaf157f164644ab2d9047b0585dd4326a449 Mon Sep 17 00:00:00 2001 From: xingyy <64720302+Concur-max@users.noreply.github.com> Date: Fri, 17 Jan 2025 10:19:01 +0800 Subject: [PATCH 1/2] =?UTF-8?q?refactor(home):=20=E5=B0=86=E9=A6=96?= =?UTF-8?q?=E9=A1=B5=E6=95=B0=E6=8D=AE=E7=A7=BB=E8=87=B3=20store=20?= =?UTF-8?q?=E5=B9=B6=E4=BC=98=E5=8C=96=E9=A1=B5=E9=9D=A2=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将 list 数据从组件内部移动到 home store 中 - 优化了 fullLive 的切换逻辑,改为 toggleFullLive 方法 - 更新了模板,使用新的 store 数据 - 添加了 slide-up 过渡动画,替换了原有的 fade动画 --- app/pages/home/index.vue | 76 +++++++++++----------------------------- app/stores/home/index.js | 42 ++++++++++++++++++++++ 2 files changed, 62 insertions(+), 56 deletions(-) diff --git a/app/pages/home/index.vue b/app/pages/home/index.vue index bdbbf21..c61fb8c 100644 --- a/app/pages/home/index.vue +++ b/app/pages/home/index.vue @@ -1,16 +1,12 @@ + + \ No newline at end of file diff --git a/app/stores/home/index.js b/app/stores/home/index.js index 8e6d038..dae33b7 100644 --- a/app/stores/home/index.js +++ b/app/stores/home/index.js @@ -1,7 +1,49 @@ import { createGlobalState } from '@vueuse/core' export const homeStore = createGlobalState(() => { const fullLive=ref(false) + const list = ref([{ + image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/637d95b4-2ae9-4a74-bd60-a3a9d2ca2ca0.png', + title: '张天赐 | 日出而作,日落而息', + startingPrice: 'RMB 1,000', + transactionPrice: 'RMB 10,000', + }, { + image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/f7b65e23-ce21-41b4-8e58-9e6dc6950727.png', + title: '张天赐 | 日出而作,日落而息', + startingPrice: 'RMB 1,000', + transactionPrice: '', + }, { + image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/41eceb23-d168-4049-ae8e-48c5328b192f.png', + title: '张天赐 | 日出而作,日落而息', + startingPrice: 'RMB 1,000', + transactionPrice: '', + }, { + image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/25c3f03c-9e0b-456b-963f-79b3d812c89a.png', + title: '张天赐 | 日出而作,日落而息', + startingPrice: 'RMB 1,000', + transactionPrice: '', + }, { + image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/25c3f03c-9e0b-456b-963f-79b3d812c89a.png', + title: '张天赐 | 日出而作,日落而息', + startingPrice: 'RMB 1,000', + transactionPrice: '', + }, { + image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/25c3f03c-9e0b-456b-963f-79b3d812c89a.png', + title: '张天赐 | 日出而作,日落而息', + startingPrice: 'RMB 1,000', + transactionPrice: '', + },{ + image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/637d95b4-2ae9-4a74-bd60-a3a9d2ca2ca0.png', + title: '张天赐 | 日出而作,日落而息', + startingPrice: 'RMB 1,000', + transactionPrice: 'RMB 10,000', + },{ + image: 'https://e-cdn.fontree.cn/fonchain-main/prod/file/default/setting/637d95b4-2ae9-4a74-bd60-a3a9d2ca2ca0.png', + title: '张天赐 | 日出而作,日落而息', + startingPrice: 'RMB 1,000', + transactionPrice: 'RMB 10,000', + }]) return{ + list, fullLive } }) \ No newline at end of file From d345b66026182f80b045da2993cdfe822c6c95b8 Mon Sep 17 00:00:00 2001 From: xingyy <64720302+Concur-max@users.noreply.github.com> Date: Fri, 17 Jan 2025 11:06:19 +0800 Subject: [PATCH 2/2] 123 --- app/pages/home/index.vue | 76 +++++++++++++++++++++++++++++----------- env/.env.test | 2 +- 2 files changed, 57 insertions(+), 21 deletions(-) diff --git a/app/pages/home/index.vue b/app/pages/home/index.vue index c61fb8c..bfe89fb 100644 --- a/app/pages/home/index.vue +++ b/app/pages/home/index.vue @@ -1,12 +1,17 @@ - - \ No newline at end of file diff --git a/env/.env.test b/env/.env.test index 18a5bf3..207c4c5 100644 --- a/env/.env.test +++ b/env/.env.test @@ -4,4 +4,4 @@ NUXT_PUBLIC_WS_URL=ws://test-ws.example.com NUXT_API_SECRET=test-secret # 阿里云播放器配置 -NUXT_PUBLIC_PLAYER_SOURCE=artc://live-pull-sh-01.szjixun.cn/live/live?auth_key=1736748343-0-0-feef65166e5cc62957c35b6e3eec82a1 \ No newline at end of file +NUXT_PUBLIC_PLAYER_SOURCE=artc://live-pull-sh-01.szjixun.cn/live/live?auth_key=1737080180-0-0-42ad4cf26ba26eee78ca7de9c524d1e0 \ No newline at end of file