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; };