From a985b459457ef4e3af252166c9744fdb0e2fb24b Mon Sep 17 00:00:00 2001 From: hzj <1304805162@qq.com> Date: Mon, 19 Jan 2026 21:39:17 +0800 Subject: [PATCH] =?UTF-8?q?feat(cp=E6=8E=92=E8=A1=8C=E6=A6=9C):=20?= =?UTF-8?q?=E7=A2=8E=E7=89=87=E4=B8=8D=E8=B6=B3=E6=98=BE=E7=A4=BA=E5=BC=B9?= =?UTF-8?q?=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/stores/couple.js | 2 + .../Couple/GamePlay/components/exchange.vue | 8 +++ src/views/Ranking/Couple/index.vue | 54 ++++++++++++++++--- 3 files changed, 56 insertions(+), 8 deletions(-) diff --git a/src/stores/couple.js b/src/stores/couple.js index ef51a8e..bf83d08 100644 --- a/src/stores/couple.js +++ b/src/stores/couple.js @@ -2,6 +2,8 @@ import { defineStore } from 'pinia' export const useCoupleStore = defineStore('couple', { state: () => ({ + fragmentNotEnoughShow: false, //碎片不足 + helpShow: false, //帮助展示 topRewardShow: false, // 前三名奖励展示 diff --git a/src/views/Ranking/Couple/GamePlay/components/exchange.vue b/src/views/Ranking/Couple/GamePlay/components/exchange.vue index 7189545..06bb7b2 100644 --- a/src/views/Ranking/Couple/GamePlay/components/exchange.vue +++ b/src/views/Ranking/Couple/GamePlay/components/exchange.vue @@ -93,6 +93,8 @@ const getImgName = (filename) => { } const { + debris, // 碎片 + fragmentNotEnoughShow, // 碎片不足弹窗 exchangeConfirmShow, // 兑换确认弹窗 exchangeItem, // 当前兑换的物品 } = storeToRefs(coupleStore) @@ -113,6 +115,12 @@ const getActivityResource = async () => { // 用碎片兑换资源 const exchangeGoods = async (goods) => { + // 碎片不足提示 + if (debris.value < JSON.parse(goods.rule.jsonData).need_fragments) { + fragmentNotEnoughShow.value = true + return + } + exchangeItem.value = { userId: getUserId(), propsGroupId: goods.rule.id, diff --git a/src/views/Ranking/Couple/index.vue b/src/views/Ranking/Couple/index.vue index be61543..920cca4 100644 --- a/src/views/Ranking/Couple/index.vue +++ b/src/views/Ranking/Couple/index.vue @@ -944,11 +944,15 @@ border: 2px solid #fff; background: linear-gradient( 264deg, - rgba(220, 228, 255, 0.4) 10.17%, - rgba(151, 176, 255, 0.4) 60.22%, - rgba(220, 228, 255, 0.4) 103.12% + rgba(255, 220, 220, 0.4) 10.17%, + rgba(255, 151, 151, 0.4) 60.22%, + rgba(255, 220, 220, 0.4) 103.12% ); - box-shadow: 0 2.542px 5.084px 0 rgba(151, 176, 255, 0.15); + box-shadow: + 0 36.858px 13.981px 0 rgba(255, 106, 106, 0.02), + 0 20.335px 12.71px 0 rgba(255, 106, 106, 0.08), + 0 8.897px 8.897px 0 rgba(255, 106, 106, 0.13), + 0 2.542px 5.084px 0 rgba(255, 106, 106, 0.15); backdrop-filter: blur(4.5px); display: flex; @@ -1004,11 +1008,15 @@ border: 2px solid #fff; background: linear-gradient( 264deg, - rgba(220, 228, 255, 0.4) 10.17%, - rgba(151, 176, 255, 0.4) 60.22%, - rgba(220, 228, 255, 0.4) 103.12% + rgba(255, 220, 220, 0.4) 10.17%, + rgba(255, 151, 151, 0.4) 60.22%, + rgba(255, 220, 220, 0.4) 103.12% ); - box-shadow: 0 2.542px 5.084px 0 rgba(151, 176, 255, 0.15); + box-shadow: + 0 36.858px 13.981px 0 rgba(255, 106, 106, 0.02), + 0 20.335px 12.71px 0 rgba(255, 106, 106, 0.08), + 0 8.897px 8.897px 0 rgba(255, 106, 106, 0.13), + 0 2.542px 5.084px 0 rgba(255, 106, 106, 0.15); backdrop-filter: blur(4.5px); display: flex; @@ -1186,6 +1194,32 @@ /> + + +
+
+
+ You don't have enough pieces +
+
+
@@ -1234,6 +1268,8 @@ const route = useRoute() const coupleStore = useCoupleStore() const { + fragmentNotEnoughShow, // 碎片不足提示 + helpShow, // 帮助弹窗 topRewardShow, // 前三名奖励展示 @@ -1351,6 +1387,7 @@ const isPublic = ref(false) // 是否公开 const confirmShow = ref(false) // 二次确认发送弹窗 const maskLayerShow = computed(() => { return ( + fragmentNotEnoughShow.value || helpShow.value || topRewardShow.value || lastLetterShow.value || @@ -1397,6 +1434,7 @@ const showPopup = (type) => { // 关闭弹窗 const closedPopup = () => { + fragmentNotEnoughShow.value = false helpShow.value = false topRewardShow.value = false lastLetterShow.value = false