From 6c85309ff405a7141126d3f2ea7d95131a6a05d9 Mon Sep 17 00:00:00 2001 From: 77 <270260644@qq.com> Date: Thu, 7 Nov 2024 14:11:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=9A=E5=91=98=E4=BB=B7=E6=A0=BCbug?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/user/user_vip/list.vue | 42 +++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/pages/user/user_vip/list.vue b/pages/user/user_vip/list.vue index 2c52f31..23a65a0 100644 --- a/pages/user/user_vip/list.vue +++ b/pages/user/user_vip/list.vue @@ -17,13 +17,19 @@ 您与众悦e家商场的第101天 开通即享会员权益 - SVIP会员 {{ sheep.$helper.timeFormat(userInfo.cardExpirationTime, 'yyyy-mm-dd') }} 到期 + + + SVIP会员 + {{ sheep.$helper.timeFormat(userInfo.cardExpirationTime, 'yyyy-mm-dd') }} 到期 + 永久SVIP会员 + + - + 立即开通 - + 续费会员 @@ -55,12 +61,13 @@ - + 开通会员 - 有效期至 - {{ timeAute }} + 有效期至 + {{ timeAute }} + {{ sheep.$helper.timeFormat(userInfo.cardExpirationTime, 'yyyy-mm-dd') }} - - 购买即视为同意《会员用户协议》 + + 购买即视为同意《会员用户协议 - + 立即开通 @@ -101,12 +109,12 @@ import sheep from '@/sheep'; const statusBarHeight = sheep.$platform.device.statusBarHeight * 2; const userInfo = computed(() => sheep.$store('user').userInfo); - + const vipList = ref([]); const vipList2 = ref([]); const valVip = ref(88888); const nameVip = ref([]); - const timeAute = ref(sheep.$helper.timeFormat(userInfo.cardExpirationTime, 'yyyy-mm-dd')); + const timeAute = ref(); // 定义方法 function getList() { request({ @@ -129,14 +137,18 @@ function vipFun(index, name) { valVip.value = index data.cardName = name - timeAute.value = sheep.$helper.timeFormat(vipList.value[index].cardExpirationTime, 'yyyy-mm-dd'); - - console.log(userInfo.cardExpirationTime,"userInfo.cardExpirationTime") + if (name == '永久') { + timeAute.value = '永久会员'; + } else { + timeAute.value = sheep.$helper.timeFormat(vipList.value[index].cardExpirationTime, 'yyyy-mm-dd'); + } + + console.log(userInfo.cardExpirationTime, "userInfo.cardExpirationTime") } // beclick function beclick() { - if( data.cardName == '' ) { + if (data.cardName == '') { sheep.$helper.toast('请选择') return; };