From 13eea2f2d991789852f3c40aeb4a2462eeaae0a6 Mon Sep 17 00:00:00 2001 From: shenhan000 Date: Mon, 12 May 2025 15:37:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/pages/member-center/index.vue | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/app/pages/member-center/index.vue b/app/pages/member-center/index.vue index d169e0c..8dbda81 100644 --- a/app/pages/member-center/index.vue +++ b/app/pages/member-center/index.vue @@ -176,7 +176,7 @@ async function getIntegralGold() { } } getIntegralGold() -const isShowActivity = ref(true) +const isShowActivity = ref(false) // 关闭活动的图标 function closeActivityIcon() { @@ -187,20 +187,30 @@ function closeActivityIcon() { const activityList = ref([]) const isShowactivityList = ref(false) async function showActivityList() { + isShowactivityList.value = true +} + +async function getActivityList() { try { const res = await request.post('/promotion/promotionList', { pageNum: 1, pageSize: 50, }) if (res.code === 200) { - activityList.value = res.rows - isShowactivityList.value = true + if (res.rows.length > 0) { + isShowActivity.value = true + activityList.value = res.rows + } + else { + isShowActivity.value = false + } } } catch (err) { console.log(err) } } +getActivityList() // 参与活动 async function getActivity(item) {