From 1f5ab319bfb9475fb6d32d9935a8ededd6c23a75 Mon Sep 17 00:00:00 2001 From: zhaoruhui Date: Thu, 11 Sep 2025 17:09:48 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=A2=E5=AF=8C=E9=87=91=E8=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 3 + .env.production | 3 + src/api/goldenWheel.js | 21 + src/views/wealth/goldenWheel.vue | 1033 +++++++++++++++++++++++++++----------- 4 files changed, 776 insertions(+), 284 deletions(-) create mode 100644 src/api/goldenWheel.js diff --git a/.env.development b/.env.development index 11e24c5..03bfe53 100644 --- a/.env.development +++ b/.env.development @@ -19,6 +19,9 @@ VITE_APP_IMG_API_BASE_URL = "http://39.101.133.168:8828/hljw/api/aws/upload" #MJ API VITE_APP_MJ_API_BASE_URL = "http://192.168.9.19:8080/api" +#Link测试环境scms库 +VITE_APP_API_SCMS_URL = "http://39.101.133.168:8828/scms" + # Whether to open mock VITE_USE_MOCK = true diff --git a/.env.production b/.env.production index d6d10e3..f13a2bd 100644 --- a/.env.production +++ b/.env.production @@ -19,6 +19,9 @@ VITE_APP_API_BASE_HW_URL = "https://api.homilychart.com/hljw" VITE_APP_IMG_API_BASE_URL = "https://api.homilychart.com/hljw/api/aws/upload" #MJ API VITE_APP_MJ_API_BASE_URL = "http://192.168.9.19:8080/api" + +#Link正式环境 +VITE_APP_API_SCMS_URL = "https://api.homilychart.com/scms" # Whether to enable gzip or brotli compression # Optional: gzip | brotli | none # If you need multiple forms, you can use `,` to separate diff --git a/src/api/goldenWheel.js b/src/api/goldenWheel.js new file mode 100644 index 0000000..ecc79d0 --- /dev/null +++ b/src/api/goldenWheel.js @@ -0,0 +1,21 @@ +import request from "../utils/request"; +const LinkScmsUrl = import.meta.env.VITE_APP_API_SCMS_URL; + +//Link财富金轮---获取用户权限和到期时间 +export const permissionApi = function (params) { + return request({ + // url: `${LinkScmsUrl}/api/brain/privilege`, + url: 'http://h4698ee4.natappfree.cc/api/goldWheel/info', + method: "post", + data: params, + }); + }; + +//Link财富金轮---抽奖 +export const lotteryApi = function (params) { + return request({ + url: 'http://h4698ee4.natappfree.cc/api/goldWheel/drawPrize', + method: "post", + data: params, + }); +}; \ No newline at end of file diff --git a/src/views/wealth/goldenWheel.vue b/src/views/wealth/goldenWheel.vue index 1850dfe..4dac0d2 100644 --- a/src/views/wealth/goldenWheel.vue +++ b/src/views/wealth/goldenWheel.vue @@ -1,343 +1,808 @@ - - - + this.isSpinning = true; + + // 开始旋转动画 + const newRotation = this.currentRotation + 1440; + this.currentRotation = newRotation; + + // 调用抽奖API获取奖品信息 + const success = await this.fetchPrizeInfo(); + + setTimeout(() => { + this.isSpinning = false; + + if (success) { + setTimeout(() => { + this.showPrizeModal = true; + }, 500); + } + }, 3000); + }, + + // 处理活动规则点击 + handleRuleClick() { + this.showRuleModal = true; + }, + + // 关闭弹窗 + closeModal() { + this.showPrizeModal = false; + }, + + // 关闭无次数提示弹窗 + closeNoTimesModal() { + this.showNoTimesModal = false; + if (this.noTimesTimer) { + clearTimeout(this.noTimesTimer); + } + }, + + // 关闭活动规则弹窗 + closeRuleModal() { + this.showRuleModal = false; + }, + + // 关闭首次访问弹窗 + closeFirstVisitModal() { + this.isFirstVisit = false; + }, - \ No newline at end of file