From 3fdc176008e7d63366fb3eed72a6912c3699b127 Mon Sep 17 00:00:00 2001 From: YuanHuakk <1751826683@qq.com> Date: Tue, 8 Oct 2024 17:20:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BC=B9=E5=B9=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 3 ++- pnpm-lock.yaml | 12 ++++++++++ src/api/index.js | 4 ++++ src/pages/index/index.scss | 11 +++++++++ src/pages/index/index.vue | 47 +++++++++++++++++++++++++++++++++----- 5 files changed, 70 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 21a16ea..0d787ce 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "dev:swan": "npm run build:swan -- --watch", "dev:alipay": "npm run build:alipay -- --watch", "dev:tt": "npm run build:tt -- --watch", - "dev:h5": "npm run build:h5 -- --watch", + "dev:h5": "npm run build:h5 -- --watch --mode production", "dev:rn": "npm run build:rn -- --watch", "dev:qq": "npm run build:qq -- --watch", "dev:jd": "npm run build:jd -- --watch", @@ -64,6 +64,7 @@ "lottie-web": "^5.12.2", "tcplayer.js": "^5.1.0", "vue": "^3.0.0", + "vue3-danmaku": "^1.6.1", "xgplayer": "^3.0.18", "xgplayer-flv": "^3.0.18" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 741b861..9e4b1cc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -77,6 +77,9 @@ importers: vue: specifier: ^3.0.0 version: 3.4.31(typescript@5.5.3) + vue3-danmaku: + specifier: ^1.6.1 + version: 1.6.1(vue@3.4.31(typescript@5.5.3)) xgplayer: specifier: ^3.0.18 version: 3.0.18(core-js@3.37.1) @@ -7169,6 +7172,11 @@ packages: vue-template-es2015-compiler@1.9.1: resolution: {integrity: sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==} + vue3-danmaku@1.6.1: + resolution: {integrity: sha512-v7KqMV5WK3mqRSotSuJfnJldsIpilh72nLKKebWGCO7HM4k330QV1f4oje410GfwSx+SrJ+YLeTG8QLJYuKwYg==} + peerDependencies: + vue: ^3.0.0 + vue@3.4.31: resolution: {integrity: sha512-njqRrOy7W3YLAlVqSKpBebtZpDVg21FPoaq1I7f/+qqBThK9ChAIjkRWgeP6Eat+8C+iia4P3OYqpATP21BCoQ==} peerDependencies: @@ -15737,6 +15745,10 @@ snapshots: vue-template-es2015-compiler@1.9.1: {} + vue3-danmaku@1.6.1(vue@3.4.31(typescript@5.5.3)): + dependencies: + vue: 3.4.31(typescript@5.5.3) + vue@3.4.31(typescript@5.5.3): dependencies: '@vue/compiler-dom': 3.4.31 diff --git a/src/api/index.js b/src/api/index.js index 9e7a1a4..2a6998f 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -14,3 +14,7 @@ export const GetPeriod = async () => await alovaInst.Get(`/dice/periods`); export const GetIsWin = async (uid) => await alovaInst.Get(`/dice/user/win?uid=${uid}`); + +// 获取中奖信息 +export const GetWinInfo = async () => + await alovaInst.Get(`/dice/all/user/win`); diff --git a/src/pages/index/index.scss b/src/pages/index/index.scss index f8b4dc3..d8a41e9 100644 --- a/src/pages/index/index.scss +++ b/src/pages/index/index.scss @@ -79,3 +79,14 @@ } } } + +.danmaku-box { + width: 100%; + + .danmaku { + position: absolute; + width: 100%; + height: 420px; + top: 0; + } +} diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index 69fd70c..b1f3c84 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -1,7 +1,22 @@