From 3b015f3e9c231938f0d12fbcc59a4cbef492e302 Mon Sep 17 00:00:00 2001 From: Phoenix <64720302+Concur-max@users.noreply.github.com> Date: Tue, 22 Apr 2025 09:17:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=EF=BC=8C=E8=B0=83=E6=95=B4=E5=8F=98=E9=87=8F=E5=A3=B0?= =?UTF-8?q?=E6=98=8E=E5=92=8C=E6=9D=A1=E4=BB=B6=E5=88=A4=E6=96=AD=E7=9A=84?= =?UTF-8?q?=E7=A9=BA=E6=A0=BC=EF=BC=8C=E5=A2=9E=E5=8A=A0=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E9=80=80=E5=87=BA=E7=99=BB=E5=BD=95=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/pages/profile/index.vue | 94 +++++++++++++++++-------------------- 1 file changed, 44 insertions(+), 50 deletions(-) diff --git a/app/pages/profile/index.vue b/app/pages/profile/index.vue index fb8773c..84c8935 100644 --- a/app/pages/profile/index.vue +++ b/app/pages/profile/index.vue @@ -8,9 +8,9 @@ definePageMeta({ layout: 'default', i18n: 'menu.profile', }) -const {t}=useI18n(); +const { t } = useI18n(); const router = useRouter() -const { userInfo,payment } = authStore() +const { userInfo, payment } = authStore() const showMyList = ref([]) const localState = ref({ finished: true, @@ -18,7 +18,7 @@ const localState = ref({ }) const groupByDate = (data) => { - + if (!Array.isArray(data)) return [] return Object.values(data.reduce((acc, curr) => { @@ -38,7 +38,7 @@ const fetchData = async () => { showMyList.value = groupByDate(res.data.data) } } catch (error) { - } + } } const onRefresh = async () => { @@ -48,23 +48,27 @@ const onRefresh = async () => { } const goPay = (item) => { - payment.value.leftPrice=item.leftCnyPrice - payment.value.nickName=item.nickName - payment.value.leftCurrency=item.leftCurrency - payment.value.buyUid=item.uuid - payment.value.artworkTitle=item?.auctionArtworkInfo?.artworkTitle - payment.value.auctionArtworkUuid=item?.auctionArtworkUuid - if (item.status===1){ + payment.value.leftPrice = item.leftCnyPrice + payment.value.nickName = item.nickName + payment.value.leftCurrency = item.leftCurrency + payment.value.buyUid = item.uuid + payment.value.artworkTitle = item?.auctionArtworkInfo?.artworkTitle + payment.value.auctionArtworkUuid = item?.auctionArtworkUuid + if (item.status === 1) { router.push('/signature/protocol') - }else if (item.status===4){ + } else if (item.status === 4) { router.push('/payment') } } const goDetail = (item) => router.push({ path: '/artDetail', query: { uuid: item.uuid } }) -const statusLabel={ - 1:t('payment.text4'), - 2:t('payment.text2'), - 4:t('payment.text6'), +const statusLabel = { + 1: t('payment.text4'), + 2: t('payment.text2'), + 4: t('payment.text6'), +} +const backLogin=()=>{ + localStorage.clear() + router.replace('/login') } fetchData() @@ -72,11 +76,16 @@ fetchData()